support for .NET framework 3.5
Still have bugs
This commit is contained in:
1 parent
5878039e21
commit
7d6b491f25
704 files changed
+48273
-33
No files matched your search
@@ -0,0 +1,38 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.BorderDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<UniformGrid Margin="32,32,0,0" Columns="3" Rows="2">
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow1}">
|
||||
<Border Background="{DynamicResource InfoBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow2}">
|
||||
<Border Background="{DynamicResource WarningBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow3}">
|
||||
<Border Background="{DynamicResource DangerBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow4}">
|
||||
<Border Background="{DynamicResource AccentBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow5}">
|
||||
<Border Background="{DynamicResource BorderBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Border>
|
||||
</Border>
|
||||
</UniformGrid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class BorderDemoCtl
|
||||
{
|
||||
public BorderDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.BrushDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<UniformGrid Margin="24" VerticalAlignment="Center" Columns="4" Rows="7">
|
||||
<Label Content="PrimaryBrush" Style="{StaticResource LabelPrimary}" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="DarkPrimaryBrush" Background="{DynamicResource DarkPrimaryBrush}" Foreground="White" BorderThickness="0" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
|
||||
<Label Content="DangerBrush" Style="{StaticResource LabelDanger}" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="DarkDangerBrush" Background="{DynamicResource DarkDangerBrush}" Foreground="White" BorderThickness="0" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
|
||||
<Label Content="WarningBrush" Style="{StaticResource LabelWarning}" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="DarkWarningBrush" Background="{DynamicResource DarkWarningBrush}" Foreground="White" BorderThickness="0" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
|
||||
<Label Content="InfoBrush" Style="{StaticResource LabelInfo}" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="DarkInfoBrush" Background="{DynamicResource DarkInfoBrush}" Foreground="White" BorderThickness="0" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
|
||||
<Label Content="SuccessBrush" Style="{StaticResource LabelSuccess}" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="DarkSuccessBrush" Background="{DynamicResource DarkSuccessBrush}" Foreground="White" BorderThickness="0" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
|
||||
<Label Content="AccentBrush" Background="{DynamicResource AccentBrush}" Foreground="White" BorderThickness="0" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="DarkAccentBrush" Background="{DynamicResource DarkAccentBrush}" Foreground="White" BorderThickness="0" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="PrimaryTextBrush" Background="{DynamicResource PrimaryTextBrush}" Foreground="{DynamicResource ThirdlyTextBrush}" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="SecondaryTextBrush" BorderThickness="0" Background="{DynamicResource SecondaryTextBrush}" Foreground="White" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="ThirdlyTextBrush" BorderThickness="0" Background="{DynamicResource ThirdlyTextBrush}" Foreground="White" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="ReverseTextBrush" BorderThickness="0" Background="{DynamicResource ReverseTextBrush}" Foreground="White" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="TextIconBrush" Background="{DynamicResource TextIconBrush}" Foreground="{DynamicResource ReverseTextBrush}" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="BorderBrush" BorderThickness="0" Background="{DynamicResource BorderBrush}" Foreground="{DynamicResource PrimaryTextBrush}" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="SecondaryBorderBrush" BorderThickness="0" Background="{DynamicResource SecondaryBorderBrush}" Foreground="White" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="BackgroundBrush" BorderThickness="0" Background="{DynamicResource BackgroundBrush}" Foreground="{DynamicResource ReverseTextBrush}" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="RegionBrush" Background="{DynamicResource RegionBrush}" Foreground="{DynamicResource PrimaryTextBrush}" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="SecondaryRegionBrush" BorderThickness="0" Background="{DynamicResource SecondaryRegionBrush}" Foreground="{DynamicResource PrimaryTextBrush}" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="ThirdlyRegionBrush" Background="{DynamicResource ThirdlyRegionBrush}" Foreground="{DynamicResource PrimaryTextBrush}" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="TitleBrush" BorderThickness="0" Background="{DynamicResource TitleBrush}" Foreground="White" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="DefaultBrush" Background="{DynamicResource DefaultBrush}" Foreground="{DynamicResource PrimaryTextBrush}" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="DarkDefaultBrush" BorderThickness="0" Background="{DynamicResource DarkDefaultBrush}" Foreground="{DynamicResource PrimaryTextBrush}" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="DarkMaskBrush" BorderThickness="0" Background="{DynamicResource DarkMaskBrush}" Foreground="{DynamicResource PrimaryTextBrush}" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
<Label Content="DarkOpacityBrush" BorderThickness="0" Background="{DynamicResource DarkOpacityBrush}" Foreground="White" Margin="8" HorizontalAlignment="Stretch"/>
|
||||
</UniformGrid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class BrushDemoCtl
|
||||
{
|
||||
public BrushDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.ButtonDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:ScrollViewer IsEnableInertia="True">
|
||||
<StackPanel Margin="32">
|
||||
<WrapPanel ItemWidth="160" ItemHeight="130">
|
||||
<StackPanel>
|
||||
<Button Content="{x:Static langs:Lang.Default}" Margin="5"/>
|
||||
<Button IsEnabled="False" Content="{x:Static langs:Lang.Default}" Margin="5"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<Button Content="{x:Static langs:Lang.Primary}" Margin="5" Style="{StaticResource ButtonPrimary}"/>
|
||||
<Button IsEnabled="False" Content="{x:Static langs:Lang.Primary}" Margin="5" Style="{StaticResource ButtonPrimary}"/>
|
||||
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ButtonPrimary"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<Button Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
|
||||
<Button IsEnabled="False" Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
|
||||
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ButtonSuccess"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<Button Content="{x:Static langs:Lang.Info}" Margin="5" Style="{StaticResource ButtonInfo}"/>
|
||||
<Button IsEnabled="False" Content="{x:Static langs:Lang.Info}" Margin="5" Style="{StaticResource ButtonInfo}"/>
|
||||
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ButtonInfo"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<Button Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ButtonWarning}"/>
|
||||
<Button IsEnabled="False" Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ButtonWarning}"/>
|
||||
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ButtonWarning"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<Button Content="{x:Static langs:Lang.Danger}" Margin="5" Style="{StaticResource ButtonDanger}"/>
|
||||
<Button IsEnabled="False" Content="{x:Static langs:Lang.Danger}" Margin="5" Style="{StaticResource ButtonDanger}"/>
|
||||
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ButtonDanger"/>
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemWidth="160" ItemHeight="130">
|
||||
<StackPanel>
|
||||
<Button Width="50" Padding="16,8" controls:IconElement.Height="12" controls:IconElement.Width="14" Margin="5" controls:IconElement.Geometry="{StaticResource DeleteGeometry}"/>
|
||||
<Button Width="50" Padding="16,8" controls:IconElement.Height="12" controls:IconElement.Width="14" IsEnabled="False" Margin="5" controls:IconElement.Geometry="{StaticResource DeleteGeometry}"/>
|
||||
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="Default(DeleteGeometry)"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<Button Content="{x:Static langs:Lang.Clock}" Margin="5" Style="{StaticResource ButtonPrimary}" controls:IconElement.Geometry="{StaticResource ClockGeometry}"/>
|
||||
<Button Content="{x:Static langs:Lang.Clock}" IsEnabled="False" Margin="5" Style="{StaticResource ButtonPrimary}" controls:IconElement.Geometry="{StaticResource ClockGeometry}"/>
|
||||
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonPrimary(ClockGeometry)"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<Button Content="{x:Static langs:Lang.Calendar}" Margin="5" Style="{StaticResource ButtonSuccess}" controls:IconElement.Geometry="{StaticResource CalendarGeometry}"/>
|
||||
<Button Content="{x:Static langs:Lang.Calendar}" IsEnabled="False" Margin="5" Style="{StaticResource ButtonSuccess}" controls:IconElement.Geometry="{StaticResource CalendarGeometry}"/>
|
||||
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonSuccess(CalendarGeometry)"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<Button Width="50" Padding="16,8" Margin="5" Style="{StaticResource ButtonInfo}" controls:IconElement.Geometry="{StaticResource DownGeometry}"/>
|
||||
<Button Width="50" Padding="16,8" IsEnabled="False" Margin="5" Style="{StaticResource ButtonInfo}" controls:IconElement.Geometry="{StaticResource DownGeometry}"/>
|
||||
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonInfo(DownGeometry)"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<Button Width="50" Margin="5" Style="{StaticResource ButtonWarning}" controls:IconElement.Geometry="{StaticResource LeftGeometry}"/>
|
||||
<Button Width="50" IsEnabled="False" Margin="5" Style="{StaticResource ButtonWarning}" controls:IconElement.Geometry="{StaticResource LeftGeometry}"/>
|
||||
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonWarning(LeftGeometry)"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<Button Width="50" Padding="16,8" controls:IconElement.Height="12" controls:IconElement.Width="14" Margin="5" Style="{StaticResource ButtonDanger}" controls:IconElement.Geometry="{StaticResource DeleteGeometry}"/>
|
||||
<Button Width="50" Padding="16,8" controls:IconElement.Height="12" controls:IconElement.Width="14" IsEnabled="False" Margin="5" Style="{StaticResource ButtonDanger}" controls:IconElement.Geometry="{StaticResource DeleteGeometry}"/>
|
||||
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonDanger(DeleteGeometry)"/>
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemWidth="160" ItemHeight="130">
|
||||
<StackPanel>
|
||||
<Button Margin="5" Height="28" Padding="10,0" Background="#24292e" Foreground="White" Content="{x:Static langs:Lang.ButtonOpacity}" Style="{StaticResource ButtonCustom}" controls:BackgroundSwitchElement.MouseHoverBackground="Red" controls:BackgroundSwitchElement.MouseDownBackground="PaleVioletRed"/>
|
||||
<Button Margin="5" Height="28" IsEnabled="False" Padding="10,0" Background="#24292e" Foreground="White" Content="{x:Static langs:Lang.ButtonOpacity}" Style="{StaticResource ButtonCustom}" controls:BackgroundSwitchElement.MouseHoverBackground="Red" controls:BackgroundSwitchElement.MouseDownBackground="PaleVioletRed"/>
|
||||
<TextBlock TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonCustom"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<Button Width="50" Padding="16,8" Margin="5" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource PrimaryTextBrush}" controls:IconElement.Geometry="{StaticResource UpDownGeometry}"/>
|
||||
<Button Width="50" Padding="16,8" IsEnabled="False" Margin="5" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource PrimaryTextBrush}" controls:IconElement.Geometry="{StaticResource UpDownGeometry}"/>
|
||||
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonIcon(UpDownGeometry)"/>
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</controls:ScrollViewer>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// ButtonDemoCtl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class ButtonDemoCtl
|
||||
{
|
||||
public ButtonDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.CheckBoxDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
Width="400">
|
||||
<StackPanel Margin="32" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<CheckBox Content="{x:Static langs:Lang.CheckBox}" IsChecked="True"/>
|
||||
<CheckBox Margin="0,16,0,0" Content="{x:Static langs:Lang.CheckBox}" IsChecked="True" IsEnabled="False"/>
|
||||
<CheckBox Margin="0,16,0,0" Content="{x:Static langs:Lang.CheckBox}"/>
|
||||
<CheckBox Margin="0,16,0,0" Content="{x:Static langs:Lang.CheckBox}" IsEnabled="False"/>
|
||||
<CheckBox Margin="0,16,0,0" Content="{x:Static langs:Lang.CheckBox}" IsChecked="{x:Null}"/>
|
||||
<CheckBox Margin="0,16,0,0" Content="{x:Static langs:Lang.CheckBox}" IsChecked="{x:Null}" IsEnabled="False"/>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class CheckBoxDemoCtl
|
||||
{
|
||||
public CheckBoxDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.ExpanderDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs">
|
||||
<StackPanel Margin="32" VerticalAlignment="Center">
|
||||
<Expander Header="{x:Static langs:Lang.Title}" BorderThickness="1,1,1,0" BorderBrush="{DynamicResource BorderBrush}" Width="240" HorizontalAlignment="Left">
|
||||
<Border Height="100" Background="{DynamicResource SecondaryRegionBrush}"/>
|
||||
</Expander>
|
||||
<Expander Header="{x:Static langs:Lang.Title}" BorderThickness="1,1,1,0" BorderBrush="{DynamicResource BorderBrush}" Width="240" HorizontalAlignment="Left">
|
||||
<Border Height="100" Background="{DynamicResource SecondaryRegionBrush}"/>
|
||||
</Expander>
|
||||
<Expander Header="{x:Static langs:Lang.Title}" BorderThickness="1,1,1,0" BorderBrush="{DynamicResource BorderBrush}" Width="240" HorizontalAlignment="Left">
|
||||
<Border Height="100" Background="{DynamicResource SecondaryRegionBrush}"/>
|
||||
</Expander>
|
||||
<Expander Header="{x:Static langs:Lang.Title}" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Width="240" HorizontalAlignment="Left">
|
||||
<Border Height="100" Background="{DynamicResource SecondaryRegionBrush}"/>
|
||||
</Expander>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// ExpanderDemoCtl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class ExpanderDemoCtl
|
||||
{
|
||||
public ExpanderDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.GroupBoxDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||
<ScrollViewer>
|
||||
<Grid Margin="32">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<GroupBox Grid.Row="0" Grid.Column="0" Width="300" Height="200" Header="{x:Static langs:Lang.TitleDemoStr1}" Padding="10" Margin="16">
|
||||
<Border Background="{DynamicResource PrimaryBrush}" CornerRadius="4">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</GroupBox>
|
||||
<GroupBox Grid.Row="0" Grid.Column="1" Width="300" Height="200" Header="{x:Static langs:Lang.TitleDemoStr1}" Padding="10" Margin="16" controls:TitleElement.TitleAlignment="Left">
|
||||
<Border Background="{DynamicResource PrimaryBrush}" CornerRadius="4">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</GroupBox>
|
||||
<GroupBox Grid.Row="1" Grid.Column="0" Width="300" Height="200" Header="{x:Static langs:Lang.TitleDemoStr1}" Padding="10" Margin="16" Style="{StaticResource GroupBoxTab}">
|
||||
<Border Background="{DynamicResource PrimaryBrush}" CornerRadius="4">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</GroupBox>
|
||||
<GroupBox Grid.Row="1" Grid.Column="1" Width="300" Height="200" Header="{x:Static langs:Lang.TitleDemoStr1}" Padding="10" Margin="16" Style="{StaticResource GroupBoxTab}" controls:TitleElement.TitleAlignment="Left">
|
||||
<Border Background="{DynamicResource PrimaryBrush}" CornerRadius="4">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</GroupBox>
|
||||
<GroupBox Grid.Row="2" Grid.Column="0" Width="300" Header="{x:Static langs:Lang.TitleDemoStr1}" Margin="16" Style="{StaticResource GroupBoxOriginal}" HorizontalContentAlignment="Left">
|
||||
<TextBox/>
|
||||
</GroupBox>
|
||||
<GroupBox Grid.Row="2" VerticalAlignment="Bottom" Grid.Column="1" Width="300" controls:TitleElement.TitleWidth="100" Header="{x:Static langs:Lang.TitleDemoStr1}" Margin="16" Style="{StaticResource GroupBoxOriginal}" HorizontalContentAlignment="Left" controls:TitleElement.TitleAlignment="Left">
|
||||
<ComboBox DataContext="{Binding ComboBoxDemo,Source={StaticResource Locator}}" ItemsSource="{Binding DataList}"/>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class GroupBoxDemoCtl
|
||||
{
|
||||
public GroupBoxDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.ListBoxDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<ListBox Width="200" Margin="32" ItemsSource="{Binding DataList}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class ListBoxDemoCtl
|
||||
{
|
||||
public ListBoxDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.ListViewDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<ListView ItemsSource="{Binding DataList}">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Width="80" Header="{x:Static langs:Lang.Index}" DisplayMemberBinding="{Binding Index}"/>
|
||||
<GridViewColumn Width="100" Header="{x:Static langs:Lang.Name}" DisplayMemberBinding="{Binding Name}"/>
|
||||
<GridViewColumn Width="200" Header="{x:Static langs:Lang.Remark}" DisplayMemberBinding="{Binding Remark}"/>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class ListViewDemoCtl
|
||||
{
|
||||
public ListViewDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.MenuDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<Grid Margin="32">
|
||||
<TextBlock Text="{x:Static langs:Lang.RightClickHere}" Foreground="{DynamicResource BorderBrush}" Style="{StaticResource TextBlockTitle}"/>
|
||||
<Rectangle Width="200" Height="112" RadiusX="4" RadiusY="4" Stroke="{DynamicResource BorderBrush}" StrokeDashArray="2,2"/>
|
||||
<Border Width="200" Height="112" Background="Transparent">
|
||||
<Border.ContextMenu>
|
||||
<ContextMenu ItemsSource="{Binding DataList}">
|
||||
<ContextMenu.ItemTemplate>
|
||||
<HierarchicalDataTemplate ItemsSource="{Binding DataList}">
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
</HierarchicalDataTemplate>
|
||||
</ContextMenu.ItemTemplate>
|
||||
</ContextMenu>
|
||||
</Border.ContextMenu>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class MenuDemoCtl
|
||||
{
|
||||
public MenuDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.NaiveComboBoxDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
DataContext="{Binding ComboBoxDemo,Source={StaticResource Locator}}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<ScrollViewer>
|
||||
<StackPanel Margin="32">
|
||||
<ComboBox ItemsSource="{Binding DataList}" SelectedIndex="0"/>
|
||||
<ComboBox ItemsSource="{Binding DataList}" Margin="0,16,0,0" SelectedIndex="0" IsEnabled="False"/>
|
||||
<ComboBox ItemsSource="{Binding DataList}" SelectedIndex="0" Margin="0,16,0,0" IsEditable="True"/>
|
||||
|
||||
<ComboBox ItemsSource="{Binding DataList}" SelectedIndex="0" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Style="{StaticResource ComboBoxExtend}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<ComboBox ItemsSource="{Binding DataList}" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource ComboBoxExtend}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
<ComboBox ItemsSource="{Binding DataList}" IsEditable="True" SelectedIndex="0" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Style="{StaticResource ComboBoxExtend}" Margin="0,16,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<ComboBox ItemsSource="{Binding DataList}" IsEditable="True" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource ComboBoxExtend}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
|
||||
<ComboBox ItemsSource="{Binding DataList}" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource ComboBoxExtend}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<ComboBox ItemsSource="{Binding DataList}" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" controls:InfoElement.Necessary="True" Style="{StaticResource ComboBoxExtend}" Margin="0,16,0,0"/>
|
||||
<ComboBox ItemsSource="{Binding DataList}" IsEditable="True" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource ComboBoxExtend}" Margin="0,16,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<ComboBox ItemsSource="{Binding DataList}" IsEditable="True" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" controls:InfoElement.Necessary="True" Style="{StaticResource ComboBoxExtend}" Margin="0,16,0,0"/>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class NaiveComboBoxDemoCtl
|
||||
{
|
||||
public NaiveComboBoxDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.NaivePasswordBoxDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<StackPanel Margin="32">
|
||||
<PasswordBox Password="123456"/>
|
||||
<PasswordBox Password="123456" IsEnabled="False" Margin="0,16,0,0"/>
|
||||
|
||||
<PasswordBox controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Password="123456" Margin="0,32,0,0" Style="{StaticResource PasswordBoxExtend}"/>
|
||||
<PasswordBox controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource PasswordBoxExtend}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
|
||||
<PasswordBox Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource PasswordBoxExtend}" Margin="0,32,0,0" Password="123456"/>
|
||||
<PasswordBox Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" controls:InfoElement.Necessary="True" Style="{StaticResource PasswordBoxExtend}" Margin="0,16,0,0"/>
|
||||
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class NaivePasswordBoxDemoCtl
|
||||
{
|
||||
public NaivePasswordBoxDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.NaiveScrollViewerDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
Width="550"
|
||||
Height="600">
|
||||
<Grid Margin="32">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
<Border Grid.Row="1" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Margin="0,16,0,0">
|
||||
<ScrollViewer>
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
</WrapPanel>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class NaiveScrollViewerDemoCtl
|
||||
{
|
||||
public NaiveScrollViewerDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.NaiveTabControlDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<ScrollViewer>
|
||||
<UniformGrid Rows="2" Columns="2" Margin="16">
|
||||
<TabControl Margin="16" Width="400" Height="200">
|
||||
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}1">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="{x:Static langs:Lang.Text}"/>
|
||||
<Run Text="1"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}2">
|
||||
<Border Background="{DynamicResource SuccessBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="{x:Static langs:Lang.Text}"/>
|
||||
<Run Text="2"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}3">
|
||||
<Border Background="{DynamicResource InfoBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="{x:Static langs:Lang.Text}"/>
|
||||
<Run Text="3"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}4">
|
||||
<Border Background="{DynamicResource WarningBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="{x:Static langs:Lang.Text}"/>
|
||||
<Run Text="4"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}5">
|
||||
<Border Background="{DynamicResource DangerBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="{x:Static langs:Lang.Text}"/>
|
||||
<Run Text="5"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
<TabControl Margin="16" Width="400" Height="200" Style="{StaticResource TabControlInLine}">
|
||||
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}1">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="{x:Static langs:Lang.Text}"/>
|
||||
<Run Text="1"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}2">
|
||||
<Border Background="{DynamicResource SuccessBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="{x:Static langs:Lang.Text}"/>
|
||||
<Run Text="2"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}3">
|
||||
<Border Background="{DynamicResource InfoBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="{x:Static langs:Lang.Text}"/>
|
||||
<Run Text="3"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}4">
|
||||
<Border Background="{DynamicResource WarningBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="{x:Static langs:Lang.Text}"/>
|
||||
<Run Text="4"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem IsSelected="True" Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}5">
|
||||
<Border Background="{DynamicResource DangerBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="{x:Static langs:Lang.Text}"/>
|
||||
<Run Text="5"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
<TabControl Margin="16" Width="400" Height="200" Style="{StaticResource TabControlCapsule}">
|
||||
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}1">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="{x:Static langs:Lang.Text}"/>
|
||||
<Run Text="1"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem IsSelected="True" Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}2">
|
||||
<Border Background="{DynamicResource SuccessBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="{x:Static langs:Lang.Text}"/>
|
||||
<Run Text="2"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}3">
|
||||
<Border Background="{DynamicResource InfoBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="{x:Static langs:Lang.Text}"/>
|
||||
<Run Text="3"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}4">
|
||||
<Border Background="{DynamicResource WarningBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="{x:Static langs:Lang.Text}"/>
|
||||
<Run Text="4"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}5">
|
||||
<Border Background="{DynamicResource DangerBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="{x:Static langs:Lang.Text}"/>
|
||||
<Run Text="5"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
<TabControl Margin="16" Width="400" Height="200" Style="{StaticResource TabControlCapsuleSolid}">
|
||||
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}1">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="{x:Static langs:Lang.Text}"/>
|
||||
<Run Text="1"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}2">
|
||||
<Border Background="{DynamicResource SuccessBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="{x:Static langs:Lang.Text}"/>
|
||||
<Run Text="2"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}3">
|
||||
<Border Background="{DynamicResource InfoBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="{x:Static langs:Lang.Text}"/>
|
||||
<Run Text="3"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem IsSelected="True" Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}4">
|
||||
<Border Background="{DynamicResource WarningBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="{x:Static langs:Lang.Text}"/>
|
||||
<Run Text="4"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}5">
|
||||
<Border Background="{DynamicResource DangerBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="{x:Static langs:Lang.Text}"/>
|
||||
<Run Text="5"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</UniformGrid>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class NaiveTabControlDemoCtl
|
||||
{
|
||||
public NaiveTabControlDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.NaiveTextBoxDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<StackPanel Margin="32">
|
||||
<TextBox Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<TextBox Text="{x:Static langs:Lang.ContentDemoStr}" Margin="0,16,0,0" IsEnabled="False"/>
|
||||
|
||||
<TextBox controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Style="{StaticResource TextBoxExtend}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<TextBox controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource TextBoxExtend}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
<TextBox Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource TextBoxExtend}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<TextBox Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" controls:InfoElement.Necessary="True" Style="{StaticResource TextBoxExtend}" Margin="0,16,0,0"/>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class NaiveTextBoxDemoCtl
|
||||
{
|
||||
public NaiveTextBoxDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.ProgressBarDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<WrapPanel Margin="32" ItemWidth="600">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel Width="400">
|
||||
<ProgressBar Value="20" Margin="0,0,0,10"/>
|
||||
<ProgressBar Style="{StaticResource ProgressBarSuccess}" Margin="0,0,0,10" Value="40"/>
|
||||
<ProgressBar Style="{StaticResource ProgressBarInfo}" Margin="0,0,0,10" Value="60"/>
|
||||
<ProgressBar Style="{StaticResource ProgressBarWarning}" Margin="0,0,0,10" Value="80"/>
|
||||
<ProgressBar Style="{StaticResource ProgressBarDanger}" Margin="0,0,0,10" Value="100" Maximum="200"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="10,0,0,0" Width="200" HorizontalAlignment="Left">
|
||||
<TextBlock Padding="0,2,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressbarPrimary" HorizontalAlignment="Left"/>
|
||||
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarSuccess" HorizontalAlignment="Left"/>
|
||||
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarInfo" HorizontalAlignment="Left"/>
|
||||
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarWarning" HorizontalAlignment="Left"/>
|
||||
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarDanger" HorizontalAlignment="Left"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel Width="400">
|
||||
<ProgressBar Style="{StaticResource ProgressBarPrimaryStripe}" Margin="0,0,0,10" Value="120" Maximum="200" />
|
||||
<ProgressBar Style="{StaticResource ProgressBarSuccessStripe}" Margin="0,0,0,10" Value="60" Maximum="200" />
|
||||
<ProgressBar Style="{StaticResource ProgressBarInfoStripe}" Margin="0,0,0,10" Value="50" Maximum="200" />
|
||||
<ProgressBar Style="{StaticResource ProgressBarWarningStripe}" Margin="0,0,0,10" Value="180" Maximum="200" />
|
||||
<ProgressBar Style="{StaticResource ProgressBarDangerStripe}" Margin="0,0,0,10" Value="110" Maximum="200" />
|
||||
<ProgressBar Style="{StaticResource ProgressBarFlat}" Margin="0,8,0,10" Value="110" Maximum="200" />
|
||||
</StackPanel>
|
||||
<StackPanel Margin="10,0,0,0" Width="200" HorizontalAlignment="Left">
|
||||
<TextBlock Padding="0,2,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarPrimaryStripe" HorizontalAlignment="Left"/>
|
||||
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarSuccessStripe" HorizontalAlignment="Left"/>
|
||||
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarInfoStripe" HorizontalAlignment="Left"/>
|
||||
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarWarningStripe" HorizontalAlignment="Left"/>
|
||||
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarDangerStripe" HorizontalAlignment="Left"/>
|
||||
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarPlayer" HorizontalAlignment="Left"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class ProgressBarDemoCtl
|
||||
{
|
||||
public ProgressBarDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.RadioButtonDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<StackPanel Margin="32" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<StackPanel>
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
<RadioButton Margin="0,16,0,0" Content="{x:Static langs:Lang.RadioButton}" IsChecked="True" IsEnabled="False"/>
|
||||
<RadioButton Margin="0,16,0,0" Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
<RadioButton Margin="0,16,0,0" Content="{x:Static langs:Lang.RadioButton}" IsEnabled="False"/>
|
||||
</StackPanel>
|
||||
<UniformGrid Margin="22,0,0,0" Rows="2" Columns="2">
|
||||
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}" controls:IconElement.Geometry="{StaticResource CalendarGeometry}" Style="{StaticResource RadioButtonIcon}" Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}" Style="{StaticResource RadioButtonIcon}" Content="{x:Static langs:Lang.RadioButton}" IsChecked="True"/>
|
||||
<RadioButton Margin="10,0,0,0" BorderThickness="1" controls:IconElement.Geometry="{StaticResource CalendarGeometry}" Style="{StaticResource RadioButtonIcon}" Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
<RadioButton Margin="10,0,0,0" BorderThickness="1" Style="{StaticResource RadioButtonIcon}" Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
</UniformGrid>
|
||||
</StackPanel>
|
||||
<controls:RadioGroup Margin="0,32,0,0">
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}" IsChecked="True"/>
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
<RadioButton IsEnabled="False" Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
</controls:RadioGroup>
|
||||
<controls:RadioGroup Margin="0,16,0,0" Style="{StaticResource RadioGroupSolid}">
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
<RadioButton IsEnabled="False" Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}" IsChecked="True"/>
|
||||
</controls:RadioGroup>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<controls:RadioGroup Margin="0,16,8,0" Orientation="Vertical">
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}" IsChecked="True"/>
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
<RadioButton IsEnabled="False" Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
</controls:RadioGroup>
|
||||
<controls:RadioGroup Margin="8,16,0,0" Orientation="Vertical" Style="{StaticResource RadioGroupSolid}">
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
<RadioButton IsEnabled="False" Content="{x:Static langs:Lang.RadioButton}"/>
|
||||
<RadioButton Content="{x:Static langs:Lang.RadioButton}" IsChecked="True"/>
|
||||
</controls:RadioGroup>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class RadioButtonDemoCtl
|
||||
{
|
||||
public RadioButtonDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.RichTextBoxDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<RichTextBox Margin="32" Width="400" Height="300" ScrollViewer.VerticalScrollBarVisibility="Auto">
|
||||
<FlowDocument>
|
||||
<Paragraph>
|
||||
<Run Name="RunTitle" FontSize="20"/>
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<Run Name="RunText"/>
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<Hyperlink>https://github.com/NaBian/HandyControl</Hyperlink>
|
||||
</Paragraph>
|
||||
</FlowDocument>
|
||||
</RichTextBox>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,17 @@
|
||||
using HandyControlDemo.Tools.Converter;
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class RichTextBoxDemoCtl
|
||||
{
|
||||
public RichTextBoxDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
var converter = new StringRepeatConverter();
|
||||
converter.Convert(Properties.Langs.Lang.Title, null, 20.ToString(), null);
|
||||
RunTitle.Text = converter.Convert(Properties.Langs.Lang.Title, null, 20, null)?.ToString();
|
||||
RunText.Text = converter.Convert(Properties.Langs.Lang.Text, null, 1000, null)?.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.SliderDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<StackPanel Margin="32" Orientation="Horizontal">
|
||||
<StackPanel>
|
||||
<Slider Width="400" IsSnapToTickEnabled="True" Value="8"/>
|
||||
<Slider Width="400" IsSnapToTickEnabled="True" Value="3" Margin="0,32,0,0" IsEnabled="False"/>
|
||||
<Slider Width="400" IsSnapToTickEnabled="True" TickFrequency="5" Maximum="100" TickPlacement="TopLeft" Value="10" IsSelectionRangeEnabled="True" SelectionStart="10" SelectionEnd="80" Margin="0,32,0,0"/>
|
||||
<Slider Width="400" controls:TipElement.Visibility="Visible" IsSnapToTickEnabled="True" Maximum="100" Value="60" TickFrequency="10" TickPlacement="BottomRight" Margin="0,32,0,0"/>
|
||||
<Slider Width="400" controls:TipElement.Visibility="Visible" controls:TipElement.Placement="BottomRight" IsSnapToTickEnabled="True" Value="5" TickPlacement="Both" Margin="0,32,0,0"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="32,0,0,0" Orientation="Horizontal">
|
||||
<Slider Height="400" IsSnapToTickEnabled="True" Value="8" Orientation="Vertical"/>
|
||||
<Slider Height="400" IsSnapToTickEnabled="True" Value="3" Margin="32,0,0,0" IsEnabled="False" Orientation="Vertical"/>
|
||||
<Slider Height="400" IsSnapToTickEnabled="True" TickFrequency="5" Maximum="100" TickPlacement="TopLeft" Value="10" IsSelectionRangeEnabled="True" SelectionStart="20" SelectionEnd="80" Margin="32,0,0,0" Orientation="Vertical"/>
|
||||
<Slider Height="400" controls:TipElement.Visibility="Visible" IsSnapToTickEnabled="True" Maximum="100" Value="60" TickFrequency="10" TickPlacement="BottomRight" Margin="32,0,0,0" Orientation="Vertical"/>
|
||||
<Slider Height="400" controls:TipElement.Visibility="Visible" controls:TipElement.Placement="BottomRight" IsSnapToTickEnabled="True" Value="5" TickPlacement="Both" Margin="32,0" Orientation="Vertical"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class SliderDemoCtl
|
||||
{
|
||||
public SliderDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.TextBlockDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<StackPanel Margin="32" Orientation="Horizontal">
|
||||
<StackPanel>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockLargeBold" Style="{StaticResource TextBlockLargeBold}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockLarge" Style="{StaticResource TextBlockLarge}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockHeaderBold" Style="{StaticResource TextBlockTitleBold}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockHeader" Style="{StaticResource TextBlockTitle}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockSubHeaderBold" Style="{StaticResource TextBlockSubTitleBold}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockSubHeader" Style="{StaticResource TextBlockSubTitle}"/>
|
||||
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultBold" Style="{StaticResource TextBlockDefaultBold}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefault" Style="{StaticResource TextBlockDefault}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultAccent" Style="{StaticResource TextBlockDefaultAccent}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultSecLight" Style="{StaticResource TextBlockDefaultSecLight}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultThiLight" Style="{StaticResource TextBlockDefaultThiLight}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultPrimary" Style="{StaticResource TextBlockDefaultPrimary}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultDanger" Style="{StaticResource TextBlockDefaultDanger}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultWarning" Style="{StaticResource TextBlockDefaultWarning}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultInfo" Style="{StaticResource TextBlockDefaultInfo}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultSuccess" Style="{StaticResource TextBlockDefaultSuccess}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="10,0,0,0">
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Title},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource TextBlockLargeBold}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Title},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource TextBlockLarge}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Title},Converter={StaticResource StringRepeatConverter},ConverterParameter=12}" Style="{StaticResource TextBlockTitleBold}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Title},Converter={StaticResource StringRepeatConverter},ConverterParameter=12}" Style="{StaticResource TextBlockTitle}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.SubTitle},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource TextBlockSubTitleBold}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.SubTitle},Converter={StaticResource StringRepeatConverter},ConverterParameter=10}" Style="{StaticResource TextBlockSubTitle}"/>
|
||||
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultBold}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefault}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultAccent}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultSecLight}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultThiLight}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultPrimary}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultDanger}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultWarning}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultInfo}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultSuccess}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// TextBlockDemoCtl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class TextBlockDemoCtl
|
||||
{
|
||||
public TextBlockDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
<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="{DynamicResource RegionBrush}"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||
<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="{DynamicResource BorderBrush}" Margin="5">
|
||||
<Ellipse Width="20" Height="20" Fill="{DynamicResource PrimaryBrush}" StrokeThickness="1" Stroke="{DynamicResource BorderBrush}"/>
|
||||
</Border>
|
||||
</controls:StatusSwitchElement.CheckedElement>
|
||||
<Border Width="80" Height="30" CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Margin="5">
|
||||
<Ellipse Width="20" Height="20" Fill="{DynamicResource BorderBrush}" StrokeThickness="1" Stroke="{DynamicResource 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="{DynamicResource BorderBrush}" Margin="5">
|
||||
<Ellipse Width="20" Height="20" Fill="{DynamicResource PrimaryBrush}" StrokeThickness="1" Stroke="{DynamicResource BorderBrush}"/>
|
||||
</Border>
|
||||
</controls:StatusSwitchElement.CheckedElement>
|
||||
<Border Width="80" Height="30" CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Margin="5">
|
||||
<Ellipse Width="20" Height="20" Fill="{DynamicResource BorderBrush}" StrokeThickness="1" Stroke="{DynamicResource BorderBrush}"/>
|
||||
</Border>
|
||||
</ToggleButton>
|
||||
<TextBlock TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ToggleButtonCustom"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<ToggleButton IsChecked="True" Margin="5,9" HorizontalAlignment="Center" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
<ToggleButton IsEnabled="False" IsChecked="True" HorizontalAlignment="Center" Margin="5,9" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
<TextBlock Style="{StaticResource TextBlockDefault}" Text="ToggleButtonSwitch"/>
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</controls:ScrollViewer>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// ToggleButtonDemoCtl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class ToggleButtonDemoCtl
|
||||
{
|
||||
public ToggleButtonDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.ToolBarDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
DataContext="{Binding ComboBoxDemo,Source={StaticResource Locator}}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<ToolBarTray Margin="32" VerticalAlignment="Center">
|
||||
<ToolBar Padding="6" Header="{x:Static langs:Lang.Title}">
|
||||
<CheckBox IsChecked="True" Margin="10,0,0,0"/>
|
||||
<Separator Margin="10,0,0,0"/>
|
||||
<RadioButton Margin="10,0,0,0"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<RadioButton IsChecked="True" Margin="10,0,0,0"/>
|
||||
<RadioButton Margin="10,0,0,0"/>
|
||||
</StackPanel>
|
||||
<Button Content="{x:Static langs:Lang.Button}" Margin="10,0,0,0"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}" Margin="10,0,0,0" Style="{StaticResource ButtonPrimary}"/>
|
||||
</ToolBar>
|
||||
<ToolBar Band="1" Padding="6">
|
||||
<ComboBox ItemsSource="{Binding DataList}" SelectedIndex="0" Width="230"/>
|
||||
<TextBox Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=4,Mode=OneWay}" Margin="10,0,0,0" Width="230"/>
|
||||
</ToolBar>
|
||||
<ToolBar Band="0" Padding="6">
|
||||
<Menu Background="Transparent" VerticalAlignment="Center">
|
||||
<MenuItem Header="{x:Static langs:Lang.Repository}">
|
||||
<MenuItem Header="GitHub">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource GithubGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="NuGet">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource NugetGeometry}" Fill="#224880"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{x:Static langs:Lang.About}">
|
||||
<MenuItem Header="{x:Static langs:Lang.Email}">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource EmailGeometry}" Fill="{DynamicResource PrimaryBrush}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{x:Static langs:Lang.Chatroom}">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource GitterGeometry}" Fill="#e52e64"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{x:Static langs:Lang.Blog}">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource CnblogsGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{x:Static langs:Lang.Contributors}"/>
|
||||
</Menu>
|
||||
</ToolBar>
|
||||
</ToolBarTray>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class ToolBarDemoCtl
|
||||
{
|
||||
public ToolBarDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.TreeViewDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<TreeView Width="200" Margin="32" ItemsSource="{Binding DataList}">
|
||||
<TreeView.ItemTemplate>
|
||||
<HierarchicalDataTemplate ItemsSource="{Binding DataList}">
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
</HierarchicalDataTemplate>
|
||||
</TreeView.ItemTemplate>
|
||||
</TreeView>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class TreeViewDemoCtl
|
||||
{
|
||||
public TreeViewDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user