Class DropDownButtonAdv
Represents the DropDownButtonAdv Control.
Namespace: Syncfusion.Windows.Tools.Controls
Assembly: Syncfusion.Shared.Wpf.dll
Syntax
[SkinType(SkinVisualStyle = Skin.VS2010, Type = typeof(DropDownButtonAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/VS2010Style.xaml")]
[TemplateVisualState(GroupName = "RibbonButtonStates", Name = "MouseOver")]
[TemplateVisualState(GroupName = "RibbonButtonStates", Name = "Disabled")]
[SkinType(SkinVisualStyle = Skin.Office2007Blue, Type = typeof(DropDownButtonAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/Office2007BlueStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2007Black, Type = typeof(DropDownButtonAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/Office2007BlackStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2007Silver, Type = typeof(DropDownButtonAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/Office2007SilverStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2010Blue, Type = typeof(DropDownButtonAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/Office2010BlueStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2010Black, Type = typeof(DropDownButtonAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/Office2010BlackStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2010Silver, Type = typeof(DropDownButtonAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/Office2010SilverStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Blend, Type = typeof(DropDownButtonAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/BlendStyle.xaml")]
[TemplateVisualState(GroupName = "RibbonButtonStates", Name = "Normal")]
[SkinType(SkinVisualStyle = Skin.ShinyRed, Type = typeof(DropDownButtonAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/ShinyRedStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.ShinyBlue, Type = typeof(DropDownButtonAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/ShinyBlueStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Default, Type = typeof(DropDownButtonAdv), XamlResource = "/Syncfusion.Shared.WPF;component/Controls/ButtonControls/DropDownButton/Themes/DropDownButton.xaml")]
[SkinType(SkinVisualStyle = Skin.Metro, Type = typeof(DropDownButtonAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/MetroStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Transparent, Type = typeof(DropDownButtonAdv), XamlResource = "pack://application:,,,/Syncfusion.Shared.Wpf.Classic;component/Controls/ButtonControls/DropDownButton/Themes/TransparentStyle.xaml")]
[TemplateVisualState(GroupName = "RibbonButtonStates", Name = "Pressed")]
public class DropDownButtonAdv : ContentControl, IButtonAdv, IDisposable
Constructors
DropDownButtonAdv()
Initializes a new instance of the DropDownButtonAdv class.
Declaration
public DropDownButtonAdv()
Fields
DropDirectionProperty
Using a DependencyProperty as the backing store for DropDirection.
Declaration
public static readonly DependencyProperty DropDirectionProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IconHeightProperty
Using a DependencyProperty as the backing store for IconHeight.
Declaration
public static readonly DependencyProperty IconHeightProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IconTemplateProperty
Identifies the IconTemplate dependency property.
Declaration
public static readonly DependencyProperty IconTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the IconTemplate dependency property.
IconTemplateSelectorProperty
Identifies the IconTemplateSelector dependency property.
Declaration
public static readonly DependencyProperty IconTemplateSelectorProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the IconTemplateSelector dependency property.
IconWidthProperty
Using a DependencyProperty as the backing store for IconWidth.
Declaration
public static readonly DependencyProperty IconWidthProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsDropDownOpenProperty
Using a DependencyProperty as the backing store for IsDropDownOpen.
Declaration
public static readonly DependencyProperty IsDropDownOpenProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsMultiLineProperty
Using a DependencyProperty as the backing store for IsMultiLine.
Declaration
public static readonly DependencyProperty IsMultiLineProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
isopened
get the isopen value
Declaration
protected bool isopened
Field Value
Type |
---|
System.Boolean |
IsPressedProperty
Using a DependencyProperty as the backing store for IsPressed.
Declaration
public static readonly DependencyProperty IsPressedProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LabelProperty
Using a DependencyProperty as the backing store for Label.
Declaration
public static readonly DependencyProperty LabelProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LargeIconProperty
Using a DependencyProperty as the backing store for LargeIcon.
Declaration
public static readonly DependencyProperty LargeIconProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SizeModeProperty
Using a DependencyProperty as the backing store for SizeMode.
Declaration
public static readonly DependencyProperty SizeModeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SmallIconProperty
Using a DependencyProperty as the backing store for SmallIcon.
Declaration
public static readonly DependencyProperty SmallIconProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
StayDropDownOnClickProperty
Using a DependencyProperty as the backing store for StayPopupOpenOnSelect.
Declaration
public static readonly DependencyProperty StayDropDownOnClickProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
StaysOpenProperty
Using a DependencyProperty as the backing store for StaysOpen.
Declaration
public static readonly DependencyProperty StaysOpenProperty
Field Value
Type | Description |
---|---|
System.Windows.DependencyProperty | The Stay Open.The defult value is false. |
Properties
DropDirection
Gets or sets the drop direction.
Declaration
public DropDirection DropDirection { get; set; }
Property Value
Type | Description |
---|---|
DropDirection | The drop direction.The defult value is BottomLeft. |
IconHeight
Sets the IconHeight.
Declaration
public double IconHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The Icon Height.The default value is 0.0. |
IconTemplate
Gets or sets the template that used to display the icon of DropDownButtonAdv.
Declaration
public DataTemplate IconTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.DataTemplate | The System.Windows.DataTemplate is used to display an icon in DropDownButtonAdv. |
Remarks
IconTemplate inherits its parent DataContext. DropDownButtonAdv exposes IconTemplateSelector, IconTemplate, LargeIcon, SmallIcon properties for setting the Icon. It loads icon in the following priority order,
IconTemplateSelector
Gets or sets a System.Windows.Controls.DataTemplateSelector that determines the template to use to display icon in a DropDownButtonAdv based on SizeMode.
Declaration
public DataTemplateSelector IconTemplateSelector { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Controls.DataTemplateSelector | A custom System.Windows.Controls.DataTemplateSelector selector object that provides logic to choose a System.Windows.DataTemplate to be returned. The default is null. |
Remarks
DropDownButtonAdv exposes IconTemplateSelector, IconTemplate, LargeIcon, SmallIcon properties for setting the Icon. It loads icon in the following priority order,
IconWidth
Sets the IconWidth.
Declaration
public double IconWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The Icon Width.The default value is 0.0. |
IsDropDownOpen
Gets or sets a value indicating whether this instance is drop down open.
Declaration
public bool IsDropDownOpen { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsMultiLine
Gets or sets a value indicating whether this instance is multi line.
Declaration
public bool IsMultiLine { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsPressed
Gets or sets a value indicating whether this instance is pressed.
Declaration
public bool IsPressed { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Label
Gets or sets the label.
Declaration
public string Label { get; set; }
Property Value
Type | Description |
---|---|
System.String | The label.The default value is null |
LargeIcon
Gets or sets the large icon.
Declaration
public ImageSource LargeIcon { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.ImageSource | The large icon.The default value is null. |
SizeMode
Gets or sets the size mode.
Declaration
public SizeMode SizeMode { get; set; }
Property Value
Type | Description |
---|---|
SizeMode | The size mode.The default value is Normal. |
SmallIcon
Gets or sets the small icon.
Declaration
public ImageSource SmallIcon { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.ImageSource | The small icon.The default value is null. |
StayDropDownOnClick
Get or Set DropDown open state while inside item is Clicked
Declaration
public bool StayDropDownOnClick { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The Stay DropDown on Click.The defult value is false. |
StaysOpen
Get or Set StaysOpen
Declaration
public bool StaysOpen { get; set; }
Property Value
Type |
---|
System.Boolean |
Methods
Dispose()
Dispose Events of Dropdown button control
Declaration
public void Dispose()
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call System.Windows.Controls.Control.ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.
Declaration
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Automation of Dropdown button Control
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type |
---|
System.Windows.Automation.Peers.AutomationPeer |
OnKeyDown(KeyEventArgs)
Invoked when an unhandled System.Windows.UIElement.KeyDown routed event is raised on this element. Implement this method to add class handling for this event.
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.KeyEventArgs | e | The System.Windows.Input.KeyEventArgs that contains the event data. Invoked when the key down |
OnMouseLeftButtonDown(MouseButtonEventArgs)
Invoked when an unhandled System.Windows.Element.MouseLeftButtonDown routed event is raised on this element. Implement this method to add class handling for this event.
Declaration
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was pressed. |
OnMouseLeftButtonUp(MouseButtonEventArgs)
Invoked when an unhandled System.Windows.Element.MouseLeftButtonUp routed event is raised on this element. Implement this method to add class handling for this event.
Declaration
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | Event that occurs when the left mouse button is released while the mouse pointer is over this control |
OnMouseWheel(MouseWheelEventArgs)
Invoked when an unhandled System.Windows.UIElement.MouseWheel routed event is raised on this element. Implement this method to add class handling for this event.
Declaration
protected override void OnMouseWheel(MouseWheelEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseWheelEventArgs | e | The System.Windows.Input.MouseWheelEventArgs that contains the event data. Invoked when the mouse wheel rotates over the DropDownButtonAdv |
UpdatePopupPlacement(Size, Size, Point)
Method to update the drop direction of Dropdown button control
Declaration
public CustomPopupPlacement[] UpdatePopupPlacement(Size popupSize, Size targetSize, Point offset)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Size | popupSize | |
System.Windows.Size | targetSize | |
System.Windows.Point | offset |
Returns
Type |
---|
System.Windows.Controls.Primitives.CustomPopupPlacement[] |
UpdateSize()
Method to update the drop down button control structure according to the size modes
Declaration
public void UpdateSize()
Events
DropDownClosed
Occurs when drop down button is [drop down closed].
Declaration
public event RoutedEventHandler DropDownClosed
Event Type
Type |
---|
System.Windows.RoutedEventHandler |
DropDownClosing
Occurs when drop down button is [drop down closing].
Declaration
public event CancelEventHandler DropDownClosing
Event Type
Type |
---|
System.ComponentModel.CancelEventHandler |
DropDownOpened
Occurs when drop down button is [drop down opened].
Declaration
public event RoutedEventHandler DropDownOpened
Event Type
Type |
---|
System.Windows.RoutedEventHandler |
DropDownOpening
Occurs when drop down button is [drop down opening].
Declaration
public event CancelEventHandler DropDownOpening
Event Type
Type |
---|
System.ComponentModel.CancelEventHandler |