Toolbar for WPF/Silverlight
ツールバー項目
ツールバーの要素 > ツールバー項目

Usually toolbar options are displayed along with the visual icons. Such options comprising text and icons can be displayed in the toolbar using the Toolbar Item element which is represented by the C1ToolbarItem class. This element lets you render icons using the C1Icon class. The icons can be rendered in three sizes, large, medium and small using the LargeIcon, MediumIcon and SmallIcon properties. The ribbon automatically determines size of the icon to be displayed depending on the collapsed state of the Toolbar or the space available to display the ToolBar.

The following code implements C1ToolbarItem to display large and medium icons for an item in Toolbar.

XAML
コードのコピー
<c1:C1SimplifiedRibbon FontSize="14">
      <c1:C1SimplifiedTabItem Header="Home">
                <c1:C1SimplifiedRibbonGroup VerticalContentAlignment="Center" Header="Scale">
                    <c1:C1SimplifiedRibbonGroup.GroupSizeDefinitions>
                        <c1:C1ToolbarGroupSizeDefinition>
                            <c1:C1ToolbarControlSize>Medium</c1:C1ToolbarControlSize>
                        </c1:C1ToolbarGroupSizeDefinition>
                    </c1:C1SimplifiedRibbonGroup.GroupSizeDefinitions>
                    <c1:C1ToolbarItem Command="{StaticResource cmdZoomOriginal}" Content=" 1:1">
                        <c1:C1ToolbarItem.LargeIcon>
                            <c1:C1BitmapIcon Source="/SimplifiedRibbon;component/Resources/zoom_original32.png" Width="32" Height="32" />
                        </c1:C1ToolbarItem.LargeIcon>
                        <c1:C1ToolbarItem.MediumIcon>
                            <c1:C1BitmapIcon Source="/SimplifiedRibbon;component/Resources/zoom_original16.png" Width="16" Height="16" />
                        </c1:C1ToolbarItem.MediumIcon>
                    </c1:C1ToolbarItem>
                </c1:C1SimplifiedRibbonGroup>
       </c1:C1SimplifiedTabItem>        
</c1:C1SimplifiedRibbon>