All the controls missing in WPF. Over 1 million downloads.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

113 lines
5.1 KiB

<!--*************************************************************************************
Extended WPF Toolkit
Copyright (C) 2007-2015 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
***********************************************************************************-->
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.Button.Views.DropDownSplitButtonView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
Title="DropDown and Split Buttons">
<local:DemoView.Description>
<Paragraph FontSize="14" FontFamily="Segoe">
<Run>The DropDownButton control is a button that when clicked displays a drop down in which you can place any custom content within.</Run>
<LineBreak />
<LineBreak />
<Run>The SplitButton control is a button that can be clicked and also provides a drop down in which you can place any custom content within.</Run>
</Paragraph>
</local:DemoView.Description>
<Grid>
<StackPanel Margin="10">
<GroupBox Header="Features"
Margin="0,5,0,5">
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Text="MaxDropDownHeight:"
VerticalAlignment="Center"/>
<xctk:DoubleUpDown x:Name="maxDropDownHeight"
Grid.Column="1"
Width="60"
Value="500"
AllowInputSpecialValues="PositiveInfinity"
Minimum="0"
VerticalAlignment="Center"
Margin="5"/>
</Grid>
</GroupBox>
<StackPanel>
<TextBlock Text="Usage:"
Style="{StaticResource Header}" />
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock Text="DropDownButton Usage:"
Style="{StaticResource Header}" />
<xctk:DropDownButton x:Name="_dropDownButton"
Grid.Row="1"
Margin="10"
Width="150"
HorizontalAlignment="Left"
Content="Click Me"
MaxDropDownHeight="{Binding Value, ElementName=maxDropDownHeight}"
Click="DropDownButton_Click">
<xctk:DropDownButton.DropDownContent>
<StackPanel>
<xctk:ColorCanvas />
<Button Click="Button_Click"
Margin="10">OK</Button>
</StackPanel>
</xctk:DropDownButton.DropDownContent>
</xctk:DropDownButton>
<TextBlock Text="SplitButton Usage:"
Grid.Column="1"
Style="{StaticResource Header}" />
<xctk:SplitButton x:Name="_splitButton"
Grid.Row="1"
Grid.Column="1"
Margin="10"
Width="150"
HorizontalAlignment="Left"
Content="Click Me"
MaxDropDownHeight="{Binding Value, ElementName=maxDropDownHeight}"
Click="SplitButton_Click">
<xctk:SplitButton.DropDownContent>
<StackPanel>
<xctk:ColorCanvas />
<Button Click="Button_Click"
Margin="10">OK</Button>
</StackPanel>
</xctk:SplitButton.DropDownContent>
</xctk:SplitButton>
</Grid>
</StackPanel>
</StackPanel>
</Grid>
</local:DemoView>