Merge branch 'HandyOrg:master' into japanese-translation

This commit is contained in:
Musashi Miyamoto authored and GitHub committed 2022-03-26 04:35:29 +09:00
commit cf3b59e612
942 files changed
+62191 -61784

No files matched your search

@@ -1,40 +1,39 @@
using System.Windows;
using System.Windows.Media.Imaging;
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class Avatar
{
public partial class Avatar
public Avatar()
{
public Avatar()
{
InitializeComponent();
}
InitializeComponent();
}
public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(
"Source", typeof(BitmapFrame), typeof(Avatar), new PropertyMetadata(default(BitmapFrame)));
public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(
"Source", typeof(BitmapFrame), typeof(Avatar), new PropertyMetadata(default(BitmapFrame)));
public BitmapFrame Source
{
get => (BitmapFrame) GetValue(SourceProperty);
set => SetValue(SourceProperty, value);
}
public BitmapFrame Source
{
get => (BitmapFrame) GetValue(SourceProperty);
set => SetValue(SourceProperty, value);
}
public static readonly DependencyProperty UserNameProperty = DependencyProperty.Register(
"DisplayName", typeof(string), typeof(Avatar), new PropertyMetadata(default(string)));
public static readonly DependencyProperty UserNameProperty = DependencyProperty.Register(
"DisplayName", typeof(string), typeof(Avatar), new PropertyMetadata(default(string)));
public string DisplayName
{
get => (string) GetValue(UserNameProperty);
set => SetValue(UserNameProperty, value);
}
public string DisplayName
{
get => (string) GetValue(UserNameProperty);
set => SetValue(UserNameProperty, value);
}
public static readonly DependencyProperty LinkProperty = DependencyProperty.Register(
"Link", typeof(string), typeof(Avatar), new PropertyMetadata(default(string)));
public static readonly DependencyProperty LinkProperty = DependencyProperty.Register(
"Link", typeof(string), typeof(Avatar), new PropertyMetadata(default(string)));
public string Link
{
get => (string) GetValue(LinkProperty);
set => SetValue(LinkProperty, value);
}
public string Link
{
get => (string) GetValue(LinkProperty);
set => SetValue(LinkProperty, value);
}
}
@@ -1,22 +1,21 @@
using System.Windows.Controls;
using HandyControl.Tools;
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class ChatBox
{
public partial class ChatBox
private ScrollViewer _scrollViewer;
public ChatBox()
{
private ScrollViewer _scrollViewer;
InitializeComponent();
ListBoxChat.ItemContainerGenerator.ItemsChanged += ItemContainerGenerator_ItemsChanged;
}
public ChatBox()
{
InitializeComponent();
ListBoxChat.ItemContainerGenerator.ItemsChanged += ItemContainerGenerator_ItemsChanged;
}
private void ItemContainerGenerator_ItemsChanged(object sender, System.Windows.Controls.Primitives.ItemsChangedEventArgs e)
{
_scrollViewer ??= VisualHelper.GetChild<ScrollViewer>(ListBoxChat);
_scrollViewer?.ScrollToBottom();
}
private void ItemContainerGenerator_ItemsChanged(object sender, System.Windows.Controls.Primitives.ItemsChangedEventArgs e)
{
_scrollViewer ??= VisualHelper.GetChild<ScrollViewer>(ListBoxChat);
_scrollViewer?.ScrollToBottom();
}
}
@@ -1,19 +1,18 @@
using System.Windows;
using HandyControlDemo.Data;
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class GeometryItem
{
public partial class GeometryItem
public GeometryItem() => InitializeComponent();
public static readonly DependencyProperty InfoProperty = DependencyProperty.Register(
"Info", typeof(GeometryItemModel), typeof(GeometryItem), new PropertyMetadata(default(GeometryItemModel)));
public GeometryItemModel Info
{
public GeometryItem() => InitializeComponent();
public static readonly DependencyProperty InfoProperty = DependencyProperty.Register(
"Info", typeof(GeometryItemModel), typeof(GeometryItem), new PropertyMetadata(default(GeometryItemModel)));
public GeometryItemModel Info
{
get => (GeometryItemModel) GetValue(InfoProperty);
set => SetValue(InfoProperty, value);
}
get => (GeometryItemModel) GetValue(InfoProperty);
set => SetValue(InfoProperty, value);
}
}
@@ -1,7 +1,6 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
internal interface IFull
{
internal interface IFull
{
}
}
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class InteractiveDialog
{
public partial class InteractiveDialog
public InteractiveDialog()
{
public InteractiveDialog()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class TextDialog
{
public partial class TextDialog
public TextDialog()
{
public TextDialog()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -2,23 +2,22 @@
using System.Windows.Controls.Primitives;
using HandyControl.Tools;
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class TextDialogWithTimer
{
public partial class TextDialogWithTimer
public TextDialogWithTimer()
{
public TextDialogWithTimer()
{
InitializeComponent();
InitializeComponent();
var animation = AnimationHelper.CreateAnimation(100, 5000);
animation.EasingFunction = null;
animation.Completed += Animation_Completed;
ProgressBarTimer.BeginAnimation(RangeBase.ValueProperty, animation);
}
var animation = AnimationHelper.CreateAnimation(100, 5000);
animation.EasingFunction = null;
animation.Completed += Animation_Completed;
ProgressBarTimer.BeginAnimation(RangeBase.ValueProperty, animation);
}
private void Animation_Completed(object sender, EventArgs e)
{
ButtonClose.Command.Execute(null);
}
private void Animation_Completed(object sender, EventArgs e)
{
ButtonClose.Command.Execute(null);
}
}
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class AnimationPathDemoCtl
{
public partial class AnimationPathDemoCtl
public AnimationPathDemoCtl()
{
public AnimationPathDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class AutoCompleteTextBoxDemoCtl
{
public partial class AutoCompleteTextBoxDemoCtl
public AutoCompleteTextBoxDemoCtl()
{
public AutoCompleteTextBoxDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -7,25 +7,25 @@
Background="{DynamicResource RegionBrush}"
DataContext="{Binding BadgeDemo, Source={StaticResource Locator}}">
<hc:TransitioningContentControl>
<StackPanel Margin="32" Orientation="Horizontal">
<hc:UniformSpacingPanel Margin="32" Spacing="32" ChildWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Center">
<hc:Badge Text="New" BadgeMargin="0,-14,-20,0" Height="30">
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Comment}}"/>
</hc:Badge>
<hc:Badge Text="New" BadgeMargin="0,-14,-20,0" Height="30" Margin="32,0,0,0" Style="{StaticResource BadgeDanger}">
<hc:Badge Text="New" BadgeMargin="0,-14,-20,0" Height="30" Style="{StaticResource BadgeDanger}">
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Comment}}"/>
</hc:Badge>
<hc:Badge Value="{Binding Count}" BadgeMargin="0,-14,-10,0" Height="30" Margin="32,0,0,0" Style="{StaticResource BadgePrimary}">
<hc:Badge Value="{Binding Count}" BadgeMargin="0,-14,-10,0" Height="30" Style="{StaticResource BadgePrimary}">
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Click2Count}}" Command="{Binding CountCmd}"/>
</hc:Badge>
<hc:Badge Value="100" BadgeMargin="0,-14,-20,0" Height="30" Margin="32,0,0,0" Style="{StaticResource BadgeDanger}">
<hc:Badge Value="100" BadgeMargin="0,-14,-20,0" Height="30" Style="{StaticResource BadgeDanger}">
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Comment}}"/>
</hc:Badge>
<hc:Badge Status="Dot" Height="30" Margin="32,0,0,0" Style="{StaticResource BadgeDanger}">
<hc:Badge Status="Dot" Height="30" Style="{StaticResource BadgeDanger}">
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Reply}}"/>
</hc:Badge>
<hc:Badge Status="Processing" Height="30" Margin="32,0,0,0" Style="{StaticResource BadgeDanger}">
<hc:Badge Status="Processing" Height="30" Style="{StaticResource BadgeDanger}">
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Reply}}" />
</hc:Badge>
</StackPanel>
</hc:UniformSpacingPanel>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class BadgeDemoCtl
{
public partial class BadgeDemoCtl
public BadgeDemoCtl()
{
public BadgeDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -6,67 +6,69 @@
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension">
<hc:TransitioningContentControl>
<WrapPanel Margin="16" VerticalAlignment="Center">
<StackPanel Margin="16">
<hc:ButtonGroup>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}" IsChecked="True"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
</hc:ButtonGroup>
<hc:ButtonGroup Margin="0,32,0,0">
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
</hc:ButtonGroup>
<hc:ButtonGroup Margin="0,32,0,0" Style="{StaticResource ButtonGroupSolid}">
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}" IsChecked="True"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
</hc:ButtonGroup>
<hc:ButtonGroup Margin="0,32,0,0">
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}" IsChecked="True"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}" IsChecked="True"/>
</hc:ButtonGroup>
</StackPanel>
<StackPanel Margin="16" Orientation="Horizontal">
<hc:ButtonGroup Orientation="Vertical">
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}" IsChecked="True"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
</hc:ButtonGroup>
<hc:ButtonGroup Margin="32,0,0,0" Orientation="Vertical">
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
</hc:ButtonGroup>
<hc:ButtonGroup Margin="32,0,0,0" Style="{StaticResource ButtonGroupSolid}" Orientation="Vertical">
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}" IsChecked="True"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
</hc:ButtonGroup>
<hc:ButtonGroup Margin="32,0,0,0" Orientation="Vertical">
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}" IsChecked="True"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}" IsChecked="True"/>
</hc:ButtonGroup>
</StackPanel>
</WrapPanel>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:UniformSpacingPanel Margin="32" Spacing="32" ChildWrapping="Wrap" VerticalAlignment="Center">
<hc:UniformSpacingPanel Spacing="32" Orientation="Vertical">
<hc:ButtonGroup>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}" IsChecked="True"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
</hc:ButtonGroup>
<hc:ButtonGroup>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
</hc:ButtonGroup>
<hc:ButtonGroup Style="{StaticResource ButtonGroupSolid}">
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}" IsChecked="True"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
</hc:ButtonGroup>
<hc:ButtonGroup>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}" IsChecked="True"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}" IsChecked="True"/>
</hc:ButtonGroup>
</hc:UniformSpacingPanel>
<hc:UniformSpacingPanel Spacing="32" ChildWrapping="Wrap">
<hc:ButtonGroup Orientation="Vertical">
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}" IsChecked="True"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
</hc:ButtonGroup>
<hc:ButtonGroup Orientation="Vertical">
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
</hc:ButtonGroup>
<hc:ButtonGroup Style="{StaticResource ButtonGroupSolid}" Orientation="Vertical">
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}" IsChecked="True"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
</hc:ButtonGroup>
<hc:ButtonGroup Orientation="Vertical">
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}" IsChecked="True"/>
<RadioButton Content="{ex:Lang Key={x:Static langs:LangKeys.RadioButton}}"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}" IsChecked="True"/>
</hc:ButtonGroup>
</hc:UniformSpacingPanel>
</hc:UniformSpacingPanel>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,40 +1,39 @@
using System.Windows;
using System.Windows.Media.Imaging;
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class ButtonGroupDemoCtl
{
public partial class ButtonGroupDemoCtl
public ButtonGroupDemoCtl()
{
public ButtonGroupDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(
"Source", typeof(BitmapFrame), typeof(Avatar), new PropertyMetadata(default(BitmapFrame)));
public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(
"Source", typeof(BitmapFrame), typeof(Avatar), new PropertyMetadata(default(BitmapFrame)));
public BitmapFrame Source
{
get => (BitmapFrame) GetValue(SourceProperty);
set => SetValue(SourceProperty, value);
}
public BitmapFrame Source
{
get => (BitmapFrame) GetValue(SourceProperty);
set => SetValue(SourceProperty, value);
}
public static readonly DependencyProperty UserNameProperty = DependencyProperty.Register(
"DisplayName", typeof(string), typeof(Avatar), new PropertyMetadata(default(string)));
public static readonly DependencyProperty UserNameProperty = DependencyProperty.Register(
"DisplayName", typeof(string), typeof(Avatar), new PropertyMetadata(default(string)));
public string DisplayName
{
get => (string) GetValue(UserNameProperty);
set => SetValue(UserNameProperty, value);
}
public string DisplayName
{
get => (string) GetValue(UserNameProperty);
set => SetValue(UserNameProperty, value);
}
public static readonly DependencyProperty LinkProperty = DependencyProperty.Register(
"Link", typeof(string), typeof(Avatar), new PropertyMetadata(default(string)));
public static readonly DependencyProperty LinkProperty = DependencyProperty.Register(
"Link", typeof(string), typeof(Avatar), new PropertyMetadata(default(string)));
public string Link
{
get => (string) GetValue(LinkProperty);
set => SetValue(LinkProperty, value);
}
public string Link
{
get => (string) GetValue(LinkProperty);
set => SetValue(LinkProperty, value);
}
}
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class CalendarWithClockDemoCtl
{
public partial class CalendarWithClockDemoCtl
public CalendarWithClockDemoCtl()
{
public CalendarWithClockDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -6,7 +6,7 @@
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:data="clr-namespace:HandyControlDemo.Data">
<hc:TransitioningContentControl>
<ListBox Margin="32" BorderThickness="0" Style="{StaticResource WrapPanelHorizontalListBox}" ItemsPanel="{StaticResource FluidMoveBehaviorWrapPanelItemsPanelTemplate}" ItemsSource="{Binding DataList}">
<ListBox Margin="32" hc:ScrollViewer.IsInertiaEnabled="True" BorderThickness="0" Style="{StaticResource WrapPanelHorizontalListBox}" ItemsPanel="{StaticResource FluidMoveBehaviorWrapPanelItemsPanelTemplate}" ItemsSource="{Binding DataList}">
<ListBox.ItemTemplate>
<DataTemplate DataType="data:CardModel">
<hc:Card MaxWidth="240" BorderThickness="0" Effect="{StaticResource EffectShadow2}" Margin="8" Footer="{Binding Footer}">
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class CardDemoCtl
{
public partial class CardDemoCtl
public CardDemoCtl()
{
public CardDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -4,7 +4,7 @@
Background="{DynamicResource RegionBrush}"
xmlns:hc="https://handyorg.github.io/handycontrol">
<hc:TransitioningContentControl>
<hc:Carousel Margin="32" IsCenter="True" AutoRun="True" Width="600" Height="330" VerticalAlignment="Center">
<hc:Carousel Margin="32" IsCenter="True" AutoRun="True" MaxWidth="600" Height="330" VerticalAlignment="Center">
<Image Width="600" Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/1.jpg"/>
<Image Width="300" Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/2.jpg"/>
<hc:SimplePanel Width="600">
@@ -1,11 +1,10 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class CarouselDemoCtl
{
public partial class CarouselDemoCtl
public CarouselDemoCtl()
{
public CarouselDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -5,17 +5,19 @@
xmlns:hc="https://handyorg.github.io/handycontrol"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<StackPanel Orientation="Horizontal" Margin="32">
<userControl:ChatBox>
<userControl:ChatBox.Background>
<ImageBrush ImageSource="/HandyControlDemo;component/Resources/Img/Chat/chat_back1.jpg" Stretch="Uniform"/>
</userControl:ChatBox.Background>
</userControl:ChatBox>
<userControl:ChatBox Margin="32,0,0,0">
<userControl:ChatBox.Background>
<ImageBrush ImageSource="/HandyControlDemo;component/Resources/Img/Chat/chat_back2.jpg" Stretch="Uniform"/>
</userControl:ChatBox.Background>
</userControl:ChatBox>
</StackPanel>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:UniformSpacingPanel Spacing="32" ChildWrapping="Wrap" Margin="32">
<userControl:ChatBox>
<userControl:ChatBox.Background>
<ImageBrush ImageSource="/HandyControlDemo;component/Resources/Img/Chat/chat_back1.jpg" Stretch="Uniform"/>
</userControl:ChatBox.Background>
</userControl:ChatBox>
<userControl:ChatBox>
<userControl:ChatBox.Background>
<ImageBrush ImageSource="/HandyControlDemo;component/Resources/Img/Chat/chat_back2.jpg" Stretch="Uniform"/>
</userControl:ChatBox.Background>
</userControl:ChatBox>
</hc:UniformSpacingPanel>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class ChatBubbleDemoCtl
{
public partial class ChatBubbleDemoCtl
public ChatBubbleDemoCtl()
{
public ChatBubbleDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,13 +1,13 @@
<UserControl x:Class="HandyControlDemo.UserControl.CheckComboBoxDemoCtl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="{Binding ComboBoxDemo,Source={StaticResource Locator}}"
DataContext="{Binding InputElementDemo,Source={StaticResource Locator}}"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
xmlns:hc="https://handyorg.github.io/handycontrol"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<ScrollViewer>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:UniformSpacingPanel Spacing="32" Margin="32" ChildWrapping="Wrap">
<StackPanel>
<hc:CheckComboBox ShowClearButton="True" MaxWidth="380" ItemsSource="{Binding DataList}" ShowSelectAllButton="True"/>
@@ -50,6 +50,6 @@
<hc:CheckComboBox MaxWidth="380" ItemsSource="{Binding DataList}" ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource CheckComboBoxPlus.Small}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
</StackPanel>
</hc:UniformSpacingPanel>
</ScrollViewer>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class CheckComboBoxDemoCtl
{
public partial class CheckComboBoxDemoCtl
public CheckComboBoxDemoCtl()
{
public CheckComboBoxDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class CirclePanelDemoCtl
{
public partial class CirclePanelDemoCtl
public CirclePanelDemoCtl()
{
public CirclePanelDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -4,9 +4,11 @@
xmlns:hc="https://handyorg.github.io/handycontrol"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<StackPanel Orientation="Horizontal" Margin="32">
<hc:Clock/>
<hc:ListClock Margin="16,0,0,0"/>
</StackPanel>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:UniformSpacingPanel Spacing="16" ChildWrapping="Wrap" Margin="32">
<hc:Clock/>
<hc:ListClock/>
</hc:UniformSpacingPanel>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,11 +1,10 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class ClockDemoCtl
{
public partial class ClockDemoCtl
public ClockDemoCtl()
{
public ClockDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,11 +1,10 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class ColorPickerDemoCtl
{
public partial class ColorPickerDemoCtl
public ColorPickerDemoCtl()
{
public ColorPickerDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,13 +1,13 @@
<UserControl x:Class="HandyControlDemo.UserControl.ComboBoxDemoCtl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="{Binding ComboBoxDemo,Source={StaticResource Locator}}"
DataContext="{Binding InputElementDemo,Source={StaticResource Locator}}"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<ScrollViewer>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:UniformSpacingPanel Spacing="32" Margin="32" ChildWrapping="Wrap">
<StackPanel>
<hc:ComboBox ShowClearButton="True" ItemsSource="{Binding DataList}" SelectedIndex="0"/>
@@ -40,6 +40,6 @@
<hc:ComboBox AutoComplete="True" ShowClearButton="True" ItemsSource="{Binding DataList}" IsEditable="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" hc:InfoElement.Necessary="True" Margin="0,32,0,0" Style="{StaticResource ComboBoxPlus.Small}"/>
</StackPanel>
</hc:UniformSpacingPanel>
</ScrollViewer>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class ComboBoxDemoCtl
{
public partial class ComboBoxDemoCtl
public ComboBoxDemoCtl()
{
public ComboBoxDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -4,7 +4,7 @@
xmlns:hc="https://handyorg.github.io/handycontrol"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<hc:ScrollViewer VerticalAlignment="Center">
<hc:ScrollViewer IsInertiaEnabled="True">
<WrapPanel ItemHeight="384" ItemWidth="632">
<hc:CompareSlider Value="5" Width="600" Height="352">
<hc:CompareSlider.TargetContent>
@@ -1,11 +1,10 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class CompareSliderDemoCtl
{
public partial class CompareSliderDemoCtl
public CompareSliderDemoCtl()
{
public CompareSliderDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -4,6 +4,8 @@
xmlns:hc="https://handyorg.github.io/handycontrol"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<hc:CoverFlow x:Name="CoverFlowMain" Margin="32" Width="500" Height="300"/>
<Viewbox MaxWidth="500">
<hc:CoverFlow x:Name="CoverFlowMain" Margin="32" Width="500" Height="300"/>
</Viewbox>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,28 +1,27 @@
using System;
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class CoverFlowDemoCtl
{
public partial class CoverFlowDemoCtl
public CoverFlowDemoCtl()
{
public CoverFlowDemoCtl()
InitializeComponent();
CoverFlowMain.AddRange(new[]
{
InitializeComponent();
new Uri(@"pack://application:,,,/Resources/Img/Album/1.jpg"),
new Uri(@"pack://application:,,,/Resources/Img/Album/2.jpg"),
new Uri(@"pack://application:,,,/Resources/Img/Album/3.jpg"),
new Uri(@"pack://application:,,,/Resources/Img/Album/4.jpg"),
new Uri(@"pack://application:,,,/Resources/Img/Album/5.jpg"),
new Uri(@"pack://application:,,,/Resources/Img/Album/6.jpg"),
new Uri(@"pack://application:,,,/Resources/Img/Album/7.jpg"),
new Uri(@"pack://application:,,,/Resources/Img/Album/8.jpg"),
new Uri(@"pack://application:,,,/Resources/Img/Album/9.jpg"),
new Uri(@"pack://application:,,,/Resources/Img/Album/10.jpg")
});
CoverFlowMain.AddRange(new[]
{
new Uri(@"pack://application:,,,/Resources/Img/Album/1.jpg"),
new Uri(@"pack://application:,,,/Resources/Img/Album/2.jpg"),
new Uri(@"pack://application:,,,/Resources/Img/Album/3.jpg"),
new Uri(@"pack://application:,,,/Resources/Img/Album/4.jpg"),
new Uri(@"pack://application:,,,/Resources/Img/Album/5.jpg"),
new Uri(@"pack://application:,,,/Resources/Img/Album/6.jpg"),
new Uri(@"pack://application:,,,/Resources/Img/Album/7.jpg"),
new Uri(@"pack://application:,,,/Resources/Img/Album/8.jpg"),
new Uri(@"pack://application:,,,/Resources/Img/Album/9.jpg"),
new Uri(@"pack://application:,,,/Resources/Img/Album/10.jpg")
});
CoverFlowMain.PageIndex = 2;
}
CoverFlowMain.PageIndex = 2;
}
}
@@ -7,19 +7,21 @@
DataContext="{Binding CoverView,Source={StaticResource Locator}}"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<hc:CoverView Margin="27" Width="880" Height="432" ItemWidth="160" ItemHeight="160" ItemsSource="{Binding DataList}">
<hc:CoverView.ItemHeaderTemplate>
<DataTemplate>
<Image Source="{Binding ImgPath}"/>
</DataTemplate>
</hc:CoverView.ItemHeaderTemplate>
<hc:CoverView.ItemTemplate>
<DataTemplate>
<Border Margin="10" Height="300" Background="{Binding BackgroundToken,Converter={StaticResource String2BrushConverter}}">
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</DataTemplate>
</hc:CoverView.ItemTemplate>
</hc:CoverView>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:CoverView Margin="27" MaxWidth="880" ItemWidth="160" ItemHeight="160" ItemsSource="{Binding DataList}">
<hc:CoverView.ItemHeaderTemplate>
<DataTemplate>
<Image Source="{Binding ImgPath}"/>
</DataTemplate>
</hc:CoverView.ItemHeaderTemplate>
<hc:CoverView.ItemTemplate>
<DataTemplate>
<Border Margin="10" Height="300" Background="{Binding BackgroundToken,Converter={StaticResource String2BrushConverter}}">
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</DataTemplate>
</hc:CoverView.ItemTemplate>
</hc:CoverView>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class CoverViewDemoCtl
{
public partial class CoverViewDemoCtl
public CoverViewDemoCtl()
{
public CoverViewDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -7,16 +7,29 @@
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<StackPanel Margin="32">
<hc:DatePicker ShowClearButton="True" SelectedDate="{x:Static system:DateTime.Now}"/>
<hc:DatePicker Margin="0,16,0,0" IsEnabled="False" SelectedDate="{x:Static system:DateTime.Now}"/>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:UniformSpacingPanel Spacing="32" Margin="32" ChildWrapping="Wrap">
<StackPanel>
<hc:DatePicker ShowClearButton="True" SelectedDate="{x:Static system:DateTime.Now}"/>
<hc:DatePicker Margin="0,16,0,0" IsEnabled="False" SelectedDate="{x:Static system:DateTime.Now}"/>
<hc:DatePicker ShowClearButton="True" SelectedDate="{x:Static system:DateTime.Now}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0"/>
<hc:DatePicker SelectedDate="{x:Static system:DateTime.Now}" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
<hc:DatePicker ShowClearButton="True" SelectedDate="{x:Static system:DateTime.Now}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0"/>
<hc:DatePicker SelectedDate="{x:Static system:DateTime.Now}" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
<hc:DatePicker ShowClearButton="True" SelectedDate="{x:Static system:DateTime.Now}" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0"/>
<hc:DatePicker Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
<hc:DatePicker ShowClearButton="True" SelectedDate="{x:Static system:DateTime.Now}" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0"/>
<hc:DatePicker Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
</StackPanel>
<StackPanel>
<hc:DatePicker ShowClearButton="True" SelectedDate="{x:Static system:DateTime.Now}" Style="{StaticResource DatePickerPlus.Small}"/>
<hc:DatePicker Margin="0,16,0,0" IsEnabled="False" SelectedDate="{x:Static system:DateTime.Now}" Style="{StaticResource DatePickerPlus.Small}"/>
</StackPanel>
<hc:DatePicker ShowClearButton="True" SelectedDate="{x:Static system:DateTime.Now}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Style="{StaticResource DatePickerPlus.Small}"/>
<hc:DatePicker SelectedDate="{x:Static system:DateTime.Now}" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" hc:InfoElement.Necessary="True" Margin="0,16,0,0" Style="{StaticResource DatePickerPlus.Small}"/>
<hc:DatePicker ShowClearButton="True" SelectedDate="{x:Static system:DateTime.Now}" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0" Style="{StaticResource DatePickerPlus.Small}"/>
<hc:DatePicker Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" hc:InfoElement.Necessary="True" Margin="0,16,0,0" Style="{StaticResource DatePickerPlus.Small}"/>
</StackPanel>
</hc:UniformSpacingPanel>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class DatePickerDemoCtl
{
public partial class DatePickerDemoCtl
public DatePickerDemoCtl()
{
public DatePickerDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -6,27 +6,49 @@
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<StackPanel Margin="32" Orientation="Horizontal">
<StackPanel>
<hc:DateTimePicker ShowClearButton="True"/>
<hc:DateTimePicker Margin="0,16,0,0" IsEnabled="False"/>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:UniformSpacingPanel Spacing="32" Margin="32" ChildWrapping="Wrap">
<StackPanel>
<hc:DateTimePicker ShowClearButton="True"/>
<hc:DateTimePicker Margin="0,16,0,0" IsEnabled="False"/>
<hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerExtend}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0"/>
<hc:DateTimePicker hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" Style="{StaticResource DateTimePickerExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
<hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerExtend}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0"/>
<hc:DateTimePicker hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" Style="{StaticResource DateTimePickerExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
<hc:DateTimePicker ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" Style="{StaticResource DateTimePickerExtend}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0"/>
<hc:DateTimePicker Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource DateTimePickerExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
</StackPanel>
<StackPanel Margin="32,0,0,0">
<hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerPlus}"/>
<hc:DateTimePicker Margin="0,16,0,0" IsEnabled="False" Style="{StaticResource DateTimePickerPlus}"/>
<hc:DateTimePicker ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" Style="{StaticResource DateTimePickerExtend}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0"/>
<hc:DateTimePicker Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource DateTimePickerExtend}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
</StackPanel>
<StackPanel>
<hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerPlus}"/>
<hc:DateTimePicker Margin="0,16,0,0" IsEnabled="False" Style="{StaticResource DateTimePickerPlus}"/>
<hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerPlus}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0"/>
<hc:DateTimePicker hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" Style="{StaticResource DateTimePickerPlus}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
<hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerPlus}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0"/>
<hc:DateTimePicker hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" Style="{StaticResource DateTimePickerPlus}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
<hc:DateTimePicker ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" Style="{StaticResource DateTimePickerPlus}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0"/>
<hc:DateTimePicker Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource DateTimePickerPlus}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
</StackPanel>
</StackPanel>
<hc:DateTimePicker ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" Style="{StaticResource DateTimePickerPlus}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0"/>
<hc:DateTimePicker Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource DateTimePickerPlus}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
</StackPanel>
<StackPanel>
<hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePicker.Small}"/>
<hc:DateTimePicker Margin="0,16,0,0" IsEnabled="False" Style="{StaticResource DateTimePicker.Small}"/>
<hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerExtend.Small}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0"/>
<hc:DateTimePicker hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" Style="{StaticResource DateTimePickerExtend.Small}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
<hc:DateTimePicker ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" Style="{StaticResource DateTimePickerExtend.Small}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0"/>
<hc:DateTimePicker Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource DateTimePickerExtend.Small}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
</StackPanel>
<StackPanel>
<hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerPlus.Small}"/>
<hc:DateTimePicker Margin="0,16,0,0" IsEnabled="False" Style="{StaticResource DateTimePickerPlus.Small}"/>
<hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerPlus.Small}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0"/>
<hc:DateTimePicker hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" Style="{StaticResource DateTimePickerPlus.Small}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
<hc:DateTimePicker ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" Style="{StaticResource DateTimePickerPlus.Small}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0"/>
<hc:DateTimePicker Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource DateTimePickerPlus.Small}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
</StackPanel>
</hc:UniformSpacingPanel>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class DateTimePickerDemoCtl
{
public partial class DateTimePickerDemoCtl
public DateTimePickerDemoCtl()
{
public DateTimePickerDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class DialogDemoCtl
{
public partial class DialogDemoCtl
public DialogDemoCtl()
{
public DialogDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -6,39 +6,41 @@
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension">
<hc:TransitioningContentControl>
<WrapPanel Margin="16">
<StackPanel Margin="16" Width="300">
<hc:Divider/>
<hc:Divider Content="{ex:Lang Key={x:Static langs:LangKeys.Title}}"/>
<hc:Divider Content="{ex:Lang Key={x:Static langs:LangKeys.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="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HorizontalContentAlignment="Left"/>
<hc:Divider Content="{ex:Lang Key={x:Static langs:LangKeys.Title}}" Padding="10,0" HorizontalContentAlignment="Right"/>
<StackPanel Orientation="Horizontal">
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<hc:Divider Orientation="Vertical" MaxHeight="16"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<hc:Divider Orientation="Vertical" MaxHeight="16"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:UniformSpacingPanel Margin="32" Spacing="32" ChildWrapping="Wrap">
<StackPanel Width="300">
<hc:Divider/>
<hc:Divider Content="{ex:Lang Key={x:Static langs:LangKeys.Title}}"/>
<hc:Divider Content="{ex:Lang Key={x:Static langs:LangKeys.Title}}" Padding="10,0"/>
<hc:Divider LineStrokeThickness="2" LineStroke="{DynamicResource DarkPrimaryBrush}"/>
<hc:Divider LineStrokeDashArray="2,2"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,16,0,0">
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<hc:Divider LineStrokeThickness="2" Orientation="Vertical" MaxHeight="16"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<hc:Divider LineStrokeThickness="2" Orientation="Vertical" MaxHeight="16"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<StackPanel Width="300">
<hc:Divider Content="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HorizontalContentAlignment="Left"/>
<hc:Divider Content="{ex:Lang Key={x:Static langs:LangKeys.Title}}" Padding="10,0" HorizontalContentAlignment="Right"/>
<StackPanel Orientation="Horizontal">
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<hc:Divider Orientation="Vertical" MaxHeight="16"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<hc:Divider Orientation="Vertical" MaxHeight="16"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,16,0,0">
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<hc:Divider LineStrokeThickness="2" Orientation="Vertical" MaxHeight="16"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<hc:Divider LineStrokeThickness="2" Orientation="Vertical" MaxHeight="16"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,16,0,0">
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<hc:Divider LineStrokeThickness="2" LineStroke="{DynamicResource DarkPrimaryBrush}" Orientation="Vertical" MaxHeight="16"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<hc:Divider LineStrokeThickness="2" LineStroke="{DynamicResource DarkPrimaryBrush}" Orientation="Vertical" MaxHeight="16"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,16,0,0">
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<hc:Divider LineStrokeThickness="2" LineStroke="{DynamicResource DarkPrimaryBrush}" Orientation="Vertical" MaxHeight="16"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<hc:Divider LineStrokeThickness="2" LineStroke="{DynamicResource DarkPrimaryBrush}" Orientation="Vertical" MaxHeight="16"/>
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
</StackPanel>
</StackPanel>
</WrapPanel>
</hc:UniformSpacingPanel>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class DividerDemoCtl
{
public partial class DividerDemoCtl
public DividerDemoCtl()
{
public DividerDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class DrawerDemoCtl
{
public partial class DrawerDemoCtl
public DrawerDemoCtl()
{
public DrawerDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -6,8 +6,20 @@
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension">
<hc:TransitioningContentControl>
<StackPanel Margin="32" VerticalAlignment="Center">
<hc:ElementGroup Orientation="Horizontal">
<hc:UniformSpacingPanel Margin="32" VerticalAlignment="Center" Orientation="Vertical" Spacing="16">
<hc:ElementGroup Orientation="Horizontal" Layout="Stack">
<Button HorizontalAlignment="Stretch" Width="auto" Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<Button HorizontalAlignment="Stretch" Width="auto" Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<Button HorizontalAlignment="Stretch" Width="auto" Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<Button HorizontalAlignment="Stretch" Width="auto" Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
</hc:ElementGroup>
<hc:ElementGroup Orientation="Horizontal" MaxWidth="500">
<ToggleButton HorizontalAlignment="Stretch" Width="auto" Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
<Button HorizontalAlignment="Stretch" Width="auto" Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<ToggleButton HorizontalAlignment="Stretch" Width="auto" Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
<Button HorizontalAlignment="Stretch" Width="auto" Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
</hc:ElementGroup>
<hc:ElementGroup Orientation="Horizontal" Layout="Stack">
<Border Style="{StaticResource BorderRegion}" Padding="6,0">
<Path Data="{StaticResource ClockGeometry}" Width="16" Height="16" Stretch="Uniform" Fill="{DynamicResource BorderBrush}"/>
</Border>
@@ -15,11 +27,20 @@
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
</hc:ElementGroup>
<hc:ElementGroup Margin="0,16,0,0">
<TextBox/>
<Button HorizontalAlignment="Stretch" Width="auto" Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
<ToggleButton HorizontalAlignment="Stretch" Width="auto" Content="{ex:Lang Key={x:Static langs:LangKeys.ToggleButton}}"/>
<hc:ElementGroup>
<hc:ElementGroup.ItemsPanel>
<ItemsPanelTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
</Grid>
</ItemsPanelTemplate>
</hc:ElementGroup.ItemsPanel>
<TextBox HorizontalAlignment="Stretch" DockPanel.Dock="Left"/>
<Button Grid.Column="1" Width="100" Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}" DockPanel.Dock="Right" HorizontalAlignment="Right" Style="{StaticResource ButtonPrimary}"/>
</hc:ElementGroup>
</StackPanel>
</hc:UniformSpacingPanel>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class ElementGroupDemoCtl
{
public partial class ElementGroupDemoCtl
public ElementGroupDemoCtl()
{
public ElementGroupDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -12,7 +12,7 @@
</Style>
</UserControl.Resources>
<hc:TransitioningContentControl>
<ScrollViewer>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:FlexPanel Margin="32" AlignItems="FlexStart" AlignContent="SpaceBetween" JustifyContent="SpaceAround" FlexWrap="WrapReverse" FlexDirection="RowReverse">
<Border hc:FlexPanel.Order="99" Height="50" Style="{StaticResource Border4FlexPanelDemoStyle}">
<TextBlock Text="0" Style="{StaticResource TextBlockTitle}"/>
@@ -45,6 +45,6 @@
<TextBlock Text="9" Style="{StaticResource TextBlockTitle}"/>
</Border>
</hc:FlexPanel>
</ScrollViewer>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class FlexPanelDemoCtl : IFull
{
public partial class FlexPanelDemoCtl : IFull
public FlexPanelDemoCtl()
{
public FlexPanelDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -4,6 +4,8 @@
Background="{DynamicResource RegionBrush}"
xmlns:hc="https://handyorg.github.io/handycontrol">
<hc:TransitioningContentControl>
<hc:FlipClock Margin="32"/>
<Viewbox MaxWidth="520">
<hc:FlipClock Margin="32"/>
</Viewbox>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class FlipClockDemoCtl
{
public partial class FlipClockDemoCtl
public FlipClockDemoCtl()
{
public FlipClockDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class FloatingBlockDemoCtl
{
public partial class FloatingBlockDemoCtl
public FloatingBlockDemoCtl()
{
public FloatingBlockDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,17 +1,16 @@
using System;
namespace HandyControlDemo.UserControl
{
public partial class GifImageDemoCtl : IDisposable
{
public GifImageDemoCtl()
{
InitializeComponent();
}
namespace HandyControlDemo.UserControl;
public void Dispose()
{
GifImageMain.Dispose();
}
public partial class GifImageDemoCtl : IDisposable
{
public GifImageDemoCtl()
{
InitializeComponent();
}
public void Dispose()
{
GifImageMain.Dispose();
}
}
@@ -4,7 +4,7 @@
xmlns:hc="https://handyorg.github.io/handycontrol"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<hc:SimplePanel Width="500" Height="400">
<hc:SimplePanel Height="400">
<hc:ScrollViewer Name="ScrollViewerDemo" IsInertiaEnabled="True" Margin="0,10,0,0">
<Border Height="2000" Margin="8,0">
<Border.Background>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class GotoTopDemoCtl
{
public partial class GotoTopDemoCtl
public GotoTopDemoCtl()
{
public GotoTopDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -4,24 +4,26 @@
xmlns:hc="https://handyorg.github.io/handycontrol"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<StackPanel Margin="32" Orientation="Horizontal">
<UniformGrid Rows="3" Columns="3" Width="240" Height="240">
<hc:Gravatar Id="User1"/>
<hc:Gravatar Id="User2"/>
<hc:Gravatar Style="{StaticResource GravatarCircleImg}">
<Image Source="/HandyControlDemo;component/Resources/Img/Album/2.jpg"/>
</hc:Gravatar>
<hc:Gravatar Id="User4"/>
<hc:Gravatar Id="User5" Style="{StaticResource GravatarCircle}"/>
<hc:Gravatar Id="User6"/>
<hc:Gravatar Style="{StaticResource GravatarCircle}" Source="/HandyControlDemo;component/Resources/Img/Album/1.jpg"/>
<hc:Gravatar Id="User8"/>
<hc:Gravatar Id="User9"/>
</UniformGrid>
<StackPanel Margin="16,0,0,0" Height="220" VerticalAlignment="Center">
<TextBox Text="User1" Name="TextBoxName" Width="180"/>
<hc:Gravatar Height="180" Width="180" Id="{Binding Text,ElementName=TextBoxName}" Margin="10"/>
</StackPanel>
</StackPanel>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:UniformSpacingPanel Margin="32" ChildWrapping="Wrap" Spacing="16" ItemHorizontalAlignment="Center">
<UniformGrid Rows="3" Columns="3" Width="240" Height="240">
<hc:Gravatar Id="User1"/>
<hc:Gravatar Id="User2"/>
<hc:Gravatar Style="{StaticResource GravatarCircleImg}">
<Image Source="/HandyControlDemo;component/Resources/Img/Album/2.jpg"/>
</hc:Gravatar>
<hc:Gravatar Id="User4"/>
<hc:Gravatar Id="User5" Style="{StaticResource GravatarCircle}"/>
<hc:Gravatar Id="User6"/>
<hc:Gravatar Style="{StaticResource GravatarCircle}" Source="/HandyControlDemo;component/Resources/Img/Album/1.jpg"/>
<hc:Gravatar Id="User8"/>
<hc:Gravatar Id="User9"/>
</UniformGrid>
<StackPanel Width="240" Height="220" VerticalAlignment="Center">
<TextBox Text="User1" Name="TextBoxName" Width="180"/>
<hc:Gravatar Height="180" Width="180" Id="{Binding Text,ElementName=TextBoxName}" Margin="10"/>
</StackPanel>
</hc:UniformSpacingPanel>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class GravatarDemoCtl
{
public partial class GravatarDemoCtl
public GravatarDemoCtl()
{
public GravatarDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -6,7 +6,7 @@
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<ScrollViewer>
<hc:ScrollViewer IsInertiaEnabled="True">
<StackPanel Margin="32">
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.BasicLayout}}" Style="{StaticResource TextBlockLargeBold}" HorizontalAlignment="Left"/>
<hc:Row Margin="0,20,0,0">
@@ -154,5 +154,5 @@
</hc:Col>
</hc:Row>
</StackPanel>
</ScrollViewer>
</hc:ScrollViewer>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class GridDemoCtl : IFull
{
public partial class GridDemoCtl : IFull
public GridDemoCtl()
{
public GridDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,11 +1,10 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class GrowlDemoCtl
{
public partial class GrowlDemoCtl
public GrowlDemoCtl()
{
public GrowlDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class HoneycombPanelDemoCtl
{
public partial class HoneycombPanelDemoCtl
public HoneycombPanelDemoCtl()
{
public HoneycombPanelDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -4,17 +4,19 @@
Background="{DynamicResource RegionBrush}"
xmlns:hc="https://handyorg.github.io/handycontrol">
<hc:TransitioningContentControl>
<UniformGrid Rows="3" Columns="4" Margin="32">
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="0" EndColumn="7" EndRow="0" Width="110" Height="128" IsPlaying="True"/>
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="1" EndColumn="7" EndRow="1" Width="110" Height="128" IsPlaying="True"/>
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="2" EndColumn="7" EndRow="2" Width="110" Height="128" IsPlaying="{Binding IsMouseOver,RelativeSource={RelativeSource Self}}"/>
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="3" EndColumn="7" EndRow="3" Width="110" Height="128" IsPlaying="{Binding IsMouseOver,RelativeSource={RelativeSource Self}}"/>
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.1" Columns="8" Rows="10" StartColumn="0" StartRow="4" EndColumn="7" EndRow="4" Width="110" Height="128" IsPlaying="True"/>
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="5" EndColumn="7" EndRow="5" Width="110" Height="128" IsPlaying="True"/>
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="6" EndColumn="7" EndRow="6" Width="110" Height="128" IsPlaying="{Binding IsMouseOver,RelativeSource={RelativeSource Self}}"/>
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.1" Columns="8" Rows="10" StartColumn="0" StartRow="7" EndColumn="7" EndRow="7" Width="110" Height="128" IsPlaying="True"/>
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="8" EndColumn="7" EndRow="8" Width="110" Height="128" IsPlaying="{Binding IsMouseOver,RelativeSource={RelativeSource Self}}"/>
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="9" EndColumn="7" EndRow="9" Width="110" Height="128" IsPlaying="{Binding IsMouseOver,RelativeSource={RelativeSource Self}}"/>
</UniformGrid>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:UniformSpacingPanel Margin="32" ChildWrapping="Wrap" HorizontalAlignment="Center" VerticalAlignment="Center" ItemWidth="110" ItemHeight="128">
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="0" EndColumn="7" EndRow="0" IsPlaying="True"/>
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="1" EndColumn="7" EndRow="1" IsPlaying="True"/>
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="2" EndColumn="7" EndRow="2" IsPlaying="{Binding IsMouseOver,RelativeSource={RelativeSource Self}}"/>
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="3" EndColumn="7" EndRow="3" IsPlaying="{Binding IsMouseOver,RelativeSource={RelativeSource Self}}"/>
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.1" Columns="8" Rows="10" StartColumn="0" StartRow="4" EndColumn="7" EndRow="4" IsPlaying="True"/>
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="5" EndColumn="7" EndRow="5" IsPlaying="True"/>
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="6" EndColumn="7" EndRow="6" IsPlaying="{Binding IsMouseOver,RelativeSource={RelativeSource Self}}"/>
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.1" Columns="8" Rows="10" StartColumn="0" StartRow="7" EndColumn="7" EndRow="7" IsPlaying="True"/>
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="8" EndColumn="7" EndRow="8" IsPlaying="{Binding IsMouseOver,RelativeSource={RelativeSource Self}}"/>
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="9" EndColumn="7" EndRow="9" IsPlaying="{Binding IsMouseOver,RelativeSource={RelativeSource Self}}"/>
</hc:UniformSpacingPanel>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class ImageBlockDemoCtl
{
public partial class ImageBlockDemoCtl
public ImageBlockDemoCtl()
{
public ImageBlockDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -8,7 +8,7 @@
xmlns:hc="https://handyorg.github.io/handycontrol">
<hc:TransitioningContentControl>
<StackPanel Margin="32">
<hc:ImageViewer Background="{DynamicResource SecondaryRegionBrush}" Width="600" Height="330" ImageSource="/HandyControlDemo;component/Resources/Img/1.jpg"/>
<hc:ImageViewer Background="{DynamicResource SecondaryRegionBrush}" MaxWidth="600" Height="330" ImageSource="/HandyControlDemo;component/Resources/Img/1.jpg"/>
<Button Margin="0,32,0,0" Command="{Binding OpenImgCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.OpenImageBrowser}}" Style="{StaticResource ButtonPrimary}" HorizontalAlignment="Center"/>
</StackPanel>
</hc:TransitioningContentControl>
@@ -1,11 +1,10 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class ImageBrowserDemoCtl
{
public partial class ImageBrowserDemoCtl
public ImageBrowserDemoCtl()
{
public ImageBrowserDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -4,13 +4,15 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol">
<hc:TransitioningContentControl>
<UniformGrid Columns="3" Margin="16">
<hc:ImageSelector Width="100" Height="100" Margin="16"/>
<hc:ImageSelector Width="100" Height="100" Margin="16" hc:BorderElement.CornerRadius="50"/>
<hc:ImageSelector Width="100" Height="100" Margin="16" hc:BorderElement.CornerRadius="50" StrokeDashArray="10,5"/>
<hc:ImageSelector Width="100" Height="100" Margin="16" hc:BorderElement.CornerRadius="50" BorderBrush="{DynamicResource SuccessBrush}"/>
<hc:ImageSelector Width="100" Height="100" Margin="16" hc:BorderElement.CornerRadius="50" StrokeDashArray="10,5,10" BorderBrush="{DynamicResource DangerBrush}"/>
<hc:ImageSelector Width="100" Height="100" Margin="16" hc:BorderElement.CornerRadius="10" StrokeThickness="2" BorderThickness="2" BorderBrush="{DynamicResource PrimaryBrush}"/>
</UniformGrid>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:UniformSpacingPanel Margin="32" ChildWrapping="Wrap" VerticalAlignment="Center" Spacing="32" HorizontalAlignment="Center">
<hc:ImageSelector Width="100" Height="100"/>
<hc:ImageSelector Width="100" Height="100" hc:BorderElement.CornerRadius="50"/>
<hc:ImageSelector Width="100" Height="100" hc:BorderElement.CornerRadius="50" StrokeDashArray="10,5"/>
<hc:ImageSelector Width="100" Height="100" hc:BorderElement.CornerRadius="50" BorderBrush="{DynamicResource SuccessBrush}"/>
<hc:ImageSelector Width="100" Height="100" hc:BorderElement.CornerRadius="50" StrokeDashArray="10,5,10" BorderBrush="{DynamicResource DangerBrush}"/>
<hc:ImageSelector Width="100" Height="100" hc:BorderElement.CornerRadius="10" StrokeThickness="2" BorderThickness="2" BorderBrush="{DynamicResource PrimaryBrush}"/>
</hc:UniformSpacingPanel>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class ImageSelectorDemoCtl
{
public partial class ImageSelectorDemoCtl
public ImageSelectorDemoCtl()
{
public ImageSelectorDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,11 +1,10 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class LoadingDemoCtl
{
public partial class LoadingDemoCtl
public LoadingDemoCtl()
{
public LoadingDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -4,14 +4,16 @@
Background="{DynamicResource RegionBrush}"
xmlns:hc="https://handyorg.github.io/handycontrol">
<hc:TransitioningContentControl>
<WrapPanel Margin="16">
<Image Margin="16" hc:Magnifier.Instance="{x:Static hc:Magnifier.Default}" Source="/HandyControlDemo;component/Resources/Img/b1.jpg" Stretch="None" RenderOptions.BitmapScalingMode="NearestNeighbor"/>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:UniformSpacingPanel ChildWrapping="Wrap" Spacing="32" Margin="32">
<Image hc:Magnifier.Instance="{x:Static hc:Magnifier.Default}" Source="/HandyControlDemo;component/Resources/Img/b1.jpg" Stretch="None" RenderOptions.BitmapScalingMode="NearestNeighbor"/>
<Image Margin="16" Source="/HandyControlDemo;component/Resources/Img/b1.jpg" Stretch="None" RenderOptions.BitmapScalingMode="NearestNeighbor">
<hc:Magnifier.Instance>
<hc:Magnifier Scale="6" HorizontalOffset="-16" VerticalOffset="-16"/>
</hc:Magnifier.Instance>
</Image>
</WrapPanel>
<Image Source="/HandyControlDemo;component/Resources/Img/b1.jpg" Stretch="None" RenderOptions.BitmapScalingMode="NearestNeighbor">
<hc:Magnifier.Instance>
<hc:Magnifier Scale="6" HorizontalOffset="-16" VerticalOffset="-16"/>
</hc:Magnifier.Instance>
</Image>
</hc:UniformSpacingPanel>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class MagnifierDemoCtl
{
public partial class MagnifierDemoCtl
public MagnifierDemoCtl()
{
public MagnifierDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class NotificationDemoCtl
{
public partial class NotificationDemoCtl
public NotificationDemoCtl()
{
public NotificationDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -2,20 +2,19 @@
using HandyControlDemo.Tools;
using HandyControlDemo.ViewModel;
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class NotifyIconDemoCtl
{
public partial class NotifyIconDemoCtl
public NotifyIconDemoCtl()
{
public NotifyIconDemoCtl()
{
InitializeComponent();
InitializeComponent();
AssemblyHelper.Register(nameof(NotifyIconDemoCtl), this);
Unloaded += NotifyIconDemoCtl_Unloaded;
}
private void NotifyIconDemoCtl_Unloaded(object sender, RoutedEventArgs e) => ViewModelLocator.Instance.NotifyIconDemo.Cleanup();
private void ButtonPush_OnClick(object sender, RoutedEventArgs e) => NotifyIconContextContent.CloseContextControl();
AssemblyHelper.Register(nameof(NotifyIconDemoCtl), this);
Unloaded += NotifyIconDemoCtl_Unloaded;
}
private void NotifyIconDemoCtl_Unloaded(object sender, RoutedEventArgs e) => ViewModelLocator.Instance.NotifyIconDemo.Cleanup();
private void ButtonPush_OnClick(object sender, RoutedEventArgs e) => NotifyIconContextContent.CloseContextControl();
}
@@ -4,29 +4,69 @@
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
xmlns:tools="clr-namespace:HandyControlDemo.Tools"
Background="{DynamicResource RegionBrush}"
DataContext="{Binding InputElementDemo, Source={StaticResource Locator}}">
<hc:TransitioningContentControl>
<StackPanel Margin="32" Orientation="Horizontal">
<StackPanel>
<hc:NumericUpDown Maximum="100"/>
<hc:NumericUpDown Margin="0,32,0,0" IsEnabled="False"/>
<hc:NumericUpDown Margin="0,32,0,0" IsReadOnly="True"/>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:UniformSpacingPanel Spacing="32" Margin="32" ChildWrapping="Wrap">
<StackPanel>
<hc:NumericUpDown Maximum="100"/>
<hc:NumericUpDown Margin="0,32,0,0" IsEnabled="False"/>
<hc:NumericUpDown Margin="0,32,0,0" IsReadOnly="True"/>
<hc:NumericUpDown hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Style="{StaticResource NumericUpDownExtend}"/>
<hc:NumericUpDown hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" hc:InfoElement.Necessary="True" Style="{StaticResource NumericUpDownExtend}"/>
<hc:NumericUpDown Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource NumericUpDownExtend}" Margin="0,32,0,0"/>
<hc:NumericUpDown ValueFormat="N2" Maximum="100000" Value="10000" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource NumericUpDownExtend}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
</StackPanel>
<StackPanel Margin="32,0,0,0">
<hc:NumericUpDown Name="NumericUpDownCustomVerify" ShowClearButton="True" Style="{StaticResource NumericUpDownPlus}"/>
<hc:NumericUpDown Margin="0,32,0,0" IsEnabled="False" Style="{StaticResource NumericUpDownPlus}"/>
<hc:NumericUpDown Margin="0,32,0,0" IsReadOnly="True" Style="{StaticResource NumericUpDownPlus}"/>
<hc:NumericUpDown hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Style="{StaticResource NumericUpDownExtend}"/>
<hc:NumericUpDown hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" hc:InfoElement.Necessary="True" Style="{StaticResource NumericUpDownExtend}"/>
<hc:NumericUpDown Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource NumericUpDownExtend}" Margin="0,32,0,0"/>
<hc:NumericUpDown ValueFormat="N2" Maximum="100000" Value="10000" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource NumericUpDownExtend}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
</StackPanel>
<StackPanel>
<hc:NumericUpDown hc:InfoElement.ShowClearButton="True" Style="{StaticResource NumericUpDownPlus}">
<hc:NumericUpDown.Value>
<Binding Path="DoubleValue1" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<tools:NumericUpDownDemoRule/>
</Binding.ValidationRules>
</Binding>
</hc:NumericUpDown.Value>
</hc:NumericUpDown>
<hc:NumericUpDown Margin="0,32,0,0" IsEnabled="False" Style="{StaticResource NumericUpDownPlus}"/>
<hc:NumericUpDown Margin="0,32,0,0" IsReadOnly="True" Style="{StaticResource NumericUpDownPlus}"/>
<hc:NumericUpDown ShowClearButton="True" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Style="{StaticResource NumericUpDownPlus}"/>
<hc:NumericUpDown hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" hc:InfoElement.Necessary="True" Style="{StaticResource NumericUpDownPlus}"/>
<hc:NumericUpDown Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource NumericUpDownPlus}" Margin="0,32,0,0"/>
<hc:NumericUpDown DecimalPlaces="2" ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource NumericUpDownPlus}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
</StackPanel>
</StackPanel>
<hc:NumericUpDown hc:InfoElement.ShowClearButton="True" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Style="{StaticResource NumericUpDownPlus}"/>
<hc:NumericUpDown hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" hc:InfoElement.Necessary="True" Style="{StaticResource NumericUpDownPlus}"/>
<hc:NumericUpDown Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource NumericUpDownPlus}" Margin="0,32,0,0"/>
<hc:NumericUpDown DecimalPlaces="2" hc:InfoElement.ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource NumericUpDownPlus}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
</StackPanel>
<StackPanel>
<hc:NumericUpDown Maximum="100" Style="{StaticResource NumericUpDown.Small}"/>
<hc:NumericUpDown Margin="0,32,0,0" IsEnabled="False" Style="{StaticResource NumericUpDown.Small}"/>
<hc:NumericUpDown Margin="0,32,0,0" IsReadOnly="True" Style="{StaticResource NumericUpDown.Small}"/>
<hc:NumericUpDown hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Style="{StaticResource NumericUpDownExtend.Small}"/>
<hc:NumericUpDown hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" hc:InfoElement.Necessary="True" Style="{StaticResource NumericUpDownExtend.Small}"/>
<hc:NumericUpDown Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource NumericUpDownExtend.Small}" Margin="0,32,0,0"/>
<hc:NumericUpDown ValueFormat="N2" Maximum="100000" Value="10000" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource NumericUpDownExtend.Small}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
</StackPanel>
<StackPanel>
<hc:NumericUpDown hc:InfoElement.ShowClearButton="True" Style="{StaticResource NumericUpDownPlus.Small}">
<hc:NumericUpDown.Value>
<Binding Path="DoubleValue2" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<tools:NumericUpDownDemoRule/>
</Binding.ValidationRules>
</Binding>
</hc:NumericUpDown.Value>
</hc:NumericUpDown>
<hc:NumericUpDown Margin="0,32,0,0" IsEnabled="False" Style="{StaticResource NumericUpDownPlus.Small}"/>
<hc:NumericUpDown Margin="0,32,0,0" IsReadOnly="True" Style="{StaticResource NumericUpDownPlus.Small}"/>
<hc:NumericUpDown hc:InfoElement.ShowClearButton="True" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Style="{StaticResource NumericUpDownPlus.Small}"/>
<hc:NumericUpDown hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" hc:InfoElement.Necessary="True" Style="{StaticResource NumericUpDownPlus.Small}"/>
<hc:NumericUpDown Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource NumericUpDownPlus.Small}" Margin="0,32,0,0"/>
<hc:NumericUpDown DecimalPlaces="2" hc:InfoElement.ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource NumericUpDownPlus.Small}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
</StackPanel>
</hc:UniformSpacingPanel>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,19 +1,9 @@
using HandyControl.Data;
namespace HandyControlDemo.UserControl;
namespace HandyControlDemo.UserControl
public partial class NumericUpDownDemoCtl
{
public partial class NumericUpDownDemoCtl
public NumericUpDownDemoCtl()
{
public NumericUpDownDemoCtl()
{
InitializeComponent();
NumericUpDownCustomVerify.VerifyFunc = str => double.TryParse(str, out var v)
? v % 2 < 1e-06
? OperationResult.Failed(Properties.Langs.Lang.Error)
: OperationResult.Success()
: OperationResult.Failed(Properties.Langs.Lang.Error);
}
InitializeComponent();
}
}
@@ -6,14 +6,16 @@
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<StackPanel Margin="32" Width="400">
<hc:OutlineText TextWrapping="Wrap" Fill="{DynamicResource PrimaryTextBrush}" Text="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=20}"/>
<hc:OutlineText Margin="0,10,0,0" FontSize="30" Fill="{DynamicResource SuccessBrush}" Text="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=8}"/>
<hc:OutlineText Margin="0,10,0,0" Fill="{DynamicResource PrimaryTextBrush}" FontSize="30" FontStyle="Italic" Text="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=8}"/>
<hc:OutlineText Margin="0,10,0,0" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" FontSize="50" StrokeThickness="2" Fill="{DynamicResource DangerBrush}" Stroke="{DynamicResource PrimaryBrush}" Text="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}"/>
<hc:OutlineText Margin="0,10,0,0" FontSize="80" FontWeight="Bold" StrokeThickness="4" Fill="{DynamicResource PrimaryBrush}" Stroke="{DynamicResource DangerBrush}" Text="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
<hc:OutlineText Margin="0,10,0,0" StrokePosition="Outside" FontSize="80" FontWeight="Bold" StrokeThickness="4" Fill="{DynamicResource PrimaryBrush}" Stroke="{DynamicResource DangerBrush}" Text="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
<hc:OutlineText Margin="0,10,0,0" StrokePosition="InSide" FontSize="80" FontWeight="Bold" StrokeThickness="4" Fill="{DynamicResource PrimaryBrush}" Stroke="{DynamicResource DangerBrush}" Text="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
</StackPanel>
<hc:ScrollViewer IsInertiaEnabled="True">
<StackPanel Margin="32" Width="400">
<hc:OutlineText TextWrapping="Wrap" Fill="{DynamicResource PrimaryTextBrush}" Text="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=20}"/>
<hc:OutlineText FontSize="30" Fill="{DynamicResource SuccessBrush}" Text="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=8}"/>
<hc:OutlineText Fill="{DynamicResource PrimaryTextBrush}" FontSize="30" FontStyle="Italic" Text="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=8}"/>
<hc:OutlineText TextWrapping="Wrap" TextTrimming="CharacterEllipsis" FontSize="50" StrokeThickness="2" Fill="{DynamicResource DangerBrush}" Stroke="{DynamicResource PrimaryBrush}" Text="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}"/>
<hc:OutlineText FontSize="80" FontWeight="Bold" StrokeThickness="4" Fill="{DynamicResource PrimaryBrush}" Stroke="{DynamicResource DangerBrush}" Text="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
<hc:OutlineText StrokePosition="Outside" FontSize="80" FontWeight="Bold" StrokeThickness="4" Fill="{DynamicResource PrimaryBrush}" Stroke="{DynamicResource DangerBrush}" Text="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
<hc:OutlineText StrokePosition="InSide" FontSize="80" FontWeight="Bold" StrokeThickness="4" Fill="{DynamicResource PrimaryBrush}" Stroke="{DynamicResource DangerBrush}" Text="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
</StackPanel>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class OutlineTextDemoCtl
{
public partial class OutlineTextDemoCtl
public OutlineTextDemoCtl()
{
public OutlineTextDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -19,7 +19,7 @@
</hc:EventTrigger>
</hc:Interaction.Triggers>
</hc:Pagination>
<DataGrid IsReadOnly="True" Width="600" Margin="0,16,0,0" Grid.Row="1" HeadersVisibility="All" RowHeaderWidth="60" AutoGenerateColumns="False" ItemsSource="{Binding DataList}">
<DataGrid IsReadOnly="True" MaxWidth="600" Margin="0,16,0,0" Grid.Row="1" HeadersVisibility="All" RowHeaderWidth="60" AutoGenerateColumns="False" ItemsSource="{Binding DataList}">
<DataGrid.RowHeaderTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding IsSelected,RelativeSource={RelativeSource AncestorType=DataGridRow}}"/>
@@ -1,11 +1,10 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class PaginationDemoCtl
{
public partial class PaginationDemoCtl
public PaginationDemoCtl()
{
public PaginationDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -6,29 +6,31 @@
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<hc:UniformSpacingPanel Spacing="32" Margin="32" ChildWrapping="Wrap">
<StackPanel>
<hc:PasswordBox Name="PasswordBoxDemo" ShowClearButton="True" Password="123456" IsSafeEnabled="False"/>
<TextBox Text="{Binding UnsafePassword,ElementName=PasswordBoxDemo,UpdateSourceTrigger=PropertyChanged}" Margin="0,6,0,0"/>
<hc:PasswordBox Password="123456" Margin="0,16,0,0"/>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:UniformSpacingPanel Spacing="32" Margin="32" ChildWrapping="Wrap">
<StackPanel>
<hc:PasswordBox Name="PasswordBoxDemo" ShowClearButton="True" Password="123456" IsSafeEnabled="False"/>
<TextBox Text="{Binding UnsafePassword,ElementName=PasswordBoxDemo,UpdateSourceTrigger=PropertyChanged}" Margin="0,6,0,0"/>
<hc:PasswordBox Password="123456" Margin="0,16,0,0"/>
<hc:PasswordBox ShowClearButton="True" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Password="123456" Margin="0,32,0,0"/>
<hc:PasswordBox ShowEyeButton="True" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
<hc:PasswordBox ShowClearButton="True" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Password="123456" Margin="0,32,0,0"/>
<hc:PasswordBox ShowEyeButton="True" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
<hc:PasswordBox ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0" Password="123456"/>
<hc:PasswordBox ShowClearButton="True" ShowEyeButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
</StackPanel>
<StackPanel>
<hc:PasswordBox Name="PasswordBoxDemoSmall" ShowClearButton="True" Password="123456" IsSafeEnabled="False" Style="{StaticResource PasswordBoxPlus.Small}"/>
<TextBox Text="{Binding UnsafePassword,ElementName=PasswordBoxDemoSmall,UpdateSourceTrigger=PropertyChanged}" Margin="0,6,0,0"/>
<hc:PasswordBox Password="123456" Margin="0,16,0,0" Style="{StaticResource PasswordBoxPlus.Small}"/>
<hc:PasswordBox ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0" Password="123456"/>
<hc:PasswordBox ShowClearButton="True" ShowEyeButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
</StackPanel>
<StackPanel>
<hc:PasswordBox Name="PasswordBoxDemoSmall" ShowClearButton="True" Password="123456" IsSafeEnabled="False" Style="{StaticResource PasswordBoxPlus.Small}"/>
<TextBox Text="{Binding UnsafePassword,ElementName=PasswordBoxDemoSmall,UpdateSourceTrigger=PropertyChanged}" Margin="0,6,0,0"/>
<hc:PasswordBox Password="123456" Margin="0,16,0,0" Style="{StaticResource PasswordBoxPlus.Small}"/>
<hc:PasswordBox ShowClearButton="True" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Password="123456" Margin="0,32,0,0" Style="{StaticResource PasswordBoxPlus.Small}"/>
<hc:PasswordBox ShowEyeButton="True" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" hc:InfoElement.Necessary="True" Margin="0,32,0,0" Style="{StaticResource PasswordBoxPlus.Small}"/>
<hc:PasswordBox ShowClearButton="True" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Password="123456" Margin="0,32,0,0" Style="{StaticResource PasswordBoxPlus.Small}"/>
<hc:PasswordBox ShowEyeButton="True" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" hc:InfoElement.Necessary="True" Margin="0,32,0,0" Style="{StaticResource PasswordBoxPlus.Small}"/>
<hc:PasswordBox ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0" Password="123456" Style="{StaticResource PasswordBoxPlus.Small}"/>
<hc:PasswordBox ShowClearButton="True" ShowEyeButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" hc:InfoElement.Necessary="True" Margin="0,32,0,0" Style="{StaticResource PasswordBoxPlus.Small}"/>
</StackPanel>
</hc:UniformSpacingPanel>
<hc:PasswordBox ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0" Password="123456" Style="{StaticResource PasswordBoxPlus.Small}"/>
<hc:PasswordBox ShowClearButton="True" ShowEyeButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" hc:InfoElement.Necessary="True" Margin="0,32,0,0" Style="{StaticResource PasswordBoxPlus.Small}"/>
</StackPanel>
</hc:UniformSpacingPanel>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class PasswordBoxDemoCtl
{
public partial class PasswordBoxDemoCtl
public PasswordBoxDemoCtl()
{
public PasswordBoxDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,21 +1,20 @@
using System.Windows;
using HandyControl.Controls;
namespace HandyControlDemo.UserControl
{
public partial class PinBoxDemoCtl
{
public PinBoxDemoCtl()
{
InitializeComponent();
}
namespace HandyControlDemo.UserControl;
private void PinBox_OnCompleted(object sender, RoutedEventArgs e)
public partial class PinBoxDemoCtl
{
public PinBoxDemoCtl()
{
InitializeComponent();
}
private void PinBox_OnCompleted(object sender, RoutedEventArgs e)
{
if (e.OriginalSource is PinBox pinBox)
{
if (e.OriginalSource is PinBox pinBox)
{
Growl.Info(pinBox.Password);
}
Growl.Info(pinBox.Password);
}
}
}
@@ -10,14 +10,12 @@
<Style x:Key="Button4PoptipStyle" BasedOn="{StaticResource {x:Type Button}}" TargetType="Button">
<Setter Property="Width" Value="{x:Static system:Double.NaN}"/>
<Setter Property="Height" Value="40"/>
<Setter Property="MinWidth" Value="100"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="Content" Value="{Binding Tag,RelativeSource={RelativeSource Self},Converter={StaticResource Int2StringConverter},ConverterParameter={ex:Lang Key={x:Static langs:LangKeys.PoptipPositionStr}}}"/>
</Style>
<Style x:Key="ToggleButton4PoptipStyle" BasedOn="{StaticResource {x:Type ToggleButton}}" TargetType="ToggleButton">
<Setter Property="Width" Value="{x:Static system:Double.NaN}"/>
<Setter Property="Height" Value="40"/>
<Setter Property="MinWidth" Value="100"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="Content" Value="{Binding Tag,RelativeSource={RelativeSource Self},Converter={StaticResource Int2StringConverter},ConverterParameter={ex:Lang Key={x:Static langs:LangKeys.PoptipPositionStr}}}"/>
</Style>
@@ -35,12 +33,12 @@
<RowDefinition/>
</Grid.RowDefinitions>
<UniformGrid Grid.Column="1" Columns="3">
<Button Margin="8,0" Tag="0" Style="{StaticResource Button4PoptipStyle}">
<Button Margin="8,0" Tag="TopLeft" Style="{StaticResource Button4PoptipStyle}">
<hc:Poptip.Instance>
<hc:Poptip Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" PlacementType="TopLeft"/>
</hc:Poptip.Instance>
</Button>
<Button Margin="8,0" Tag="1" Style="{StaticResource Button4PoptipStyle}">
<Button Margin="8,0" Tag="Top" Style="{StaticResource Button4PoptipStyle}">
<hc:Poptip.Instance>
<hc:Poptip PlacementType="Top">
<hc:Poptip.Content>
@@ -49,11 +47,11 @@
</hc:Poptip>
</hc:Poptip.Instance>
</Button>
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="TopRight" Margin="8,0" Tag="2" Style="{StaticResource Button4PoptipStyle}"/>
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="TopRight" Margin="8,0" Tag="TopRight" Style="{StaticResource Button4PoptipStyle}"/>
</UniformGrid>
<UniformGrid Grid.Row="1" Grid.Column="2" Rows="3">
<ToggleButton hc:Poptip.HitMode="None" hc:Poptip.IsOpen="{Binding IsChecked,RelativeSource={RelativeSource Self}}" hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="RightTop" Margin="8,16" Tag="3" Style="{StaticResource ToggleButton4PoptipStyle}"/>
<ToggleButton Margin="8,16" Tag="4" Style="{StaticResource ToggleButton4PoptipStyle}">
<ToggleButton hc:Poptip.HitMode="None" hc:Poptip.IsOpen="{Binding IsChecked,RelativeSource={RelativeSource Self}}" hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="RightTop" Margin="8,16" Tag="RightTop" Style="{StaticResource ToggleButton4PoptipStyle}"/>
<ToggleButton Margin="8,16" Tag="Right" Style="{StaticResource ToggleButton4PoptipStyle}">
<hc:Poptip.Instance>
<hc:Poptip Background="Transparent" Padding="0" BorderThickness="0" HitMode="None" PlacementType="Right" IsOpen="{Binding Target.IsChecked,RelativeSource={RelativeSource Self}}">
<hc:Poptip.Content>
@@ -62,17 +60,17 @@
</hc:Poptip>
</hc:Poptip.Instance>
</ToggleButton>
<ToggleButton hc:Poptip.HitMode="None" hc:Poptip.IsOpen="{Binding IsChecked,RelativeSource={RelativeSource Self}}" hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="RightBottom" Margin="8,16" Tag="5" Style="{StaticResource ToggleButton4PoptipStyle}"/>
<ToggleButton hc:Poptip.HitMode="None" hc:Poptip.IsOpen="{Binding IsChecked,RelativeSource={RelativeSource Self}}" hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="RightBottom" Margin="8,16" Tag="RightBottom" Style="{StaticResource ToggleButton4PoptipStyle}"/>
</UniformGrid>
<UniformGrid Grid.Column="1" Grid.Row="2" Columns="3">
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="BottomLeft" Margin="8,0" Tag="8" Style="{StaticResource Button4PoptipStyle}"/>
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="Bottom" Margin="8,0" Tag="7" Style="{StaticResource Button4PoptipStyle}"/>
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="BottomRight" Margin="8,0" Tag="6" Style="{StaticResource Button4PoptipStyle}"/>
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="BottomLeft" Margin="8,0" Tag="BottomLeft" Style="{StaticResource Button4PoptipStyle}"/>
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="Bottom" Margin="8,0" Tag="Bottom" Style="{StaticResource Button4PoptipStyle}"/>
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="BottomRight" Margin="8,0" Tag="BottomRight" Style="{StaticResource Button4PoptipStyle}"/>
</UniformGrid>
<UniformGrid Grid.Row="1" Grid.Column="0" Rows="3">
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="LeftTop" hc:Poptip.HitMode="Focus" Margin="8,16" Tag="11" Style="{StaticResource Button4PoptipStyle}"/>
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="Left" hc:Poptip.HitMode="Focus" Margin="8,16" Tag="10" Style="{StaticResource Button4PoptipStyle}"/>
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="LeftBottom" hc:Poptip.HitMode="Focus" Margin="8,16" Tag="9" Style="{StaticResource Button4PoptipStyle}"/>
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="LeftTop" hc:Poptip.HitMode="Focus" Margin="8,16" Tag="LeftTop" Style="{StaticResource Button4PoptipStyle}"/>
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="Left" hc:Poptip.HitMode="Focus" Margin="8,16" Tag="Left" Style="{StaticResource Button4PoptipStyle}"/>
<Button hc:Poptip.Content="{ex:Lang Key={x:Static langs:LangKeys.Text}}" hc:Poptip.Placement="LeftBottom" hc:Poptip.HitMode="Focus" Margin="8,16" Tag="LeftBottom" Style="{StaticResource Button4PoptipStyle}"/>
</UniformGrid>
</Grid>
</hc:TransitioningContentControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class PoptipDemoCtl
{
public partial class PoptipDemoCtl
public PoptipDemoCtl()
{
public PoptipDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,11 +1,10 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class PreviewSliderDemoCtl
{
public partial class PreviewSliderDemoCtl
public PreviewSliderDemoCtl()
{
public PreviewSliderDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,11 +1,10 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class ProgressBarDemoCtl
{
public partial class ProgressBarDemoCtl
public ProgressBarDemoCtl()
{
public ProgressBarDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -5,23 +5,25 @@
xmlns:hc="https://handyorg.github.io/handycontrol"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<WrapPanel Margin="16" VerticalAlignment="Center">
<StackPanel Margin="16" Button.Click="ButtonProgress_OnClick">
<hc:ProgressButton IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
<hc:ProgressButton Style="{StaticResource ProgressButtonPrimary}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
<hc:ProgressButton Style="{StaticResource ProgressButtonSuccess}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
<hc:ProgressButton Style="{StaticResource ProgressButtonInfo}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
<hc:ProgressButton Style="{StaticResource ProgressButtonWarning}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
<hc:ProgressButton Style="{StaticResource ProgressButtonDanger}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
</StackPanel>
<StackPanel Margin="16" Button.Click="ButtonProgress_OnClick">
<ToggleButton Style="{StaticResource ToggleButtonLoading}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
<ToggleButton Style="{StaticResource ToggleButtonLoadingPrimary}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
<ToggleButton Style="{StaticResource ToggleButtonLoadingSuccess}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
<ToggleButton Style="{StaticResource ToggleButtonLoadingInfo}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
<ToggleButton Style="{StaticResource ToggleButtonLoadingWarning}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
<ToggleButton Style="{StaticResource ToggleButtonLoadingDanger}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
</StackPanel>
</WrapPanel>
<hc:ScrollViewer IsInertiaEnabled="True">
<WrapPanel Margin="16" VerticalAlignment="Center">
<StackPanel Margin="16" Button.Click="ButtonProgress_OnClick">
<hc:ProgressButton IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
<hc:ProgressButton Style="{StaticResource ProgressButtonPrimary}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
<hc:ProgressButton Style="{StaticResource ProgressButtonSuccess}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
<hc:ProgressButton Style="{StaticResource ProgressButtonInfo}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
<hc:ProgressButton Style="{StaticResource ProgressButtonWarning}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
<hc:ProgressButton Style="{StaticResource ProgressButtonDanger}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
</StackPanel>
<StackPanel Margin="16" Button.Click="ButtonProgress_OnClick">
<ToggleButton Style="{StaticResource ToggleButtonLoading}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
<ToggleButton Style="{StaticResource ToggleButtonLoadingPrimary}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
<ToggleButton Style="{StaticResource ToggleButtonLoadingSuccess}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
<ToggleButton Style="{StaticResource ToggleButtonLoadingInfo}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
<ToggleButton Style="{StaticResource ToggleButtonLoadingWarning}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
<ToggleButton Style="{StaticResource ToggleButtonLoadingDanger}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StringConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
</StackPanel>
</WrapPanel>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -2,64 +2,63 @@
using System.Windows;
using System.Windows.Threading;
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class ProgressButtonDemoCtl
{
public partial class ProgressButtonDemoCtl
public static readonly DependencyProperty ProgressProperty = DependencyProperty.Register(
"Progress", typeof(int), typeof(ProgressButtonDemoCtl), new PropertyMetadata(default(int)));
public int Progress
{
public static readonly DependencyProperty ProgressProperty = DependencyProperty.Register(
"Progress", typeof(int), typeof(ProgressButtonDemoCtl), new PropertyMetadata(default(int)));
get => (int) GetValue(ProgressProperty);
set => SetValue(ProgressProperty, value);
}
public int Progress
public static readonly DependencyProperty IsUploadingProperty = DependencyProperty.Register(
"IsUploading", typeof(bool), typeof(ProgressButtonDemoCtl), new PropertyMetadata(default(bool)));
public bool IsUploading
{
get => (bool) GetValue(IsUploadingProperty);
set => SetValue(IsUploadingProperty, value);
}
private readonly DispatcherTimer _timer;
public ProgressButtonDemoCtl()
{
InitializeComponent();
DataContext = this;
_timer = new DispatcherTimer
{
get => (int) GetValue(ProgressProperty);
set => SetValue(ProgressProperty, value);
Interval = TimeSpan.FromMilliseconds(200)
};
_timer.Tick += Timer_Tick;
}
private void Timer_Tick(object sender, EventArgs e)
{
Progress++;
if (Progress == 100)
{
Progress = 0;
_timer.Stop();
IsUploading = false;
}
}
public static readonly DependencyProperty IsUploadingProperty = DependencyProperty.Register(
"IsUploading", typeof(bool), typeof(ProgressButtonDemoCtl), new PropertyMetadata(default(bool)));
public bool IsUploading
private void ButtonProgress_OnClick(object sender, RoutedEventArgs e)
{
if (_timer.IsEnabled)
{
get => (bool) GetValue(IsUploadingProperty);
set => SetValue(IsUploadingProperty, value);
_timer.Stop();
}
private readonly DispatcherTimer _timer;
public ProgressButtonDemoCtl()
else
{
InitializeComponent();
DataContext = this;
_timer = new DispatcherTimer
{
Interval = TimeSpan.FromMilliseconds(200)
};
_timer.Tick += Timer_Tick;
}
private void Timer_Tick(object sender, EventArgs e)
{
Progress++;
if (Progress == 100)
{
Progress = 0;
_timer.Stop();
IsUploading = false;
}
}
private void ButtonProgress_OnClick(object sender, RoutedEventArgs e)
{
if (_timer.IsEnabled)
{
_timer.Stop();
}
else
{
_timer.Start();
}
_timer.Start();
}
}
}
@@ -1,31 +1,30 @@
using System.Windows;
using HandyControlDemo.Data;
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class PropertyGridDemoCtl
{
public partial class PropertyGridDemoCtl
public PropertyGridDemoCtl()
{
public PropertyGridDemoCtl()
InitializeComponent();
DemoModel = new PropertyGridDemoModel
{
InitializeComponent();
String = "TestString",
Enum = Gender.Female,
Boolean = true,
Integer = 98,
VerticalAlignment = VerticalAlignment.Stretch
};
}
DemoModel = new PropertyGridDemoModel
{
String = "TestString",
Enum = Gender.Female,
Boolean = true,
Integer = 98,
VerticalAlignment = VerticalAlignment.Stretch
};
}
public static readonly DependencyProperty DemoModelProperty = DependencyProperty.Register(
"DemoModel", typeof(PropertyGridDemoModel), typeof(PropertyGridDemoCtl), new PropertyMetadata(default(PropertyGridDemoModel)));
public static readonly DependencyProperty DemoModelProperty = DependencyProperty.Register(
"DemoModel", typeof(PropertyGridDemoModel), typeof(PropertyGridDemoCtl), new PropertyMetadata(default(PropertyGridDemoModel)));
public PropertyGridDemoModel DemoModel
{
get => (PropertyGridDemoModel) GetValue(DemoModelProperty);
set => SetValue(DemoModelProperty, value);
}
public PropertyGridDemoModel DemoModel
{
get => (PropertyGridDemoModel) GetValue(DemoModelProperty);
set => SetValue(DemoModelProperty, value);
}
}
@@ -4,19 +4,21 @@
xmlns:hc="https://handyorg.github.io/handycontrol"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<StackPanel Margin="32" Orientation="Horizontal">
<StackPanel>
<hc:RangeSlider Width="400" IsSnapToTickEnabled="True" ValueStart="2" ValueEnd="8"/>
<hc:RangeSlider Width="400" IsSnapToTickEnabled="True" ValueEnd="3" Margin="0,32,0,0" IsEnabled="False"/>
<hc:RangeSlider Width="400" hc:TipElement.Visibility="Visible" hc:TipElement.Placement="Top" IsSnapToTickEnabled="True" Maximum="100" ValueEnd="60" TickFrequency="10" TickPlacement="BottomRight" Margin="0,32,0,0"/>
<hc:RangeSlider Width="400" hc:TipElement.Visibility="Visible" hc:TipElement.Placement="Bottom" hc:TipElement.StringFormat="#0.00" ValueEnd="5" TickPlacement="Both" Margin="0,32,0,0"/>
</StackPanel>
<StackPanel Margin="32,0,0,0" Orientation="Horizontal">
<hc:RangeSlider Height="400" IsSnapToTickEnabled="True" ValueEnd="8" Orientation="Vertical"/>
<hc:RangeSlider Height="400" IsSnapToTickEnabled="True" ValueEnd="3" Margin="32,0,0,0" IsEnabled="False" Orientation="Vertical"/>
<hc:RangeSlider Height="400" hc:TipElement.Visibility="Visible" hc:TipElement.Placement="Left" IsSnapToTickEnabled="True" Maximum="100" ValueEnd="60" TickFrequency="10" TickPlacement="BottomRight" Margin="32,0,0,0" Orientation="Vertical"/>
<hc:RangeSlider Height="400" hc:TipElement.Visibility="Visible" hc:TipElement.Placement="Right" hc:TipElement.StringFormat="#0.00" ValueEnd="5" TickPlacement="Both" Margin="32,0" Orientation="Vertical"/>
</StackPanel>
</StackPanel>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:UniformSpacingPanel Margin="32" Spacing="32">
<hc:UniformSpacingPanel Orientation="Vertical" Spacing="32">
<hc:RangeSlider Width="400" IsSnapToTickEnabled="True" ValueStart="2" ValueEnd="8"/>
<hc:RangeSlider Width="400" IsSnapToTickEnabled="True" ValueEnd="3" IsEnabled="False"/>
<hc:RangeSlider Width="400" hc:TipElement.Visibility="Visible" hc:TipElement.Placement="Top" IsSnapToTickEnabled="True" Maximum="100" ValueEnd="60" TickFrequency="10" TickPlacement="BottomRight"/>
<hc:RangeSlider Width="400" hc:TipElement.Visibility="Visible" hc:TipElement.Placement="Bottom" hc:TipElement.StringFormat="#0.00" ValueEnd="5" TickPlacement="Both"/>
</hc:UniformSpacingPanel>
<hc:UniformSpacingPanel Spacing="32">
<hc:RangeSlider Height="400" IsSnapToTickEnabled="True" ValueEnd="8" Orientation="Vertical"/>
<hc:RangeSlider Height="400" IsSnapToTickEnabled="True" ValueEnd="3" IsEnabled="False" Orientation="Vertical"/>
<hc:RangeSlider Height="400" hc:TipElement.Visibility="Visible" hc:TipElement.Placement="Right" IsSnapToTickEnabled="True" Maximum="100" ValueEnd="60" TickFrequency="10" TickPlacement="BottomRight" Orientation="Vertical"/>
<hc:RangeSlider Height="400" hc:TipElement.Visibility="Visible" hc:TipElement.Placement="Left" hc:TipElement.StringFormat="#0.00" ValueEnd="5" TickPlacement="Both" Orientation="Vertical"/>
</hc:UniformSpacingPanel>
</hc:UniformSpacingPanel>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class RangeSliderDemoCtl
{
public partial class RangeSliderDemoCtl
public RangeSliderDemoCtl()
{
public RangeSliderDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class RateDemoCtl
{
public partial class RateDemoCtl
public RateDemoCtl()
{
public RateDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -4,58 +4,60 @@
xmlns:hc="https://handyorg.github.io/handycontrol"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<hc:RelativePanel Width="620" Height="700" Margin="32">
<Border Name="Rect1" Background="{DynamicResource DangerBrush}" Height="50" Width="50">
<TextBlock Text="Rect1" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect2" Background="{DynamicResource PrimaryBrush}" Height="50" Width="50" hc:RelativePanel.AlignHorizontalCenterWithPanel="True">
<TextBlock Text="Rect2" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect3" Background="{DynamicResource SuccessBrush}" Height="50" Width="50" hc:RelativePanel.AlignRightWithPanel="True">
<TextBlock Text="Rect3" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect4" Background="{DynamicResource DangerBrush}" Height="50" Width="50" hc:RelativePanel.AlignBottomWithPanel="True">
<TextBlock Text="Rect4" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect5" Background="{DynamicResource PrimaryBrush}" Height="50" Width="50" hc:RelativePanel.AlignBottomWithPanel="True" hc:RelativePanel.AlignHorizontalCenterWithPanel="True">
<TextBlock Text="Rect5" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect6" Background="{DynamicResource SuccessBrush}" Height="50" Width="50" hc:RelativePanel.AlignBottomWithPanel="True" hc:RelativePanel.AlignRightWithPanel="True">
<TextBlock Text="Rect6" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect7" Background="{DynamicResource PrimaryBrush}" Height="50" hc:RelativePanel.RightOf="{Binding ElementName=Rect1}">
<TextBlock Text="Rect7 (RightOf Rect1)" Padding="10,0" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect8" Background="{DynamicResource SuccessBrush}" Height="50" hc:RelativePanel.Below="{Binding ElementName=Rect7}">
<TextBlock Text="Rect8 (Below Rect7)" Padding="10,0" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect9" Background="{DynamicResource PrimaryBrush}" Height="140" Width="460" hc:RelativePanel.AlignHorizontalCenterWithPanel="True" hc:RelativePanel.AlignVerticalCenterWithPanel="True">
<TextBlock Text="Rect9" Padding="10" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Top"/>
</Border>
<Border Name="Rect10" Background="{DynamicResource DangerBrush}" Width="50" hc:RelativePanel.RightOf="{Binding ElementName=Rect9}" hc:RelativePanel.AlignVerticalCenterWith="{Binding ElementName=Rect9}">
<TextBlock Text="Rect14 (RightOf Rect9, AlignVerticalCenterWith Rect9)" Padding="10,0" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock.LayoutTransform>
<TransformGroup>
<RotateTransform Angle="-90"/>
</TransformGroup>
</TextBlock.LayoutTransform>
</TextBlock>
</Border>
<Border Name="Rect11" Background="{DynamicResource DangerBrush}" Height="50" hc:RelativePanel.AlignBottomWith="{Binding ElementName=Rect9}" hc:RelativePanel.AlignHorizontalCenterWith="{Binding ElementName=Rect9}">
<TextBlock Text="Rect11 (AlignBottomWith Rect9, AlignHorizontalCenterWith Rect9)" Padding="10,0" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect12" Background="{DynamicResource DangerBrush}" Height="50" hc:RelativePanel.Below="{Binding ElementName=Rect8}" hc:RelativePanel.AlignLeftWith="{Binding ElementName=Rect7}">
<TextBlock Text="Rect12 (Below Rect8, AlignLeftWith Rect7)" Padding="10,0" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect13" Background="{DynamicResource PrimaryBrush}" Height="50" hc:RelativePanel.Below="{Binding ElementName=Rect12}" hc:RelativePanel.AlignRightWith="{Binding ElementName=Rect12}">
<TextBlock Text="Rect13 (Below Rect12, AlignRightWith Rect12)" Padding="10,0" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect14" Background="{DynamicResource SuccessBrush}" Height="50" hc:RelativePanel.Above="{Binding ElementName=Rect9}" hc:RelativePanel.AlignRightWith="{Binding ElementName=Rect9}">
<TextBlock Text="Rect14 (Above Rect9, AlignRightWith Rect9)" Padding="10,0" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect15" Background="{DynamicResource DangerBrush}" Height="50" hc:RelativePanel.LeftOf="{Binding ElementName=Rect2}" hc:RelativePanel.AlignTopWith="{Binding ElementName=Rect9}">
<TextBlock Text="Rect15 (LeftOf Rect2, AlignTopWith Rect9)" Padding="10,0" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</hc:RelativePanel>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:RelativePanel Width="620" Height="700" Margin="32">
<Border Name="Rect1" Background="{DynamicResource DangerBrush}" Height="50" Width="50">
<TextBlock Text="Rect1" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect2" Background="{DynamicResource PrimaryBrush}" Height="50" Width="50" hc:RelativePanel.AlignHorizontalCenterWithPanel="True">
<TextBlock Text="Rect2" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect3" Background="{DynamicResource SuccessBrush}" Height="50" Width="50" hc:RelativePanel.AlignRightWithPanel="True">
<TextBlock Text="Rect3" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect4" Background="{DynamicResource DangerBrush}" Height="50" Width="50" hc:RelativePanel.AlignBottomWithPanel="True">
<TextBlock Text="Rect4" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect5" Background="{DynamicResource PrimaryBrush}" Height="50" Width="50" hc:RelativePanel.AlignBottomWithPanel="True" hc:RelativePanel.AlignHorizontalCenterWithPanel="True">
<TextBlock Text="Rect5" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect6" Background="{DynamicResource SuccessBrush}" Height="50" Width="50" hc:RelativePanel.AlignBottomWithPanel="True" hc:RelativePanel.AlignRightWithPanel="True">
<TextBlock Text="Rect6" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect7" Background="{DynamicResource PrimaryBrush}" Height="50" hc:RelativePanel.RightOf="{Binding ElementName=Rect1}">
<TextBlock Text="Rect7 (RightOf Rect1)" Padding="10,0" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect8" Background="{DynamicResource SuccessBrush}" Height="50" hc:RelativePanel.Below="{Binding ElementName=Rect7}">
<TextBlock Text="Rect8 (Below Rect7)" Padding="10,0" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect9" Background="{DynamicResource PrimaryBrush}" Height="140" Width="460" hc:RelativePanel.AlignHorizontalCenterWithPanel="True" hc:RelativePanel.AlignVerticalCenterWithPanel="True">
<TextBlock Text="Rect9" Padding="10" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Top"/>
</Border>
<Border Name="Rect10" Background="{DynamicResource DangerBrush}" Width="50" hc:RelativePanel.RightOf="{Binding ElementName=Rect9}" hc:RelativePanel.AlignVerticalCenterWith="{Binding ElementName=Rect9}">
<TextBlock Text="Rect14 (RightOf Rect9, AlignVerticalCenterWith Rect9)" Padding="10,0" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock.LayoutTransform>
<TransformGroup>
<RotateTransform Angle="-90"/>
</TransformGroup>
</TextBlock.LayoutTransform>
</TextBlock>
</Border>
<Border Name="Rect11" Background="{DynamicResource DangerBrush}" Height="50" hc:RelativePanel.AlignBottomWith="{Binding ElementName=Rect9}" hc:RelativePanel.AlignHorizontalCenterWith="{Binding ElementName=Rect9}">
<TextBlock Text="Rect11 (AlignBottomWith Rect9, AlignHorizontalCenterWith Rect9)" Padding="10,0" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect12" Background="{DynamicResource DangerBrush}" Height="50" hc:RelativePanel.Below="{Binding ElementName=Rect8}" hc:RelativePanel.AlignLeftWith="{Binding ElementName=Rect7}">
<TextBlock Text="Rect12 (Below Rect8, AlignLeftWith Rect7)" Padding="10,0" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect13" Background="{DynamicResource PrimaryBrush}" Height="50" hc:RelativePanel.Below="{Binding ElementName=Rect12}" hc:RelativePanel.AlignRightWith="{Binding ElementName=Rect12}">
<TextBlock Text="Rect13 (Below Rect12, AlignRightWith Rect12)" Padding="10,0" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect14" Background="{DynamicResource SuccessBrush}" Height="50" hc:RelativePanel.Above="{Binding ElementName=Rect9}" hc:RelativePanel.AlignRightWith="{Binding ElementName=Rect9}">
<TextBlock Text="Rect14 (Above Rect9, AlignRightWith Rect9)" Padding="10,0" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Name="Rect15" Background="{DynamicResource DangerBrush}" Height="50" hc:RelativePanel.LeftOf="{Binding ElementName=Rect2}" hc:RelativePanel.AlignTopWith="{Binding ElementName=Rect9}">
<TextBlock Text="Rect15 (LeftOf Rect2, AlignTopWith Rect9)" Padding="10,0" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</hc:RelativePanel>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class RelativePanelDemoCtl
{
public partial class RelativePanelDemoCtl
public RelativePanelDemoCtl()
{
public RelativePanelDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -6,31 +6,33 @@
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension">
<hc:TransitioningContentControl>
<StackPanel Margin="32" VerticalAlignment="Center">
<hc:RunningBlock Content="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}"/>
<hc:RunningBlock Runaway="False" Content="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Margin="0,16,0,0"/>
<hc:RunningBlock HorizontalAlignment="Left" Width="500" Speed="50" Content="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Margin="0,16,0,0"/>
<hc:RunningBlock HorizontalAlignment="Left" Width="300" FontSize="30" Speed="50" Content="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Margin="0,16,0,0"/>
<hc:RunningBlock HorizontalAlignment="Left" AutoRun="True" Width="100" Runaway="False" Content="{ex:Lang Key={x:Static langs:LangKeys.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="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Margin="0,16,0,0"/>
<hc:RunningBlock HorizontalAlignment="Left" AutoRun="True" Width="200" Content="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Margin="0,16,0,0"/>
<hc:RunningBlock Content="{ex:Lang Key={x:Static langs:LangKeys.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="{ex:Lang Key={x:Static langs:LangKeys.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="{ex:Lang Key={x:Static langs:LangKeys.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" Width="30" Height="30"/>
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/2.gif" Margin="10,0" Width="30" Height="30"/>
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/3.gif" Margin="10,0" Width="30" Height="30"/>
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/4.gif" Margin="10,0" Width="30" Height="30"/>
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/5.gif" Margin="10,0" Width="30" Height="30"/>
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/6.gif" Margin="10,0" Width="30" Height="30"/>
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/7.gif" Margin="10,0" Width="30" Height="30"/>
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/8.gif" Margin="10,0" Width="30" Height="30"/>
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/9.gif" Margin="10,0" Width="30" Height="30"/>
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/10.gif" Margin="10,0" Width="30" Height="30"/>
</StackPanel>
</hc:RunningBlock>
</StackPanel>
<hc:ScrollViewer IsInertiaEnabled="True">
<StackPanel Margin="32" VerticalAlignment="Center">
<hc:RunningBlock Content="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}"/>
<hc:RunningBlock Runaway="False" Content="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Margin="0,16,0,0"/>
<hc:RunningBlock HorizontalAlignment="Left" Width="500" Speed="50" Content="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Margin="0,16,0,0"/>
<hc:RunningBlock HorizontalAlignment="Left" Width="300" FontSize="30" Speed="50" Content="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Margin="0,16,0,0"/>
<hc:RunningBlock HorizontalAlignment="Left" AutoRun="True" Width="100" Runaway="False" Content="{ex:Lang Key={x:Static langs:LangKeys.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="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Margin="0,16,0,0"/>
<hc:RunningBlock HorizontalAlignment="Left" AutoRun="True" Width="200" Content="{ex:Lang Key={x:Static langs:LangKeys.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}" Margin="0,16,0,0"/>
<hc:RunningBlock Content="{ex:Lang Key={x:Static langs:LangKeys.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="{ex:Lang Key={x:Static langs:LangKeys.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="{ex:Lang Key={x:Static langs:LangKeys.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" Width="30" Height="30"/>
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/2.gif" Margin="10,0" Width="30" Height="30"/>
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/3.gif" Margin="10,0" Width="30" Height="30"/>
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/4.gif" Margin="10,0" Width="30" Height="30"/>
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/5.gif" Margin="10,0" Width="30" Height="30"/>
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/6.gif" Margin="10,0" Width="30" Height="30"/>
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/7.gif" Margin="10,0" Width="30" Height="30"/>
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/8.gif" Margin="10,0" Width="30" Height="30"/>
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/9.gif" Margin="10,0" Width="30" Height="30"/>
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/10.gif" Margin="10,0" Width="30" Height="30"/>
</StackPanel>
</hc:RunningBlock>
</StackPanel>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class RunningBlockDemoCtl
{
public partial class RunningBlockDemoCtl
public RunningBlockDemoCtl()
{
public RunningBlockDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -5,29 +5,28 @@ using System.Windows.Media;
using HandyControl.Controls;
using HandyControl.Data;
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class ScreenshotDemoCtl : IDisposable
{
public partial class ScreenshotDemoCtl : IDisposable
public ScreenshotDemoCtl()
{
public ScreenshotDemoCtl()
{
InitializeComponent();
Screenshot.Snapped += Screenshot_Snapped;
}
private void Screenshot_Snapped(object sender, FunctionEventArgs<ImageSource> e)
{
new HandyControl.Controls.Window
{
Content = new Image
{
Source = e.Info,
Stretch = Stretch.None
},
WindowStartupLocation = WindowStartupLocation.CenterScreen
}.ShowDialog();
}
public void Dispose() => Screenshot.Snapped -= Screenshot_Snapped;
InitializeComponent();
Screenshot.Snapped += Screenshot_Snapped;
}
private void Screenshot_Snapped(object sender, FunctionEventArgs<ImageSource> e)
{
new HandyControl.Controls.Window
{
Content = new Image
{
Source = e.Info,
Stretch = Stretch.None
},
WindowStartupLocation = WindowStartupLocation.CenterScreen
}.ShowDialog();
}
public void Dispose() => Screenshot.Snapped -= Screenshot_Snapped;
}
@@ -5,7 +5,7 @@
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}"
Width="550"
MaxWidth="550"
Height="600">
<hc:TransitioningContentControl>
<Grid Margin="32">
@@ -1,11 +1,10 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class ScrollViewerDemoCtl
{
public partial class ScrollViewerDemoCtl
public ScrollViewerDemoCtl()
{
public ScrollViewerDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -4,28 +4,64 @@
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
DataContext="{Binding SearchBarDemo,Source={StaticResource Locator}}"
DataContext="{Binding InputElementDemo, Source={StaticResource Locator}}"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<StackPanel Margin="32" Orientation="Horizontal">
<StackPanel>
<hc:SearchBar Command="{Binding SearchCmd}" CommandParameter="{Binding Text,RelativeSource={RelativeSource Self}}"/>
<hc:SearchBar Margin="0,32,0,0" IsEnabled="False"/>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:UniformSpacingPanel Spacing="32" Margin="32" ChildWrapping="Wrap">
<StackPanel>
<hc:SearchBar Command="{Binding SearchCmd}" CommandParameter="{Binding Text,RelativeSource={RelativeSource Self}}"/>
<hc:SearchBar Margin="0,32,0,0" IsEnabled="False"/>
<hc:SearchBar hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Style="{StaticResource SearchBarExtend}"/>
<hc:SearchBar hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" hc:InfoElement.Necessary="True" Style="{StaticResource SearchBarExtend}"/>
<hc:SearchBar Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource SearchBarExtend}" Margin="0,32,0,0"/>
<hc:SearchBar Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource SearchBarExtend}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
</StackPanel>
<StackPanel Margin="32,0,0,0">
<hc:SearchBar Name="SearchBarCustomVerify" ShowClearButton="True" Style="{StaticResource SearchBarPlus}"/>
<hc:SearchBar Margin="0,32,0,0" IsEnabled="False" Style="{StaticResource SearchBarPlus}"/>
<hc:SearchBar hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Style="{StaticResource SearchBarExtend}"/>
<hc:SearchBar hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" hc:InfoElement.Necessary="True" Style="{StaticResource SearchBarExtend}"/>
<hc:SearchBar Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource SearchBarExtend}" Margin="0,32,0,0"/>
<hc:SearchBar Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource SearchBarExtend}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
</StackPanel>
<StackPanel>
<hc:SearchBar hc:InfoElement.ShowClearButton="True" Style="{StaticResource SearchBarPlus}"/>
<hc:SearchBar Margin="0,32,0,0" IsEnabled="False" Style="{StaticResource SearchBarPlus}"/>
<hc:SearchBar ShowClearButton="True" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Style="{StaticResource SearchBarPlus}"/>
<hc:SearchBar TextType="Mail" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterEmail}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" hc:InfoElement.Necessary="True" Style="{StaticResource SearchBarPlus}"/>
<hc:SearchBar Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource SearchBarPlus}" Margin="0,32,0,0"/>
<hc:SearchBar ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
</StackPanel>
</StackPanel>
<hc:SearchBar hc:InfoElement.ShowClearButton="True" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Style="{StaticResource SearchBarPlus}"/>
<hc:SearchBar hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterEmail}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" hc:InfoElement.Necessary="True" Style="{StaticResource SearchBarPlus}">
<hc:SearchBar.Text>
<Binding Path="Email1" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<hc:RegexRule Type="Mail"/>
</Binding.ValidationRules>
</Binding>
</hc:SearchBar.Text>
</hc:SearchBar>
<hc:SearchBar Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource SearchBarPlus}" Margin="0,32,0,0"/>
<hc:SearchBar hc:InfoElement.ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
</StackPanel>
<StackPanel>
<hc:SearchBar Command="{Binding SearchCmd}" CommandParameter="{Binding Text,RelativeSource={RelativeSource Self}}" Style="{StaticResource SearchBar.Small}"/>
<hc:SearchBar Margin="0,32,0,0" IsEnabled="False" Style="{StaticResource SearchBar.Small}"/>
<hc:SearchBar hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Style="{StaticResource SearchBarExtend.Small}"/>
<hc:SearchBar hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" hc:InfoElement.Necessary="True" Style="{StaticResource SearchBarExtend.Small}"/>
<hc:SearchBar Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource SearchBarExtend.Small}" Margin="0,32,0,0"/>
<hc:SearchBar Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource SearchBarExtend.Small}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
</StackPanel>
<StackPanel>
<hc:SearchBar hc:InfoElement.ShowClearButton="True" Style="{StaticResource SearchBarPlus.Small}"/>
<hc:SearchBar Margin="0,32,0,0" IsEnabled="False" Style="{StaticResource SearchBarPlus.Small}"/>
<hc:SearchBar hc:InfoElement.ShowClearButton="True" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Style="{StaticResource SearchBarPlus.Small}"/>
<hc:SearchBar hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterEmail}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" hc:InfoElement.Necessary="True" Style="{StaticResource SearchBarPlus.Small}">
<hc:SearchBar.Text>
<Binding Path="Email1" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<hc:RegexRule Type="Mail"/>
</Binding.ValidationRules>
</Binding>
</hc:SearchBar.Text>
</hc:SearchBar>
<hc:SearchBar Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource SearchBarPlus.Small}" Margin="0,32,0,0"/>
<hc:SearchBar hc:InfoElement.ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Style="{StaticResource SearchBarPlus.Small}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
</StackPanel>
</hc:UniformSpacingPanel>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class SearchBarDemoCtl
{
public partial class SearchBarDemoCtl
public SearchBarDemoCtl()
{
public SearchBarDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class ShieldDemoCtl
{
public partial class ShieldDemoCtl
public ShieldDemoCtl()
{
public ShieldDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,10 +1,9 @@
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl;
public partial class SideMenuDemoCtl
{
public partial class SideMenuDemoCtl
public SideMenuDemoCtl()
{
public SideMenuDemoCtl()
{
InitializeComponent();
}
InitializeComponent();
}
}
@@ -1,17 +1,16 @@
using System.Windows;
namespace HandyControlDemo.UserControl
{
public partial class SplitButtonDemoCtl
{
public SplitButtonDemoCtl()
{
InitializeComponent();
}
namespace HandyControlDemo.UserControl;
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
{
MessageBox.Show("123");
}
public partial class SplitButtonDemoCtl
{
public SplitButtonDemoCtl()
{
InitializeComponent();
}
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
{
MessageBox.Show("123");
}
}
Loaded 100 of 942 files, more files were not shown because too many files have changed in this diff. Show more