1. add datagrid style 2. improve the numericupdown 3. add checkbox style 4. add listbox demo 5. add treeview demo 6. add border demo 7. remove angle property of iconelement 8. add menu demo
112 lines
12 KiB
XML
112 lines
12 KiB
XML
<UserControl x:Class="HandyControlDemo.UserControl.ToggleButtonDemoCtl"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Background="White"
|
|
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
|
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
|
<controls:TransitioningContentControl>
|
|
<controls:ScrollViewer IsEnableInertia="True">
|
|
<StackPanel Margin="32">
|
|
<WrapPanel ItemWidth="160" ItemHeight="130">
|
|
<StackPanel>
|
|
<ToggleButton IsChecked="True" Content="{x:Static langs:Lang.Default}" Margin="5"/>
|
|
<ToggleButton IsEnabled="False" IsChecked="True" Content="{x:Static langs:Lang.Default}" Margin="5"/>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<ToggleButton IsChecked="True" Content="{x:Static langs:Lang.Primary}" Margin="5" controls:IconElement.Geometry="{StaticResource ClockGeometry}" Style="{StaticResource ToggleButtonPrimary}"/>
|
|
<ToggleButton IsEnabled="False" IsChecked="True" Content="{x:Static langs:Lang.Primary}" Margin="5" Style="{StaticResource ToggleButtonPrimary}"/>
|
|
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ToggleButtonPrimary"/>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<ToggleButton IsChecked="True" Content="{x:Static langs:Lang.Success}" Margin="5" controls:IconElement.Geometry="{StaticResource CalendarGeometry}" Style="{StaticResource ToggleButtonSuccess}"/>
|
|
<ToggleButton IsEnabled="False" IsChecked="True" Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource ToggleButtonSuccess}"/>
|
|
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ToggleButtonSuccess"/>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<ToggleButton Content="{x:Static langs:Lang.Info}" Margin="5" Style="{StaticResource ToggleButtonInfo}"/>
|
|
<ToggleButton IsEnabled="False" Content="{x:Static langs:Lang.Info}" Margin="5" Style="{StaticResource ToggleButtonInfo}"/>
|
|
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ToggleButtonInfo"/>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<ToggleButton Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ToggleButtonWarning}"/>
|
|
<ToggleButton IsEnabled="False" Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ToggleButtonWarning}"/>
|
|
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ToggleButtonWarning"/>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<ToggleButton Content="{x:Static langs:Lang.Danger}" Margin="5" Style="{StaticResource ToggleButtonDanger}"/>
|
|
<ToggleButton IsEnabled="False" Content="{x:Static langs:Lang.Danger}" Margin="5" Style="{StaticResource ToggleButtonDanger}"/>
|
|
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ToggleButtonDanger"/>
|
|
</StackPanel>
|
|
</WrapPanel>
|
|
<WrapPanel ItemWidth="160" ItemHeight="130">
|
|
<StackPanel>
|
|
<ToggleButton Margin="5" Style="{StaticResource ToggleButtonIcon}" controls:IconSwitchElement.Geometry="{StaticResource DeleteGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource DownGeometry}"/>
|
|
<ToggleButton IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonIcon}" controls:IconSwitchElement.Geometry="{StaticResource DeleteGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource DownGeometry}"/>
|
|
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ToggleButtonIcon"/>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<ToggleButton Margin="5" Style="{StaticResource ToggleButtonIconPrimary}" controls:IconSwitchElement.Geometry="{StaticResource DeleteGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource DownGeometry}"/>
|
|
<ToggleButton IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonIconPrimary}" controls:IconSwitchElement.Geometry="{StaticResource DeleteGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource DownGeometry}"/>
|
|
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ToggleButtonIconPrimary"/>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<ToggleButton Margin="5" Style="{StaticResource ToggleButtonIconSuccess}" controls:IconSwitchElement.Geometry="{StaticResource DeleteGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource DownGeometry}"/>
|
|
<ToggleButton IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonIconSuccess}" controls:IconSwitchElement.Geometry="{StaticResource DeleteGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource DownGeometry}"/>
|
|
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ToggleButtonIconSuccess"/>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<ToggleButton Margin="5" Style="{StaticResource ToggleButtonIconInfo}" controls:IconSwitchElement.Geometry="{StaticResource DeleteGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource DownGeometry}"/>
|
|
<ToggleButton IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonIconInfo}" controls:IconSwitchElement.Geometry="{StaticResource DeleteGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource DownGeometry}"/>
|
|
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ToggleButtonIconInfo"/>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<ToggleButton Margin="5" Style="{StaticResource ToggleButtonIconWarning}" controls:IconSwitchElement.Geometry="{StaticResource DeleteGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource DownGeometry}"/>
|
|
<ToggleButton IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonIconWarning}" controls:IconSwitchElement.Geometry="{StaticResource DeleteGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource DownGeometry}"/>
|
|
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ToggleButtonIconWarning"/>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<ToggleButton Margin="5" Style="{StaticResource ToggleButtonIconDanger}" controls:IconSwitchElement.Geometry="{StaticResource DeleteGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource DownGeometry}"/>
|
|
<ToggleButton IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonIconDanger}" controls:IconSwitchElement.Geometry="{StaticResource DeleteGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource DownGeometry}"/>
|
|
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ToggleButtonIconDanger"/>
|
|
</StackPanel>
|
|
</WrapPanel>
|
|
<WrapPanel ItemWidth="160" ItemHeight="130">
|
|
<StackPanel>
|
|
<ToggleButton Margin="5" Style="{StaticResource ToggleButtonIconTransparent}" controls:IconSwitchElement.Geometry="{StaticResource DeleteGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource DownGeometry}"/>
|
|
<ToggleButton IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonIconTransparent}" controls:IconSwitchElement.Geometry="{StaticResource DeleteGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource DownGeometry}"/>
|
|
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ToggleButtonIconTransparent"/>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<ToggleButton IsChecked="True" Style="{StaticResource ToggleButtonCustom}" controls:StatusSwitchElement.HiddenElement="True">
|
|
<controls:StatusSwitchElement.CheckedElement>
|
|
<Border Width="80" Height="30" CornerRadius="4" BorderThickness="1" BorderBrush="{StaticResource BorderBrush}" Margin="5">
|
|
<Ellipse Width="20" Height="20" Fill="{StaticResource PrimaryBrush}" StrokeThickness="1" Stroke="{StaticResource BorderBrush}"/>
|
|
</Border>
|
|
</controls:StatusSwitchElement.CheckedElement>
|
|
<Border Width="80" Height="30" CornerRadius="4" BorderThickness="1" BorderBrush="{StaticResource BorderBrush}" Margin="5">
|
|
<Ellipse Width="20" Height="20" Fill="{StaticResource BorderBrush}" StrokeThickness="1" Stroke="{StaticResource BorderBrush}"/>
|
|
</Border>
|
|
</ToggleButton>
|
|
<ToggleButton IsEnabled="False" IsChecked="True" Style="{StaticResource ToggleButtonCustom}" controls:StatusSwitchElement.HiddenElement="True">
|
|
<controls:StatusSwitchElement.CheckedElement>
|
|
<Border Width="80" Height="30" CornerRadius="4" BorderThickness="1" BorderBrush="{StaticResource BorderBrush}" Margin="5">
|
|
<Ellipse Width="20" Height="20" Fill="{StaticResource PrimaryBrush}" StrokeThickness="1" Stroke="{StaticResource BorderBrush}"/>
|
|
</Border>
|
|
</controls:StatusSwitchElement.CheckedElement>
|
|
<Border Width="80" Height="30" CornerRadius="4" BorderThickness="1" BorderBrush="{StaticResource BorderBrush}" Margin="5">
|
|
<Ellipse Width="20" Height="20" Fill="{StaticResource BorderBrush}" StrokeThickness="1" Stroke="{StaticResource BorderBrush}"/>
|
|
</Border>
|
|
</ToggleButton>
|
|
<TextBlock TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ToggleButtonCustom"/>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<ToggleButton Height="30" IsChecked="True" Margin="5" Style="{StaticResource ToggleButtonSwitch}"/>
|
|
<ToggleButton IsEnabled="False" Height="30" IsChecked="True" Margin="5" Style="{StaticResource ToggleButtonSwitch}"/>
|
|
<TextBlock Style="{StaticResource TextBlockDefault}" Text="ToggleButtonSwitch"/>
|
|
</StackPanel>
|
|
</WrapPanel>
|
|
</StackPanel>
|
|
</controls:ScrollViewer>
|
|
</controls:TransitioningContentControl>
|
|
</UserControl>
|