[]
        
(Showing Draft Content)

C1.WPF.Toolbar.C1ToolbarDropDown

C1ToolbarDropDown Class

C1ToolbarDropDown control represents a drop-down button on the C1ToobarStrip. When clicking it displays popup panel with Content property or context menu set by Menu property.

Inheritance
C1ToolbarDropDown
Namespace: C1.WPF.Toolbar
Assembly: C1.WPF.Toolbar.4.6.2.dll
Syntax
[TemplatePart(Name = "VerticalTemplate", Type = typeof(Grid))]
[TemplatePart(Name = "HorizontalTemplate", Type = typeof(Grid))]
public class C1ToolbarDropDown : C1DropDown
Remarks
<example>

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

>
            <c1:C1ToolbarDropDown Padding="2" Header="Color">
              <c1:C1ToolbarDropDown.Content>
                <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" />
                </StackPanel>
              </c1:C1ToolbarDropDown.Content>
            </c1:C1ToolbarDropDown>

Example 2. Dropdown with popup menu.

>
            <c1:C1ToolbarDropDown Padding="2" Header="Color">
              <c1:C1ToolbarDropDown.Menu>
                <c1:C1ContextMenu>
                  <c1:C1MenuItem IsCheckable="True" Header="Red" HeaderForeground="Red" />
                  <c1:C1MenuItem IsCheckable="True" Header="Green" HeaderForeground="Green" />
                  <c1:C1MenuItem IsCheckable="True" Header="Blue" HeaderForeground="Blue" />
                </c1:C1ContextMenu>
              </c1:C1ToolbarDropDown.Menu>
            </c1:C1ToolbarDropDown>

Constructors

Name Description
C1ToolbarDropDown()

Initializes a new instance of a C1ToolbarDropDown.

Fields

Name Description
ContentBackgroundProperty

Identifies the ContentBackground dependency property.

LabelTitleProperty

Using a DependencyProperty as the backing store for LabelTitle.
This enables animation, styling, binding, etc...

LargeImageSourceProperty

Using a DependencyProperty as the backing store for LargeImageSource. This enables animation, styling, binding, etc...

MenuProperty

Identifies the Menu dependency property.

MouseOverBrushProperty

Identifies the MouseOverBrush dependency property.

PressedBrushProperty

Identifies the PressedBrush dependency property.

SmallImageSourceProperty

Using a DependencyProperty as the backing store for SmallImageSource.
This enables animation, styling, binding, etc...

Properties

Name Description
ContentBackground

Gets or sets the content background.

LabelTitle

Gets or sets the label title of control.

LargeImageSource

Gets or sets the large image source of the control.

Menu

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

MouseOverBrush

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

PressedBrush

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

SmallImageSource

Gets or sets the small image source of the control.

Methods

Name Description
MeasureOverride(Size)

Called when measuring a control.

OnApplyTemplate()

Builds the visual tree for the C1ToolbarDropDown control when a new template is applied.

UpdateHeaderPresenter()