Componentone Toolbar for WPF and Silverlight
Toolbar Elements / Toolbar Item
In This Topic
    Toolbar Item
    In This Topic

    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.

    Copy Code
    <c1:C1SimplifiedRibbon FontSize="14">
          <c1:C1SimplifiedTabItem Header="Home">
                    <c1:C1SimplifiedRibbonGroup VerticalContentAlignment="Center" Header="Scale">
                        <c1:C1ToolbarItem Command="{StaticResource cmdZoomOriginal}" Content=" 1:1">
                                <c1:C1BitmapIcon Source="/SimplifiedRibbon;component/Resources/zoom_original32.png" Width="32" Height="32" />
                                <c1:C1BitmapIcon Source="/SimplifiedRibbon;component/Resources/zoom_original16.png" Width="16" Height="16" />