Category / Section
How to set the size for ribbon items in WPF Ribbon control?
1 min read
You can set the size of the RibbonButton, SplitButton and DropDownButton control by using SizeForm property inside the WPF Ribbon control.
The possible values of SizeForm are Large, Small and ExtraSmall.
XAML
<syncfusion:Ribbon x:Name="ribbon" VerticalAlignment="Top" > <syncfusion:RibbonTab Name="tab" Caption="Home" IsChecked="False"> <syncfusion:RibbonBar Header="Respond"> <syncfusion:RibbonButton Name="replyRibbonButton" LargeIcon="\Image\reply.jpg" SizeForm="Large" Label="Reply"/> <syncfusion:RibbonButton SmallIcon="\Image\replyall.jpg" SizeForm="Small" Label="ReplyAll"/> <syncfusion:ButtonPanel> <syncfusion:RibbonButton SmallIcon="\Image\new mail1.jpg" ToolTip="ExtraSmall" SizeForm="ExtraSmall" Label="NewMail"/> <syncfusion:RibbonButton SmallIcon="\Image\inbox.jpg" ToolTip="ExtraSmall" SizeForm="ExtraSmall" Label="Inbox"/> <syncfusion:RibbonButton SmallIcon="\Image\delete.jpg" ToolTip="ExtraSmall" SizeForm="ExtraSmall" Label="Delete"/> </syncfusion:ButtonPanel> <syncfusion:SplitButton SmallIcon="\Image\forward.jpg" SizeForm="Small" Label="Forward"/> <syncfusion:DropDownButton LargeIcon="\Image\cancel.jpg" SizeForm="Large" Label="Cancel"/> </syncfusion:RibbonBar> </syncfusion:RibbonTab> <syncfusion:RibbonTab Caption="Send/Receive" IsChecked="False"> <syncfusion:RibbonBar Header="Download"> <syncfusion:RibbonButton SizeForm="Small" Label="Show Progress"/> <syncfusion:RibbonButton SizeForm="Small" Label="CancelAll"/> <syncfusion:RibbonButton SizeForm="Large" Label="Download Headers"/> <syncfusion:DropDownButton SizeForm="Large" Label="Mark to Download"/> </syncfusion:RibbonBar> </syncfusion:RibbonTab> </syncfusion:Ribbon>
C#
replyRibbonButton.SizeForm = Syncfusion.Windows.Tools.SizeForm.Large;
The above code example is used to set the SizeForm for the Ribbon control and the screenshot is as follows.