Intersoft ClientUI Documentation
ButtonType Property
See Also  Send Feedback
Intersoft.Client.UI.Aqua Namespace > UXToolBarButton Class : ButtonType Property






Gets or sets whether button should be command button, dropdown button, or a split button.

Syntax

Visual Basic (Declaration) 
<CategoryAttribute("Common Properties")>
Public Property ButtonType As ButtonType
Visual Basic (Usage)Copy Code
Dim instance As UXToolBarButton
Dim value As ButtonType
 
instance.ButtonType = value
 
value = instance.ButtonType
C# 
[CategoryAttribute("Common Properties")]
public ButtonType ButtonType {get; set;}
Delphi 
public read-write property ButtonType: ButtonType; 
JScript 
CategoryAttribute("Common Properties")
public function get,set ButtonType : ButtonType
Managed Extensions for C++ 
[CategoryAttribute("Common Properties")]
public: __property ButtonType get_ButtonType();
public: __property void set_ButtonType( 
   ButtonType value
);
C++/CLI 
[CategoryAttribute("Common Properties")]
public:
property ButtonType ButtonType {
   ButtonType get();
   void set (    ButtonType value);
}

Remarks

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.

  • Button
    Represents a standard command button.
     
  • DropdownButton
    Represents a button that displays dropdown menu when clicked, which can contain a collection of menu items and nested menu items similar to UXContextMenu.
     
  • SplitButton
    Represents a combination of command button and a dropdown menu. This type of button typically provides users with a default command that executed when the command part of the button is clicked, while at the same time allowing users to choose alternative commands through the dropdown arrow. Similar to the DropdownButton, you can also define a collection of menu items and nested menu items as in UXContextMenu.
     
  • Custom
    Represents a custom button that can be used to contain any UIElement or controls. With this type, the default layout properties such as margin and padding as well as the UI behaviors would be disabled. Consequently, this type is ideal to host custom controls such as text box, combo box, date picker and others.
     

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.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.