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

    The C1ToolbarDropDown control represents a drop-down button on the C1ToolbarStrip. When clicking it displays popup panel with Content property or context menu set by Menu property. A drop-down button provides users with a list of options. When you click on a C1ToolBarDropDown button the Click event always fires and the drop down list appears.



    Example 1: Drop-down with popup stack panel with buttons

    Copy Code
    <c1:C1ToolbarDropDown Padding="2" Header="Color">
         <StackPanel Margin="2" Orientation="Horizontal">
           <Button Margin="2" Content="Red" Foreground="Red" />
           <Button Margin="2" Content="Green" Foreground="Green" />
           <Button Margin="2" Content="Blue" Foreground="Blue" />



    Example 2: Dropdown with popup menu

    Copy Code
    <c1:C1Toolbar Name="c1Toolbar1" Margin="0,127,0,160">
       <c1:C1ToolbarDropDown Padding="2" Header="Color">
              <MenuItem Foreground="Red" Header="Red" IsCheckable="True" />
              <MenuItem Foreground="Green" Header="Green" IsCheckable="True" />
              <MenuItem Foreground="Blue" Header="Blue" IsCheckable="True" />

     The C1ToolBarDropDown includes the following unique properties:





    Gets or sets the content background.


    Gets or sets the context menu which is displayed when the control is clicked.


    Gets or sets the Brush used to highlight the control when it has the mouse over.


    Gets or sets the Brush used to paint a button when it is pressed.