Merge branch 'master' into pr/84
This commit is contained in:
commit
e02b420634
375 files changed
+9510
-1366
No files matched your search
@@ -0,0 +1,43 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.DividerDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs">
|
||||
<hc:TransitioningContentControl>
|
||||
<WrapPanel Margin="16">
|
||||
<StackPanel Margin="16" Width="300">
|
||||
<hc:Divider/>
|
||||
<hc:Divider Content="{x:Static langs:Lang.Title}"/>
|
||||
<hc:Divider Content="{x:Static langs:Lang.Title}" Padding="10,0"/>
|
||||
<hc:Divider LineStrokeThickness="2" LineStroke="{DynamicResource DarkPrimaryBrush}"/>
|
||||
<hc:Divider LineStrokeDashArray="2,2"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="16" Width="300">
|
||||
<hc:Divider Content="{x:Static langs:Lang.Title}" HorizontalContentAlignment="Left"/>
|
||||
<hc:Divider Content="{x:Static langs:Lang.Title}" Padding="10,0" HorizontalContentAlignment="Right"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<hc:Divider Orientation="Vertical" MaxHeight="16"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<hc:Divider Orientation="Vertical" MaxHeight="16"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,16,0,0">
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<hc:Divider LineStrokeThickness="2" Orientation="Vertical" MaxHeight="16"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<hc:Divider LineStrokeThickness="2" Orientation="Vertical" MaxHeight="16"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,16,0,0">
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<hc:Divider LineStrokeThickness="2" LineStroke="{DynamicResource DarkPrimaryBrush}" Orientation="Vertical" MaxHeight="16"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
<hc:Divider LineStrokeThickness="2" LineStroke="{DynamicResource DarkPrimaryBrush}" Orientation="Vertical" MaxHeight="16"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class RelativePanelDemoCtl
|
||||
public partial class DividerDemoCtl
|
||||
{
|
||||
public RelativePanelDemoCtl()
|
||||
public DividerDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.FloatingBlockDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<hc:TransitioningContentControl>
|
||||
<StackPanel Margin="32" VerticalAlignment="Center">
|
||||
<Button hc:IconElement.Geometry="{StaticResource ThumbsUpGeometry}" Width="180">
|
||||
<hc:FloatingBlock.ContentTemplate>
|
||||
<DataTemplate>
|
||||
<Path Data="{StaticResource ThumbsUpGeometry}" Fill="{DynamicResource DangerBrush}" Width="16" Height="16"/>
|
||||
</DataTemplate>
|
||||
</hc:FloatingBlock.ContentTemplate>
|
||||
</Button>
|
||||
<Button Content="Good" hc:FloatingBlock.Content="Good" Width="180" Margin="0,10,0,0"/>
|
||||
<Button hc:IconElement.Geometry="{StaticResource ThumbsUpGeometry}" Width="180" Margin="0,10,0,0" hc:FloatingBlock.Duration="0:0:1" hc:FloatingBlock.VerticalOffset="-20" hc:FloatingBlock.ToX="50" hc:FloatingBlock.ToY="-80">
|
||||
<hc:FloatingBlock.ContentTemplate>
|
||||
<DataTemplate>
|
||||
<Path Data="{StaticResource ThumbsUpGeometry}" Fill="{DynamicResource DangerBrush}" Width="16" Height="16"/>
|
||||
</DataTemplate>
|
||||
</hc:FloatingBlock.ContentTemplate>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class FloatingBlockDemoCtl
|
||||
{
|
||||
public FloatingBlockDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -139,10 +139,10 @@
|
||||
</hc:Row>
|
||||
<TextBlock Text="{x:Static langs:Lang.ResponsiveLayout}" Margin="0,32,0,0" Style="{StaticResource TextBlockLargeBold}" HorizontalAlignment="Left"/>
|
||||
<hc:Row Margin="0,20,0,0" Gutter="10">
|
||||
<hc:Col Layout="{extension:ColLayout Xs=8, Sm=6, Md=4, Lg=3, Xl=1}">
|
||||
<hc:Col Layout="8,6,4,3,1">
|
||||
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{extension:ColLayout Xs=4, Sm=6, Md=8, Lg=9, Xl=11}">
|
||||
<hc:Col Layout="4 6 8 9 11">
|
||||
<Border Background="{DynamicResource SecondaryBorderBrush}" Height="36" CornerRadius="4"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{extension:ColLayout Xs=4, Sm=6, Md=8, Lg=9, Xl=11}">
|
||||
|
||||
@@ -7,16 +7,29 @@
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<hc:TransitioningContentControl>
|
||||
<StackPanel Margin="32">
|
||||
<WrapPanel VerticalAlignment="Center">
|
||||
<Button Command="{Binding InfoCmd}" Content="{x:Static langs:Lang.Info}" Margin="0,5,5,5" Style="{StaticResource ButtonInfo}"/>
|
||||
<Button Command="{Binding SuccessCmd}" Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
|
||||
<Button Command="{Binding WarningCmd}" Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ButtonWarning}"/>
|
||||
<Button Command="{Binding ErrorCmd}" Content="{x:Static langs:Lang.Error}" Margin="5" Style="{StaticResource ButtonDanger}"/>
|
||||
<Button Command="{Binding AskCmd}" Content="{x:Static langs:Lang.Ask}" Margin="5" Background="BlueViolet" Foreground="White"/>
|
||||
<Button Command="{Binding FatalCmd}" Content="{x:Static langs:Lang.Fatal}" Margin="5,0"/>
|
||||
<Button Command="{Binding ClearCmd}" Content="{x:Static langs:Lang.Clear}" Margin="5,0,0,0" Style="{StaticResource ButtonPrimary}"/>
|
||||
</WrapPanel>
|
||||
<Button Command="{Binding NewWindowCmd}" Content="{x:Static langs:Lang.NewWindow}" Margin="0,5,0,0" HorizontalAlignment="Left"/>
|
||||
<GroupBox Header="Window" Padding="10,5">
|
||||
<WrapPanel VerticalAlignment="Center">
|
||||
<Button Command="{Binding InfoCmd}" Content="{x:Static langs:Lang.Info}" Margin="0,5,5,5" Style="{StaticResource ButtonInfo}"/>
|
||||
<Button Command="{Binding SuccessCmd}" Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
|
||||
<Button Command="{Binding WarningCmd}" Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ButtonWarning}"/>
|
||||
<Button Command="{Binding ErrorCmd}" Content="{x:Static langs:Lang.Error}" Margin="5" Style="{StaticResource ButtonDanger}"/>
|
||||
<Button Command="{Binding AskCmd}" Content="{x:Static langs:Lang.Ask}" Margin="5" Background="BlueViolet" Foreground="White" BorderThickness="0"/>
|
||||
<Button Command="{Binding FatalCmd}" Content="{x:Static langs:Lang.Fatal}" Margin="5,0"/>
|
||||
<Button Command="{Binding ClearCmd}" Content="{x:Static langs:Lang.Clear}" Margin="5,0,0,0" Style="{StaticResource ButtonPrimary}"/>
|
||||
</WrapPanel>
|
||||
</GroupBox>
|
||||
<Button Command="{Binding NewWindowCmd}" Content="{x:Static langs:Lang.NewWindow}" Margin="0,32" HorizontalAlignment="Left"/>
|
||||
<GroupBox Header="Desktop" Padding="10,5">
|
||||
<WrapPanel VerticalAlignment="Center">
|
||||
<Button Command="{Binding InfoGlobalCmd}" Content="{x:Static langs:Lang.Info}" Margin="0,5,5,5" Style="{StaticResource ButtonInfo}"/>
|
||||
<Button Command="{Binding SuccessGlobalCmd}" Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
|
||||
<Button Command="{Binding WarningGlobalCmd}" Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ButtonWarning}"/>
|
||||
<Button Command="{Binding ErrorGlobalCmd}" Content="{x:Static langs:Lang.Error}" Margin="5" Style="{StaticResource ButtonDanger}"/>
|
||||
<Button Command="{Binding AskGlobalCmd}" Content="{x:Static langs:Lang.Ask}" Margin="5" Background="BlueViolet" Foreground="White" BorderThickness="0"/>
|
||||
<Button Command="{Binding FatalGlobalCmd}" Content="{x:Static langs:Lang.Fatal}" Margin="5,0"/>
|
||||
<Button Command="{Binding ClearGlobalCmd}" Content="{x:Static langs:Lang.Clear}" Margin="5,0,0,0" Style="{StaticResource ButtonPrimary}"/>
|
||||
</WrapPanel>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -1,9 +1,6 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// GrowlDemoGrid.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class GrowlDemoCtl
|
||||
{
|
||||
public GrowlDemoCtl()
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.HoneycombPanelDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
DataContext="{Binding CardDemo,Source={StaticResource Locator}}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<hc:TransitioningContentControl>
|
||||
<Grid Margin="32">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<hc:ButtonGroup Margin="0,0,0,16">
|
||||
<Button Command="{Binding AddItemCmd}" Content="{x:Static langs:Lang.AddItem}"/>
|
||||
<Button Command="{Binding RemoveItemCmd}" Content="{x:Static langs:Lang.RemoveItem}"/>
|
||||
</hc:ButtonGroup>
|
||||
<Border Padding="0" Grid.Row="1" Style="{StaticResource BorderRegion}">
|
||||
<ListBox Background="Transparent" BorderThickness="0" Style="{StaticResource ListBoxCustom}" ItemsSource="{Binding DataList}">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<hc:HoneycombPanel hc:PanelElement.FluidMoveBehavior="{StaticResource BehaviorXY200}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="data:CardModel">
|
||||
<hc:Gravatar Style="{StaticResource GravatarCircle}" Margin="10" Source="{Binding Content}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Border>
|
||||
</Grid>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class HoneycombPanelDemoCtl
|
||||
{
|
||||
public HoneycombPanelDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,6 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// ImageBrowserDemoCtl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class ImageBrowserDemoCtl
|
||||
{
|
||||
public ImageBrowserDemoCtl()
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.NotificationDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
DataContext="{Binding NotificationDemo,Source={StaticResource Locator}}"
|
||||
Width="300"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<hc:TransitioningContentControl>
|
||||
<StackPanel Margin="32" VerticalAlignment="Center">
|
||||
<ComboBox SelectedValue="{Binding ShowAnimation}" ItemsSource="{Binding Source={StaticResource ShowAnimations}}"/>
|
||||
<hc:ButtonGroup Margin="0,16,0,0">
|
||||
<ToggleButton Content="{x:Static langs:Lang.StaysOpen}" IsChecked="{Binding StaysOpen}"/>
|
||||
<Button Command="{Binding OpenCmd}" Content="{x:Static langs:Lang.SendNotification}"/>
|
||||
</hc:ButtonGroup>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class NotificationDemoCtl
|
||||
{
|
||||
public NotificationDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,35 +5,42 @@
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:command="http://www.galasoft.ch/mvvmlight"
|
||||
xmlns:data="clr-namespace:HandyControlDemo.Data"
|
||||
DataContext="{Binding NotifyIconDemo,Source={StaticResource Locator}}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<hc:TransitioningContentControl>
|
||||
<hc:SimplePanel Margin="32">
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<GroupBox Header="ContextMenu" Padding="10">
|
||||
<StackPanel>
|
||||
<GroupBox hc:TitleElement.TitleAlignment="Left" Style="{StaticResource GroupBoxOriginal}" Header="{x:Static langs:Lang.Visibility}">
|
||||
<ToggleButton IsChecked="{Binding ContextMenuIsShow}" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
</GroupBox>
|
||||
<TextBlock Foreground="{DynamicResource InfoBrush}" Visibility="{Binding ContextMenuIsShow,Converter={StaticResource Boolean2VisibilityConverter}}" Text="{x:Static langs:Lang.Try2CloseApp}" Margin="0,6,0,0"/>
|
||||
<GroupBox Margin="0,10,0,0" hc:TitleElement.TitleAlignment="Left" Style="{StaticResource GroupBoxOriginal}" Header="{x:Static langs:Lang.Blink}">
|
||||
<ToggleButton IsChecked="{Binding ContextMenuIsBlink}" IsEnabled="{Binding ContextMenuIsShow}" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<GroupBox Header="ContextContent" Margin="16,0,0,0" Padding="10">
|
||||
<StackPanel>
|
||||
<GroupBox hc:TitleElement.TitleAlignment="Left" Style="{StaticResource GroupBoxOriginal}" Header="{x:Static langs:Lang.Visibility}">
|
||||
<ToggleButton IsChecked="{Binding ContextContentIsShow}" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
</GroupBox>
|
||||
<TextBlock Foreground="{DynamicResource InfoBrush}" Visibility="{Binding ContextContentIsShow,Converter={StaticResource Boolean2VisibilityConverter}}" Text="{x:Static langs:Lang.Try2CloseApp}" Margin="0,6,0,0"/>
|
||||
<GroupBox Margin="0,10,0,0" hc:TitleElement.TitleAlignment="Left" Style="{StaticResource GroupBoxOriginal}" Header="{x:Static langs:Lang.Blink}">
|
||||
<ToggleButton IsChecked="{Binding ContextContentIsBlink}" IsEnabled="{Binding ContextContentIsShow}" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<hc:SimplePanel Margin="32" VerticalAlignment="Center">
|
||||
<StackPanel>
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<GroupBox Header="ContextMenu" Padding="10">
|
||||
<StackPanel>
|
||||
<GroupBox hc:TitleElement.TitleAlignment="Left" Style="{StaticResource GroupBoxOriginal}" Header="{x:Static langs:Lang.Visibility}">
|
||||
<ToggleButton IsChecked="{Binding ContextMenuIsShow}" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
</GroupBox>
|
||||
<TextBlock Foreground="{DynamicResource InfoBrush}" Visibility="{Binding ContextMenuIsShow,Converter={StaticResource Boolean2VisibilityConverter}}" Text="{x:Static langs:Lang.Try2CloseApp}" Margin="0,6,0,0"/>
|
||||
<GroupBox Margin="0,10,0,0" hc:TitleElement.TitleAlignment="Left" Style="{StaticResource GroupBoxOriginal}" Header="{x:Static langs:Lang.Blink}">
|
||||
<ToggleButton IsChecked="{Binding ContextMenuIsBlink}" IsEnabled="{Binding ContextMenuIsShow}" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<GroupBox Header="ContextContent" Margin="16,0,0,0" Padding="10">
|
||||
<StackPanel>
|
||||
<GroupBox hc:TitleElement.TitleAlignment="Left" Style="{StaticResource GroupBoxOriginal}" Header="{x:Static langs:Lang.Visibility}">
|
||||
<ToggleButton IsChecked="{Binding ContextContentIsShow}" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
</GroupBox>
|
||||
<TextBlock Foreground="{DynamicResource InfoBrush}" Visibility="{Binding ContextContentIsShow,Converter={StaticResource Boolean2VisibilityConverter}}" Text="{x:Static langs:Lang.Try2CloseApp}" Margin="0,6,0,0"/>
|
||||
<GroupBox Margin="0,10,0,0" hc:TitleElement.TitleAlignment="Left" Style="{StaticResource GroupBoxOriginal}" Header="{x:Static langs:Lang.Blink}">
|
||||
<ToggleButton IsChecked="{Binding ContextContentIsBlink}" IsEnabled="{Binding ContextContentIsShow}" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
<DockPanel Margin="0,16,0,0" LastChildFill="True">
|
||||
<Button Command="{Binding SendNotificationCmd}" Content="{x:Static langs:Lang.SendNotification}" DockPanel.Dock="Right" HorizontalAlignment="Stretch" Margin="10,0,0,0"/>
|
||||
<TextBox Text="{Binding Content}"/>
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
<hc:NotifyIcon Text="HandyControl" IsBlink="{Binding ContextMenuIsBlink}" Visibility="{Binding ContextMenuIsShow,Converter={StaticResource Boolean2VisibilityConverter}}">
|
||||
<hc:NotifyIcon Token="{x:Static data:MessageToken.NotifyIconDemo}" Text="HandyControl" IsBlink="{Binding ContextMenuIsBlink}" Visibility="{Binding ContextMenuIsShow,Converter={StaticResource Boolean2VisibilityConverter}}">
|
||||
<hc:NotifyIcon.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Command="hc:ControlCommands.PushMainWindow2Top" Header="{x:Static langs:Lang.OpenPanel}"/>
|
||||
@@ -49,7 +56,7 @@
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</hc:NotifyIcon>
|
||||
<hc:NotifyIcon x:Name="NotifyIconContextContent" Text="HandyControl" IsBlink="{Binding ContextContentIsBlink}" Visibility="{Binding ContextContentIsShow,Converter={StaticResource Boolean2VisibilityConverter}}" Icon="/HandyControlDemo;component/Resources/Img/icon-white.ico">
|
||||
<hc:NotifyIcon Token="{x:Static data:MessageToken.NotifyIconContextDemo}" x:Name="NotifyIconContextContent" Text="HandyControl" IsBlink="{Binding ContextContentIsBlink}" Visibility="{Binding ContextContentIsShow,Converter={StaticResource Boolean2VisibilityConverter}}" Icon="/HandyControlDemo;component/Resources/Img/icon-white.ico">
|
||||
<hc:NotifyIcon.ContextContent>
|
||||
<Border CornerRadius="4" Margin="10" Background="White" Effect="{StaticResource EffectShadow2}">
|
||||
<StackPanel VerticalAlignment="Center" Margin="16">
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.RelativePanelDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl">
|
||||
<userControl:UnderConstruction/>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,33 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.RunningBlockDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs">
|
||||
<hc:TransitioningContentControl>
|
||||
<StackPanel Margin="32" VerticalAlignment="Center">
|
||||
<hc:RunningBlock Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}"/>
|
||||
<hc:RunningBlock Runaway="False" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock HorizontalAlignment="Left" AutoRun="True" Width="100" Runaway="False" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Duration="0:0:2" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock HorizontalAlignment="Left" AutoReverse="True" AutoRun="True" Width="100" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock HorizontalAlignment="Left" AutoRun="True" Width="200" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=10}" FontSize="20" FontWeight="Bold" Foreground="OrangeRed" Duration="0:0:10" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock AutoReverse="True" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=10}" FontSize="20" FontWeight="Bold" Foreground="OrangeRed" Duration="0:0:10" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock Orientation="Vertical" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=10}" FontSize="20" FontWeight="Bold" Foreground="OrangeRed" Duration="0:0:4" Margin="0,16,0,0"/>
|
||||
<hc:RunningBlock Margin="0,16,0,0" Duration="0:0:20" IsRunning="{Binding IsMouseOver,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2BooleanReConverter}}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/1.gif" Margin="10,0"/>
|
||||
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/2.gif" Margin="10,0"/>
|
||||
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/3.gif" Margin="10,0"/>
|
||||
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/4.gif" Margin="10,0"/>
|
||||
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/5.gif" Margin="10,0"/>
|
||||
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/6.gif" Margin="10,0"/>
|
||||
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/7.gif" Margin="10,0"/>
|
||||
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/8.gif" Margin="10,0"/>
|
||||
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/9.gif" Margin="10,0"/>
|
||||
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/10.gif" Margin="10,0"/>
|
||||
</StackPanel>
|
||||
</hc:RunningBlock>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class RunningBlockDemoCtl
|
||||
{
|
||||
public RunningBlockDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,17 +18,17 @@
|
||||
<hc:SideMenuItem.Icon>
|
||||
<Image Source="/HandyControlDemo;component/Resources/Img/DevOps/DevOps-Overview.png" Width="24" Height="24"/>
|
||||
</hc:SideMenuItem.Icon>
|
||||
<hc:SideMenuItem Header="Summary">
|
||||
<hc:SideMenuItem Header="Summary" Command="{Binding SelectCmd}" CommandParameter="{Binding Header,RelativeSource={RelativeSource Self}}">
|
||||
<hc:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</hc:SideMenuItem.Icon>
|
||||
</hc:SideMenuItem>
|
||||
<hc:SideMenuItem Header="Dashboards">
|
||||
<hc:SideMenuItem Header="Dashboards" Command="{Binding SelectCmd}" CommandParameter="{Binding Header,RelativeSource={RelativeSource Self}}">
|
||||
<hc:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</hc:SideMenuItem.Icon>
|
||||
</hc:SideMenuItem>
|
||||
<hc:SideMenuItem Header="Wiki">
|
||||
<hc:SideMenuItem Header="Wiki" Command="{Binding SelectCmd}" CommandParameter="{Binding Header,RelativeSource={RelativeSource Self}}">
|
||||
<hc:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</hc:SideMenuItem.Icon>
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.SplitButtonDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl"
|
||||
DataContext="{Binding SplitButtonDemo,Source={StaticResource Locator}}">
|
||||
<hc:TransitioningContentControl>
|
||||
<StackPanel Margin="32" VerticalAlignment="Center">
|
||||
<hc:SplitButton Margin="0,0,0,10" Content="{x:Static langs:Lang.Default}" Command="{Binding SelectCmd}" CommandParameter="Command0" HorizontalAlignment="Stretch">
|
||||
<hc:SplitButton.DropDownContent>
|
||||
<StackPanel>
|
||||
<MenuItem Header="{x:Static langs:Lang.Title}" Command="{Binding SelectCmd}" CommandParameter="Command1"/>
|
||||
<MenuItem Header="{x:Static langs:Lang.Title}" Command="{Binding SelectCmd}" CommandParameter="Command2"/>
|
||||
<MenuItem Header="{x:Static langs:Lang.Title}" Command="{Binding SelectCmd}" CommandParameter="Command3"/>
|
||||
</StackPanel>
|
||||
</hc:SplitButton.DropDownContent>
|
||||
</hc:SplitButton>
|
||||
<hc:SplitButton Style="{StaticResource SplitButtonPrimary}" Margin="0,0,0,10" Content="{x:Static langs:Lang.Primary}" Command="{Binding SelectCmd}" CommandParameter="Command0" HorizontalAlignment="Stretch">
|
||||
<hc:SplitButton.DropDownContent>
|
||||
<StackPanel>
|
||||
<MenuItem Header="{x:Static langs:Lang.Title}" Command="{Binding SelectCmd}" CommandParameter="Command1"/>
|
||||
<MenuItem Header="{x:Static langs:Lang.Title}" Command="{Binding SelectCmd}" CommandParameter="Command2"/>
|
||||
<MenuItem Header="{x:Static langs:Lang.Title}" Command="{Binding SelectCmd}" CommandParameter="Command3"/>
|
||||
</StackPanel>
|
||||
</hc:SplitButton.DropDownContent>
|
||||
</hc:SplitButton>
|
||||
<hc:SplitButton Style="{StaticResource SplitButtonWarning}" Margin="0,0,0,10" Content="{x:Static langs:Lang.Warning}" HitMode="Hover" HorizontalAlignment="Stretch">
|
||||
<hc:SplitButton.DropDownContent>
|
||||
<StackPanel>
|
||||
<MenuItem Header="{x:Static langs:Lang.Title}" Command="{Binding SelectCmd}" CommandParameter="Command1"/>
|
||||
<MenuItem Header="{x:Static langs:Lang.Title}" Command="{Binding SelectCmd}" CommandParameter="Command2"/>
|
||||
<MenuItem Header="{x:Static langs:Lang.Title}" Command="{Binding SelectCmd}" CommandParameter="Command3"/>
|
||||
</StackPanel>
|
||||
</hc:SplitButton.DropDownContent>
|
||||
</hc:SplitButton>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class SplitButtonDemoCtl
|
||||
{
|
||||
public SplitButtonDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MessageBox.Show("123");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.SpriteDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
DataContext="{Binding SpriteDemo,Source={StaticResource Locator}}"
|
||||
Width="300"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<hc:TransitioningContentControl>
|
||||
<Button Margin="32" Command="{Binding OpenCmd}" Content="{x:Static langs:Lang.OpenSprite}"/>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class SpriteDemoCtl
|
||||
{
|
||||
public SpriteDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,6 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// StepBarDemoCtl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class StepBarDemoCtl
|
||||
{
|
||||
public StepBarDemoCtl()
|
||||
|
||||
@@ -23,12 +23,12 @@ namespace HandyControlDemo.UserControl
|
||||
{
|
||||
MessageBox.Show(new MessageBoxInfo
|
||||
{
|
||||
MessageBoxText = Properties.Langs.Lang.GrowlAsk,
|
||||
Message = Properties.Langs.Lang.GrowlAsk,
|
||||
Caption = Properties.Langs.Lang.Title,
|
||||
Button = MessageBoxButton.YesNo,
|
||||
IconBrushKey = ResourceToken.AccentBrush,
|
||||
IconKey = ResourceToken.AskGeometry,
|
||||
Style = ResourceHelper.GetResource<Style>("MessageBoxCustom")
|
||||
StyleKey = "MessageBoxCustom"
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<Border x:Class="HandyControlDemo.UserControl.AppNotification"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
Background="White"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{DynamicResource BorderBrush}"
|
||||
Width="320"
|
||||
Height="518">
|
||||
<hc:SimplePanel>
|
||||
<Path Margin="0,36,0,0" VerticalAlignment="Top" Width="70" Height="70" Data="{StaticResource LogoGeometry}" Fill="#f06632"/>
|
||||
<TextBlock Text="HandyControl" FontSize="30" Foreground="{StaticResource PrimaryBrush}" HorizontalAlignment="Center" Margin="0,122,0,0" VerticalAlignment="Top"/>
|
||||
<Button Command="hc:ControlCommands.CloseWindow" CommandParameter="{Binding RelativeSource={RelativeSource Self}}" Content="{x:Static hc:Lang.Close}" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="10,0,10,10"/>
|
||||
</hc:SimplePanel>
|
||||
</Border>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class AppNotification
|
||||
{
|
||||
public AppNotification()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<hc:SimplePanel x:Class="HandyControlDemo.UserControl.AppSprite"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol">
|
||||
<Border Background="White" CornerRadius="20" Effect="{StaticResource EffectShadow4}">
|
||||
<Path Width="70" Height="70" Data="{StaticResource LogoGeometry}" Fill="#f06632"/>
|
||||
</Border>
|
||||
<Button Command="hc:ControlCommands.CloseWindow" CommandParameter="{Binding RelativeSource={RelativeSource Self}}" Visibility="{Binding IsMouseOver,RelativeSource={RelativeSource AncestorType=hc:SimplePanel},Converter={StaticResource Boolean2VisibilityConverter}}" Width="22" Height="22" Style="{StaticResource ButtonIcon}" Foreground="White" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-8,-8,0"/>
|
||||
</hc:SimplePanel>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class AppSprite
|
||||
{
|
||||
public AppSprite()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,8 +26,8 @@
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<hc:SearchBar x:Name="SearchBarStyle" SearchStarted="SearchBarStyle_OnSearchStarted" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterKey}" Margin="4"/>
|
||||
<ToggleButton Name="ButtonStyleAscending" Click="ButtonStyleAscending_OnClick" Grid.Row="0" Grid.Column="1" Margin="0,0,4,0" Style="{StaticResource ToggleButtonCustom}">
|
||||
<hc:SearchBar SearchStarted="SearchBar_OnSearchStarted" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterKey}" Margin="4" Tag="{Binding ElementName=ListBoxStyle}"/>
|
||||
<ToggleButton Tag="{Binding ElementName=ListBoxStyle}" Name="ButtonStyleAscending" Click="ButtonAscending_OnClick" Grid.Row="0" Grid.Column="1" Margin="0,0,4,0" Style="{StaticResource ToggleButtonCustom}">
|
||||
<Border CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" Height="30" Width="30" >
|
||||
<Image Stretch="None" Source="/HandyControlDemo;component/Resources/Img/LeftMainContent/SortAscending_grey_16x.png"/>
|
||||
</Border>
|
||||
@@ -185,8 +185,8 @@
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<hc:SearchBar SearchStarted="SearchBarControl_OnSearchStarted" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterKey}" Margin="4"/>
|
||||
<ToggleButton Name="ButtonControlAscending" Click="ButtonControlAscending_OnClick" Grid.Row="0" Grid.Column="1" Margin="0,0,4,0" Style="{StaticResource ToggleButtonCustom}">
|
||||
<hc:SearchBar SearchStarted="SearchBar_OnSearchStarted" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterKey}" Margin="4" Tag="{Binding ElementName=ListBoxControl}"/>
|
||||
<ToggleButton Tag="{Binding ElementName=ListBoxControl}" Name="ButtonControlAscending" Click="ButtonAscending_OnClick" Grid.Row="0" Grid.Column="1" Margin="0,0,4,0" Style="{StaticResource ToggleButtonCustom}">
|
||||
<Border CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" Height="30" Width="30" >
|
||||
<Image Stretch="None" Source="/HandyControlDemo;component/Resources/Img/LeftMainContent/SortAscending_grey_16x.png"/>
|
||||
</Border>
|
||||
@@ -195,12 +195,17 @@
|
||||
</hc:StatusSwitchElement.CheckedElement>
|
||||
</ToggleButton>
|
||||
<ListBox Name="ListBoxControl" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.ImageBlockDemoCtl}" Content="{x:Static langs:Lang.ImageBlock}">
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.FloatingBlockDemoCtl}" Content="{x:Static langs:Lang.FloatingBlock}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/thumbs_up.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ImageBlockDemoCtl}" Content="{x:Static langs:Lang.ImageBlock}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ImageStack_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.MagnifierDemoCtl}" Content="{x:Static langs:Lang.Magnifier}">
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.MagnifierDemoCtl}" Content="{x:Static langs:Lang.Magnifier}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Search_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
@@ -220,7 +225,12 @@
|
||||
<Image Source="../../Resources/Img/LeftMainContent/GoToTop_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.ButtonGroupDemoCtl}" Content="{x:Static langs:Lang.ButtonGroup}">
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.SplitButtonDemoCtl}" Content="{x:Static langs:Lang.SplitButton}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/SplitButton_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ButtonGroupDemoCtl}" Content="{x:Static langs:Lang.ButtonGroup}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ButtonGroup_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
@@ -325,11 +335,21 @@
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TextBlock_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.CardDemoCtl}" Content="{x:Static langs:Lang.Card}">
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.RunningBlockDemoCtl}" Content="{x:Static langs:Lang.RunningBlock}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Dynamic_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CardDemoCtl}" Content="{x:Static langs:Lang.Card}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/VSO_Card_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.DividerDemoCtl}" Content="{x:Static langs:Lang.Divider}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DottedSplitter_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CirclePanelDemoCtl}" Content="{x:Static langs:Lang.CirclePanel}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ColorWheel_16x.png"/>
|
||||
@@ -345,6 +365,11 @@
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Panel_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.HoneycombPanelDemoCtl}" Content="{x:Static langs:Lang.HoneycombPanel}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/PolygonHexagon_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CoverViewDemoCtl}" Content="{x:Static langs:Lang.CoverView}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DetailDataView_16x.png"/>
|
||||
@@ -400,7 +425,7 @@
|
||||
<Image Source="../../Resources/Img/LeftMainContent/HoverMenu_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.RangeSliderDemoCtl}" Content="{x:Static langs:Lang.RangeSlider}">
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.RangeSliderDemoCtl}" Content="{x:Static langs:Lang.RangeSlider}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/brackets_Square_16xLG.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
@@ -435,6 +460,16 @@
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ScrollBox_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.SpriteDemoCtl}" Content="{x:Static langs:Lang.Sprite}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/HandyControl.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.NotificationDemoCtl}" Content="{x:Static langs:Lang.Notification}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Procedure_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.DialogDemoCtl}" Content="{x:Static langs:Lang.Dialog}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Dialog_16x.png"/>
|
||||
@@ -453,6 +488,39 @@
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Background="Transparent" Header="{x:Static langs:Lang.Tools}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<hc:SearchBar SearchStarted="SearchBar_OnSearchStarted" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterKey}" Margin="4" Tag="{Binding ElementName=ListBoxStyle}"/>
|
||||
<ToggleButton Tag="{Binding ElementName=ListBoxTool}" Name="ButtonToolAscending" Click="ButtonAscending_OnClick" Grid.Row="0" Grid.Column="1" Margin="0,0,4,0" Style="{StaticResource ToggleButtonCustom}">
|
||||
<Border CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" Height="30" Width="30" >
|
||||
<Image Stretch="None" Source="/HandyControlDemo;component/Resources/Img/LeftMainContent/SortAscending_grey_16x.png"/>
|
||||
</Border>
|
||||
<hc:StatusSwitchElement.CheckedElement>
|
||||
<Border CornerRadius="4" Height="30" Width="30" BorderThickness="1" BorderBrush="{DynamicResource PrimaryBrush}"/>
|
||||
</hc:StatusSwitchElement.CheckedElement>
|
||||
</ToggleButton>
|
||||
<ListBox Name="ListBoxTool" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.HatchBrushGeneratorDemoCtl}" Content="{x:Static langs:Lang.HatchBrushGenerator}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DataGenerator_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.GeometryAnimationDemoCtl}" Content="{x:Static langs:Lang.Morphing_Animation}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Animation_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
@@ -2,7 +2,9 @@
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using HandyControl.Data;
|
||||
using HandyControl.Tools;
|
||||
using HandyControl.Tools.Extension;
|
||||
|
||||
|
||||
@@ -28,7 +30,8 @@ namespace HandyControlDemo.UserControl
|
||||
private void TabControl_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (e.AddedItems.Count == 0) return;
|
||||
if (e.AddedItems[0] is TabItem tabItem && tabItem.Content is ListBox listBox)
|
||||
if (e.AddedItems[0] is TabItem tabItem &&
|
||||
VisualHelper.GetChild<ListBox>(tabItem.Content as DependencyObject) is ListBox listBox)
|
||||
{
|
||||
if (listBox.SelectedItem != null)
|
||||
{
|
||||
@@ -39,47 +42,29 @@ namespace HandyControlDemo.UserControl
|
||||
}
|
||||
}
|
||||
|
||||
private void ButtonStyleAscending_OnClick(object sender, RoutedEventArgs e)
|
||||
private void ButtonAscending_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (ButtonStyleAscending.IsChecked == true)
|
||||
if (sender is ToggleButton button && button.Tag is ItemsControl itemsControl)
|
||||
{
|
||||
ListBoxStyle.Items.SortDescriptions.Add(new SortDescription("Content", ListSortDirection.Ascending));
|
||||
}
|
||||
else
|
||||
{
|
||||
ListBoxStyle.Items.SortDescriptions.Clear();
|
||||
if (button.IsChecked == true)
|
||||
{
|
||||
itemsControl.Items.SortDescriptions.Add(new SortDescription("Content", ListSortDirection.Ascending));
|
||||
}
|
||||
else
|
||||
{
|
||||
itemsControl.Items.SortDescriptions.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ButtonControlAscending_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (ButtonControlAscending.IsChecked == true)
|
||||
{
|
||||
ListBoxControl.Items.SortDescriptions.Add(new SortDescription("Content", ListSortDirection.Ascending));
|
||||
}
|
||||
else
|
||||
{
|
||||
ListBoxControl.Items.SortDescriptions.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
private void SearchBarStyle_OnSearchStarted(object sender, FunctionEventArgs<string> e)
|
||||
private void SearchBar_OnSearchStarted(object sender, FunctionEventArgs<string> e)
|
||||
{
|
||||
if (e.Info == null) return;
|
||||
|
||||
foreach (var listBoxItem in ListBoxStyle.Items.OfType<ListBoxItem>())
|
||||
if (!(sender is FrameworkElement searchBar && searchBar.Tag is ListBox listBox)) return;
|
||||
foreach (var listBoxItem in listBox.Items.OfType<ListBoxItem>())
|
||||
{
|
||||
listBoxItem.Show(listBoxItem.Content.ToString().ToLower().Contains(e.Info.ToLower()));
|
||||
}
|
||||
}
|
||||
|
||||
private void SearchBarControl_OnSearchStarted(object sender, FunctionEventArgs<string> e)
|
||||
{
|
||||
if (e.Info == null) return;
|
||||
|
||||
foreach (var listBoxItem in ListBoxControl.Items.OfType<ListBoxItem>())
|
||||
{
|
||||
listBoxItem.Show(listBoxItem.Content.ToString().ToLower().Contains(e.Info.ToLower()));
|
||||
listBoxItem.Show(listBoxItem.Content.ToString().ToLower().Contains(e.Info.ToLower()) ||
|
||||
listBoxItem.Tag.ToString().Replace("DemoCtl", "").ToLower().Contains(e.Info.ToLower()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +81,12 @@
|
||||
<Button Tag="en" Style="{StaticResource ButtonCustom}" Margin="0,10,0,0">
|
||||
<Image Width="32" Source="/HandyControlDemo;component/Resources/Img/Flag/en.png"/>
|
||||
</Button>
|
||||
<Button Tag="fa" Style="{StaticResource ButtonCustom}" Margin="0,10,0,0">
|
||||
<Image Width="32" Source="/HandyControlDemo;component/Resources/Img/Flag/fa.png"/>
|
||||
</Button>
|
||||
<Button Tag="fr" Style="{StaticResource ButtonCustom}" Margin="0,10,0,0">
|
||||
<Image Width="32" Source="/HandyControlDemo;component/Resources/Img/Flag/fr.png"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<StackPanel Button.Click="ButtonSkins_OnClick" Margin="10,10,10,10">
|
||||
<Button Tag="{x:Static hc:SkinType.Default}" Style="{StaticResource ButtonCustom}">
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.QQGroupView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
Background="{DynamicResource SecondaryRegionBrush}">
|
||||
<Border Background="{DynamicResource QqDrawingBrush}">
|
||||
<Border Height="274" Effect="{StaticResource EffectShadow5}" Width="200" CornerRadius="10">
|
||||
<Border.Background>
|
||||
<ImageBrush ImageSource="/HandyControlDemo;component/Resources/Img/qq-group.jpg"/>
|
||||
</Border.Background>
|
||||
</Border>
|
||||
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center" hc:PanelElement.FluidMoveBehavior="{StaticResource BehaviorXY200}">
|
||||
<Border Margin="16" Height="274" Effect="{StaticResource EffectShadow5}" Width="200" CornerRadius="10">
|
||||
<Border.Background>
|
||||
<ImageBrush ImageSource="/HandyControlDemo;component/Resources/Img/qq_group_1.jpg"/>
|
||||
</Border.Background>
|
||||
</Border>
|
||||
<Border Margin="16" Height="274" Effect="{StaticResource EffectShadow5}" Width="200" CornerRadius="10">
|
||||
<Border.Background>
|
||||
<ImageBrush ImageSource="/HandyControlDemo;component/Resources/Img/qq_group_2.jpg"/>
|
||||
</Border.Background>
|
||||
</Border>
|
||||
</WrapPanel>
|
||||
</Border>
|
||||
</UserControl>
|
||||
@@ -2,9 +2,6 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// ExpanderDemoCtl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class ExpanderDemoCtl
|
||||
{
|
||||
public ExpanderDemoCtl()
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<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}"/>
|
||||
<TextBlock hc:TextBlockAttach.AutoTooltip="True" Width="300" HorizontalAlignment="Left" Margin="5" Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultSuccess}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// TextBlockDemoCtl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class TextBlockDemoCtl
|
||||
{
|
||||
public TextBlockDemoCtl()
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// ToggleButtonDemoCtl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class ToggleButtonDemoCtl
|
||||
{
|
||||
public ToggleButtonDemoCtl()
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.GeometryAnimationDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
Width="200">
|
||||
<UserControl.Resources>
|
||||
<Storyboard x:Key="StoryboardOnLoaded" RepeatBehavior="Forever" AutoReverse="True">
|
||||
<hc:GeometryAnimationUsingKeyFrames Storyboard.TargetProperty="Data" Storyboard.TargetName="PathDemo">
|
||||
<hc:DiscreteGeometryKeyFrame KeyTime="0:0:0.7" Value="{StaticResource FaceBookGeometry}"/>
|
||||
<hc:EasingGeometryKeyFrame KeyTime="0:0:1.2" Value="{StaticResource TwitterGeometry}">
|
||||
<hc:EasingGeometryKeyFrame.EasingFunction>
|
||||
<QuarticEase EasingMode="EaseInOut"/>
|
||||
</hc:EasingGeometryKeyFrame.EasingFunction>
|
||||
</hc:EasingGeometryKeyFrame>
|
||||
</hc:GeometryAnimationUsingKeyFrames>
|
||||
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="Fill.(SolidColorBrush.Color)" Storyboard.TargetName="PathDemo">
|
||||
<DiscreteColorKeyFrame KeyTime="0:0:0.7" Value="#3b5998"/>
|
||||
<EasingColorKeyFrame KeyTime="0:0:1.2" Value="#4099ff">
|
||||
<EasingColorKeyFrame.EasingFunction>
|
||||
<QuarticEase EasingMode="EaseInOut"/>
|
||||
</EasingColorKeyFrame.EasingFunction>
|
||||
</EasingColorKeyFrame>
|
||||
<EasingColorKeyFrame KeyTime="0:0:1.9" Value="#4099ff"/>
|
||||
</ColorAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</UserControl.Resources>
|
||||
<UserControl.Triggers>
|
||||
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
|
||||
<BeginStoryboard Storyboard="{StaticResource StoryboardOnLoaded}"/>
|
||||
</EventTrigger>
|
||||
</UserControl.Triggers>
|
||||
<hc:TransitioningContentControl>
|
||||
<Path Name="PathDemo" Width="100" Height="100" Data="{StaticResource FaceBookGeometry}" Fill="#3b5998"/>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class GeometryAnimationDemoCtl
|
||||
{
|
||||
public GeometryAnimationDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.HatchBrushGeneratorDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<hc:TransitioningContentControl>
|
||||
<Border Style="{StaticResource BorderRegion}" Margin="32" Background="{Binding SelectedValue,ElementName=ComboBoxDemo,Converter={StaticResource HatchBrushConverter}}">
|
||||
<ComboBox SelectedIndex="0" VerticalAlignment="Center" Name="ComboBoxDemo" Width="180" ItemsSource="{Binding Source={StaticResource HatchStyles}}"/>
|
||||
</Border>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class HatchBrushGeneratorDemoCtl
|
||||
{
|
||||
public HatchBrushGeneratorDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user