Fluent Ribbon 第八步 其他控件


前七節將Ribbon的功能大致介紹了一番,本節來介紹一些特殊控件的使用

DropDownButton控件

當前控件是顯示下拉功能的基本組件,其配合Gallery能實現諸多特殊功能,代碼如下所示

<Fluent:DropDownButton Header="Pink" Icon="Images\Pink.png" LargeIcon="Images\PinkLarge.png">

<Fluent:Gallery>

<Image Source="Images\RedLarge.png" Stretch="None" />

<Image Source="Images\GreenLarge.png" Stretch="None" />

<Image Source="Images\BlueLarge.png" Stretch="None" />

</Fluent:Gallery>

</Fluent:DropDownButton>

當前主要顯示一個下拉控件,顯示一些下拉顯示,如下圖

Gallery 控件

用於顯示一個組合列表的功能,其基本代碼形式如下:

<Fluent:RibbonGroupBox Header="列表組" >

<Fluent:Gallery>

<Image Source="Images\RedLarge.png" Stretch="None" />

<Image Source="Images\GreenLarge.png"Stretch="None" />

<Image Source="Images\BlueLarge.png" Stretch="None" />

</Fluent:Gallery>

</Fluent:RibbonGroupBox>

其顯示效果如圖

ColorGallery控件

用於實現顏色的選擇控件,其繼承自Gallery

<Fluent:ColorGallery Mode="StandardColors" SelectedColor="{Binding ColorViewModel.StandardColor, Mode=TwoWay}" />

其顯示效果如圖

Spinner控件

<Fluent:Spinner KeyTip="KA"

InputWidth="75"

Format="0 px"

Header="數值:"

Icon="Images/Warning.png"

/>

其顯示效果如圖

 

還有一些不太常用的控件,可以查看源碼,細細分析。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM