Intersoft.Client.UI.Aqua Namespace : UXToolBarButton Class |
<TemplatePartAttribute(Name="FocusVisualElement", Type=System.Windows.Controls.Border)> <TemplatePartAttribute(Name="DisabledVisualElement", Type=System.Windows.Controls.Border)> <TemplateVisualStateAttribute(Name="DropdownButton", GroupName="DisplayTypeStates")> <TemplateVisualStateAttribute(GroupName="CommonStates", Name="SplitButtonPressed")> <TemplateVisualStateAttribute(GroupName="DisplayTypeStates", Name="SplitButton")> <TemplatePartAttribute(Name="ContentPresenter", Type=Intersoft.Client.UI.Controls.StylishLabel)> <TemplatePartAttribute(Name="Background", Type=System.Windows.Controls.Border)> <TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")> <TemplatePartAttribute(Name="Glass", Type=System.Windows.Controls.Border)> <TemplatePartAttribute(Name="KeyboardFocus", Type=System.Windows.Shapes.Rectangle)> <TemplatePartAttribute(Name="OuterBorder", Type=System.Windows.Controls.Border)> <TemplatePartAttribute(Name="InnerBorder", Type=System.Windows.Controls.Border)> <TemplatePartAttribute(Name="SplitElement", Type=System.Windows.Controls.Grid)> <TemplateVisualStateAttribute(GroupName="CommonStates", Name="Pressed")> <TemplateVisualStateAttribute(GroupName="CommonStates", Name="Checked")> <TemplateVisualStateAttribute(GroupName="CommonStates", Name="Normal")> <TemplateVisualStateAttribute(GroupName="CommonStates", Name="MouseOver")> <DescriptionAttribute("Represents a button control that can be hosted in ToolBar or ToolGroup. Supports various display mode and button type for easy configuration.")> <TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")> <TemplateVisualStateAttribute(GroupName="DisplayTypeStates", Name="Button")> <TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)> <TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")> <ContentPropertyAttribute("Items")> <StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXMenuItem)> Public Class UXToolBarButton Inherits UXSplitButton Implements Intersoft.Client.Framework.IControl, Intersoft.Client.Framework.IFramework, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.INavigationSource, Intersoft.Client.Framework.INavigationSupport, Intersoft.Client.Framework.Input.ICommandSource, Intersoft.Client.Framework.Input.IKeyboardFocus
Dim instance As UXToolBarButton
[TemplatePartAttribute(Name="FocusVisualElement", Type=System.Windows.Controls.Border)] [TemplatePartAttribute(Name="DisabledVisualElement", Type=System.Windows.Controls.Border)] [TemplateVisualStateAttribute(Name="DropdownButton", GroupName="DisplayTypeStates")] [TemplateVisualStateAttribute(GroupName="CommonStates", Name="SplitButtonPressed")] [TemplateVisualStateAttribute(GroupName="DisplayTypeStates", Name="SplitButton")] [TemplatePartAttribute(Name="ContentPresenter", Type=Intersoft.Client.UI.Controls.StylishLabel)] [TemplatePartAttribute(Name="Background", Type=System.Windows.Controls.Border)] [TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")] [TemplatePartAttribute(Name="Glass", Type=System.Windows.Controls.Border)] [TemplatePartAttribute(Name="KeyboardFocus", Type=System.Windows.Shapes.Rectangle)] [TemplatePartAttribute(Name="OuterBorder", Type=System.Windows.Controls.Border)] [TemplatePartAttribute(Name="InnerBorder", Type=System.Windows.Controls.Border)] [TemplatePartAttribute(Name="SplitElement", Type=System.Windows.Controls.Grid)] [TemplateVisualStateAttribute(GroupName="CommonStates", Name="Pressed")] [TemplateVisualStateAttribute(GroupName="CommonStates", Name="Checked")] [TemplateVisualStateAttribute(GroupName="CommonStates", Name="Normal")] [TemplateVisualStateAttribute(GroupName="CommonStates", Name="MouseOver")] [DescriptionAttribute("Represents a button control that can be hosted in ToolBar or ToolGroup. Supports various display mode and button type for easy configuration.")] [TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")] [TemplateVisualStateAttribute(GroupName="DisplayTypeStates", Name="Button")] [TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)] [TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")] [ContentPropertyAttribute("Items")] [StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXMenuItem)] public class UXToolBarButton : UXSplitButton, Intersoft.Client.Framework.IControl, Intersoft.Client.Framework.IFramework, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.INavigationSource, Intersoft.Client.Framework.INavigationSupport, Intersoft.Client.Framework.Input.ICommandSource, Intersoft.Client.Framework.Input.IKeyboardFocus
[TemplatePartAttribute(Name="FocusVisualElement", Type=System.Windows.Controls.Border)] [TemplatePartAttribute(Name="DisabledVisualElement", Type=System.Windows.Controls.Border)] [TemplateVisualStateAttribute(Name="DropdownButton", GroupName="DisplayTypeStates")] [TemplateVisualStateAttribute(GroupName="CommonStates", Name="SplitButtonPressed")] [TemplateVisualStateAttribute(GroupName="DisplayTypeStates", Name="SplitButton")] [TemplatePartAttribute(Name="ContentPresenter", Type=Intersoft.Client.UI.Controls.StylishLabel)] [TemplatePartAttribute(Name="Background", Type=System.Windows.Controls.Border)] [TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")] [TemplatePartAttribute(Name="Glass", Type=System.Windows.Controls.Border)] [TemplatePartAttribute(Name="KeyboardFocus", Type=System.Windows.Shapes.Rectangle)] [TemplatePartAttribute(Name="OuterBorder", Type=System.Windows.Controls.Border)] [TemplatePartAttribute(Name="InnerBorder", Type=System.Windows.Controls.Border)] [TemplatePartAttribute(Name="SplitElement", Type=System.Windows.Controls.Grid)] [TemplateVisualStateAttribute(GroupName="CommonStates", Name="Pressed")] [TemplateVisualStateAttribute(GroupName="CommonStates", Name="Checked")] [TemplateVisualStateAttribute(GroupName="CommonStates", Name="Normal")] [TemplateVisualStateAttribute(GroupName="CommonStates", Name="MouseOver")] [DescriptionAttribute("Represents a button control that can be hosted in ToolBar or ToolGroup. Supports various display mode and button type for easy configuration.")] [TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")] [TemplateVisualStateAttribute(GroupName="DisplayTypeStates", Name="Button")] [TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)] [TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")] [ContentPropertyAttribute("Items")] [StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXMenuItem)] public ref class UXToolBarButton : public UXSplitButton, Intersoft.Client.Framework.IControl, Intersoft.Client.Framework.IFramework, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.INavigationSource, Intersoft.Client.Framework.INavigationSupport, Intersoft.Client.Framework.Input.ICommandSource, Intersoft.Client.Framework.Input.IKeyboardFocus
Since UXToolBarButton implements Button model, it exposes many of the features available in UXButton, such as ImageContent presentation model, default and cancel button, dialog result, commanding, MVVM pattern, navigation, and more. To learn about the common features of the button, see UXButton Overview.
As the result of the hybrid content model implementation, UXToolBarButton provides four types of button that you can apply through ButtonType property, such as discussed in the following.
The following example shows how to create a UXToolBar that contains several buttons that use Button, DropdownButton, SplitButton and Custom type.
XAML |
Copy Code
|
---|---|
<Intersoft:UXToolBar> <Intersoft:UXToolGroup> <Intersoft:UXToolBarButton Content="Save Changes" DisplayMode="ContentAndImage" Icon="/Assets/Images/Commands/Save.png" Command="{Binding Path=SaveCommand}" /> <Intersoft:UXToolBarButton Content="Cancel" DisplayMode="ContentAndImage" Icon="/Assets/Images/Commands/Cancel.png"/> <Intersoft:UXToolBarButton ButtonType="Custom"> <Intersoft:UXToolBarButton.Content> <Intersoft:UXComboBox Width="120" /> </Intersoft:UXToolBarButton.Content> </Intersoft:UXToolBarButton> </Intersoft:UXToolGroup> <Intersoft:UXToolGroup Placement="RightOrBottom"> <Intersoft:UXToolBarButton ButtonType="SplitButton" Content="Send Email" DisplayMode="ContentAndImage" Icon="/Assets/Images/Commands/NewMessage.png"> <Intersoft:UXMenuItem Header="Send via Gmail" Icon="/Assets/Images/Commands/Gmail.png" /> <Intersoft:UXMenuItem Header="Send via Facebook" Icon="/Assets/Images/Commands/Facebook16.png" /> </Intersoft:UXToolBarButton> <Intersoft:UXSeparator/> <Intersoft:UXToolBarButton Content="More Actions" ButtonType="DropdownButton"> <Intersoft:UXMenuItem Header="Schedule a meeting" /> </Intersoft:UXToolBarButton> </Intersoft:UXToolGroup> </Intersoft:UXToolBar> |
The following illustration shows the UI example of each button type.
For more information about UXToolBar and its features, see UXToolBar Overview.
System.Object
System.Windows.DependencyObject
System.Windows.UIElement
System.Windows.FrameworkElement
System.Windows.Controls.Control
System.Windows.Controls.ContentControl
System.Windows.Controls.Primitives.ButtonBase
System.Windows.Controls.Button
Intersoft.Client.Framework.ISButton
Intersoft.Client.UI.Aqua.UXButton
Intersoft.Client.UI.Aqua.UXButtonItems
Intersoft.Client.UI.Aqua.UXDropDownButton
Intersoft.Client.UI.Aqua.UXSplitButton
Intersoft.Client.UI.Aqua.UXToolBarButton
Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonToolBarButton
Intersoft.Client.UI.ScheduleView.UXScheduleViewHeaderButton
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2