Merge branch 'master' into pr/22
This commit is contained in:
commit
5679ed933f
1920 files changed
+97379
-1797
No files matched your search
@@ -0,0 +1,22 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.Avatar"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
Margin="16"
|
||||
Effect="{StaticResource EffectShadow5}"
|
||||
Cursor="Hand"
|
||||
mc:Ignorable="d">
|
||||
<Button Style="{StaticResource ButtonCustom}" Click="ButtonAvatar_OnClick">
|
||||
<Border Background="{DynamicResource SecondaryRegionBrush}" CornerRadius="10">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Image Source="{Binding Source,RelativeSource={RelativeSource AncestorType=UserControl}}" Height="120" Width="120" Stretch="Uniform" Margin="10"/>
|
||||
<TextBlock TextTrimming="CharacterEllipsis" TextWrapping="NoWrap" Margin="0,0,0,10" Grid.Row="1" Style="{StaticResource TextBlockDefault}" Text="{Binding UserName,RelativeSource={RelativeSource AncestorType=UserControl}}"></TextBlock>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Button>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,44 @@
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class Avatar
|
||||
{
|
||||
public Avatar()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
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 static readonly DependencyProperty UserNameProperty = DependencyProperty.Register(
|
||||
"UserName", typeof(string), typeof(Avatar), new PropertyMetadata(default(string)));
|
||||
|
||||
public string UserName
|
||||
{
|
||||
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 string Link
|
||||
{
|
||||
get => (string) GetValue(LinkProperty);
|
||||
set => SetValue(LinkProperty, value);
|
||||
}
|
||||
|
||||
private void ButtonAvatar_OnClick(object sender, RoutedEventArgs e) => Process.Start(Link);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.ChatBox"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:interactivity="clr-namespace:HandyControl.Interactivity;assembly=HandyControl"
|
||||
mc:Ignorable="d"
|
||||
Height="486"
|
||||
Effect="{StaticResource EffectShadow5}"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
DataContext="{Binding ChatBox,Source={StaticResource Locator}}"
|
||||
Width="300">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.CanContentScroll="False" Background="Transparent" controls:ChatBubble.MaxWidth="300" BorderThickness="0" Style="{StaticResource StackPanelVerticalListBox}" ItemsSource="{Binding ChatInfos}">
|
||||
<interactivity:Interaction.Triggers>
|
||||
<interactivity:RoutedEventTrigger RoutedEvent="controls:ChatBubble.Selected">
|
||||
<interactivity:EventToCommand Command="{Binding ReadMessageCmd}" PassEventArgsToCommand="True" />
|
||||
</interactivity:RoutedEventTrigger>
|
||||
</interactivity:Interaction.Triggers>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<controls:ChatBubble Role="{Binding Role}" Type="{Binding Type}" Content="{Binding Message}" Tag="{Binding}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<Border Background="{DynamicResource DarkDefaultBrush}" Grid.Row="1">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ToggleButton Name="ToggleButtonAudio" controls:BorderElement.CornerRadius="15" Width="30" Height="30" Padding="7" Margin="6" controls:IconSwitchElement.Geometry="{StaticResource AudioGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource KeyboardGeometry}" Style="{StaticResource ToggleButtonIcon}"/>
|
||||
<Button Command="{Binding OpenImageCmd}" Grid.Column="2" Margin="6,0,6,0" controls:BorderElement.CornerRadius="15" Width="30" Height="30" Padding="7" controls:IconElement.Geometry="{StaticResource ImageGeometry}"/>
|
||||
<TextBox Grid.Column="1" Text="{Binding ChatString,UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding IsChecked,ElementName=ToggleButtonAudio,Converter={StaticResource Boolean2VisibilityReConverter}}">
|
||||
<interactivity:Interaction.Triggers>
|
||||
<interactivity:EventTrigger EventName="KeyDown">
|
||||
<interactivity:EventToCommand Command="{Binding SendStringCmd}" PassEventArgsToCommand="True" />
|
||||
</interactivity:EventTrigger>
|
||||
</interactivity:Interaction.Triggers>
|
||||
</TextBox>
|
||||
<Button Grid.Column="1" Visibility="{Binding IsChecked,ElementName=ToggleButtonAudio,Converter={StaticResource Boolean2VisibilityConverter}}" Content="{x:Static langs:Lang.PushToTalk}" HorizontalAlignment="Stretch">
|
||||
<interactivity:Interaction.Triggers>
|
||||
<interactivity:EventTrigger EventName="PreviewMouseLeftButtonDown">
|
||||
<interactivity:EventToCommand Command="{Binding StartRecordCmd}"/>
|
||||
</interactivity:EventTrigger>
|
||||
<interactivity:EventTrigger EventName="PreviewMouseLeftButtonUp">
|
||||
<interactivity:EventToCommand Command="{Binding StopRecordCmd}"/>
|
||||
</interactivity:EventTrigger>
|
||||
</interactivity:Interaction.Triggers>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class ChatBox
|
||||
{
|
||||
public ChatBox()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<Border x:Class="HandyControlDemo.UserControl.Basic.InteractiveDialog"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
CornerRadius="10"
|
||||
Width="400"
|
||||
Height="247"
|
||||
DataContext="{Binding InteractiveDialog, Source={StaticResource Locator}}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<StackPanel VerticalAlignment="Center" Margin="32">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Text="{Binding Message}"/>
|
||||
<TextBox Margin="0,32,0,0" Style="{StaticResource TextBoxExtend}" Text="{Binding Result,UpdateSourceTrigger=PropertyChanged}" controls:InfoElement.Placeholder="{x:Static langs:Lang.PleaseInput}"/>
|
||||
<Button Width="120" Margin="0,32,0,0" Command="{Binding CloseCmd}" Style="{StaticResource ButtonPrimary}" Content="{x:Static langs:Lang.Ok}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl.Basic
|
||||
{
|
||||
public partial class InteractiveDialog
|
||||
{
|
||||
public InteractiveDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<Border x:Class="HandyControlDemo.UserControl.TextDialog"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:interactivity="clr-namespace:HandyControl.Interactivity;assembly=HandyControl"
|
||||
CornerRadius="10"
|
||||
Width="400"
|
||||
Height="247"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:SimplePanel>
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Text="{x:Static langs:Lang.PleaseWait}"/>
|
||||
<Button Width="22" Height="22" Command="interactivity:ControlCommands.Close" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource PrimaryBrush}" controls:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,4,4,0"/>
|
||||
</controls:SimplePanel>
|
||||
</Border>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class TextDialog
|
||||
{
|
||||
public TextDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.AnimationPathDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||
<controls:TransitioningContentControl>
|
||||
<Viewbox Margin="32" Width="200" Height="200">
|
||||
<controls:AnimationPath VerticalAlignment="Center" Duration="0:0:6" Stretch="Uniform" Width="1024" Height="1024" StrokeThickness="10" Stroke="{DynamicResource PrimaryBrush}" Data="{StaticResource GithubGeometry}"/>
|
||||
</Viewbox>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class AnimationPathDemoCtl
|
||||
{
|
||||
public AnimationPathDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.BadgeDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
DataContext="{Binding BadgeDemo, Source={StaticResource Locator}}">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Margin="32" Orientation="Horizontal">
|
||||
<controls:Badge Text="New" BadgeMargin="0,-14,-20,0" Height="30">
|
||||
<Button Content="{x:Static langs:Lang.Comment}"/>
|
||||
</controls:Badge>
|
||||
<controls:Badge Text="New" BadgeMargin="0,-14,-20,0" Height="30" Margin="32,0,0,0" Style="{StaticResource BadgeDanger}">
|
||||
<Button Content="{x:Static langs:Lang.Comment}"/>
|
||||
</controls:Badge>
|
||||
<controls:Badge Value="{Binding Count}" BadgeMargin="0,-14,-10,0" Height="30" Margin="32,0,0,0" Style="{StaticResource BadgePrimary}">
|
||||
<Button Content="{x:Static langs:Lang.Click2Count}" Command="{Binding CountCmd}"/>
|
||||
</controls:Badge>
|
||||
<controls:Badge Value="100" BadgeMargin="0,-14,-20,0" Height="30" Margin="32,0,0,0" Style="{StaticResource BadgeDanger}">
|
||||
<Button Content="{x:Static langs:Lang.Comment}"/>
|
||||
</controls:Badge>
|
||||
<controls:Badge Status="Dot" Height="30" Margin="32,0,0,0" Style="{StaticResource BadgeDanger}">
|
||||
<Button Content="{x:Static langs:Lang.Reply}"/>
|
||||
</controls:Badge>
|
||||
<controls:Badge Status="Processing" Height="30" Margin="32,0,0,0" Style="{StaticResource BadgeDanger}">
|
||||
<Button Content="{x:Static langs:Lang.Reply}" />
|
||||
</controls:Badge>
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class BadgeDemoCtl
|
||||
{
|
||||
public BadgeDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.CalendarWithClockDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:CalendarWithClock Margin="32"/>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class CalendarWithClockDemoCtl
|
||||
{
|
||||
public CalendarWithClockDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.CarouselDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:Carousel Margin="32" IsCenter="True" AutoRun="True" Width="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"/>
|
||||
<controls:SimplePanel Width="600">
|
||||
<Image Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/3.jpg"/>
|
||||
<TextBlock Text="示例文本" Style="{StaticResource TextBlockDefault}" FontSize="100" FontWeight="Bold" Foreground="White"/>
|
||||
</controls:SimplePanel>
|
||||
<Image Width="600" Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/4.jpg"/>
|
||||
<Image Width="600" Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/5.jpg"/>
|
||||
</controls:Carousel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class CarouselDemoCtl
|
||||
{
|
||||
public CarouselDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.ChatBubbleDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls: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>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class ChatBubbleDemoCtl
|
||||
{
|
||||
public ChatBubbleDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.CirclePanelDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:CirclePanel Margin="64" Diameter="170">
|
||||
<Button Style="{StaticResource CirclePanelButton}"/>
|
||||
<Button Style="{StaticResource CirclePanelButton}"/>
|
||||
<Button Style="{StaticResource CirclePanelButton}"/>
|
||||
<Button Style="{StaticResource CirclePanelButton}"/>
|
||||
<Button Style="{StaticResource CirclePanelButton}"/>
|
||||
<Button Style="{StaticResource CirclePanelButton}"/>
|
||||
<Button Style="{StaticResource CirclePanelButton}"/>
|
||||
<Button Style="{StaticResource CirclePanelButton}"/>
|
||||
</controls:CirclePanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class CirclePanelDemoCtl
|
||||
{
|
||||
public CirclePanelDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.ClockDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:Clock Margin="32"/>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class ClockDemoCtl
|
||||
{
|
||||
public ClockDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.ColorPickerDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:ColorPicker Name="ColorPicker" Margin="32"/>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class ColorPickerDemoCtl
|
||||
{
|
||||
public ColorPickerDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<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}}"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<ScrollViewer>
|
||||
<StackPanel Margin="32">
|
||||
<controls:ComboBox ShowClearButton="True" ItemsSource="{Binding DataList}" SelectedIndex="0"/>
|
||||
<controls:ComboBox ItemsSource="{Binding DataList}" Margin="0,16,0,0" SelectedIndex="0" IsEnabled="False"/>
|
||||
<controls:ComboBox ShowClearButton="True" ItemsSource="{Binding DataList}" SelectedIndex="0" Margin="0,16,0,0" IsEditable="True"/>
|
||||
|
||||
<controls:ComboBox ItemsSource="{Binding DataList}" SelectedIndex="0" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<controls:ComboBox ShowClearButton="True" ItemsSource="{Binding DataList}" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" controls:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
<controls:ComboBox ItemsSource="{Binding DataList}" IsEditable="True" SelectedIndex="0" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<controls:ComboBox ShowClearButton="True" ItemsSource="{Binding DataList}" IsEditable="True" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" controls:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
|
||||
<controls:ComboBox ItemsSource="{Binding DataList}" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<controls:ComboBox ShowClearButton="True" ItemsSource="{Binding DataList}" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" controls:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
<controls:ComboBox ItemsSource="{Binding DataList}" IsEditable="True" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<controls:ComboBox ShowClearButton="True" ItemsSource="{Binding DataList}" IsEditable="True" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" controls:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class ComboBoxDemoCtl
|
||||
{
|
||||
public ComboBoxDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.CompareSliderDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:ScrollViewer VerticalAlignment="Center">
|
||||
<WrapPanel ItemHeight="384" ItemWidth="632">
|
||||
<controls:CompareSlider Value="5" Width="600" Height="352">
|
||||
<controls:CompareSlider.TargetContent>
|
||||
<Border>
|
||||
<Border.Background>
|
||||
<ImageBrush ImageSource="/HandyControlDemo;component/Resources/Img/b1.jpg"/>
|
||||
</Border.Background>
|
||||
</Border>
|
||||
</controls:CompareSlider.TargetContent>
|
||||
<controls:CompareSlider.SourceContent>
|
||||
<Border>
|
||||
<Border.Background>
|
||||
<ImageBrush ImageSource="/HandyControlDemo;component/Resources/Img/b2.jpg"/>
|
||||
</Border.Background>
|
||||
</Border>
|
||||
</controls:CompareSlider.SourceContent>
|
||||
</controls:CompareSlider>
|
||||
<controls:CompareSlider Orientation="Vertical" Value="5" Width="600" Height="352">
|
||||
<controls:CompareSlider.TargetContent>
|
||||
<Border>
|
||||
<Border.Background>
|
||||
<ImageBrush ImageSource="/HandyControlDemo;component/Resources/Img/b1.jpg"/>
|
||||
</Border.Background>
|
||||
</Border>
|
||||
</controls:CompareSlider.TargetContent>
|
||||
<controls:CompareSlider.SourceContent>
|
||||
<Border>
|
||||
<Border.Background>
|
||||
<ImageBrush ImageSource="/HandyControlDemo;component/Resources/Img/b2.jpg"/>
|
||||
</Border.Background>
|
||||
</Border>
|
||||
</controls:CompareSlider.SourceContent>
|
||||
</controls:CompareSlider>
|
||||
</WrapPanel>
|
||||
</controls:ScrollViewer>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class CompareSliderDemoCtl
|
||||
{
|
||||
public CompareSliderDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.CoverFlowDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:CoverFlow x:Name="CoverFlowMain" Margin="32" Width="500" Height="300"/>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class CoverFlowDemoCtl
|
||||
{
|
||||
public CoverFlowDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
CoverFlowMain.AddRange(new List<Uri>
|
||||
{
|
||||
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.JumpTo(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.CoverViewDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
DataContext="{Binding CoverView,Source={StaticResource Locator}}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:CoverView Margin="27" Width="880" Height="432" ItemWidth="160" ItemHeight="160" ItemsSource="{Binding DataList}">
|
||||
<controls:CoverView.ItemHeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Image Source="{Binding ImgPath}"/>
|
||||
</DataTemplate>
|
||||
</controls:CoverView.ItemHeaderTemplate>
|
||||
<controls:CoverView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Margin="10" Height="300" Background="{Binding BackgroundToken,Converter={StaticResource String2BrushConverter}}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</controls:CoverView.ItemTemplate>
|
||||
</controls:CoverView>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class CoverViewDemoCtl
|
||||
{
|
||||
public CoverViewDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.DatePickerDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Margin="32">
|
||||
<controls:DatePicker ShowClearButton="True" SelectedDate="{x:Static system:DateTime.Now}"/>
|
||||
<controls:DatePicker Margin="0,16,0,0" IsEnabled="False" SelectedDate="{x:Static system:DateTime.Now}"/>
|
||||
|
||||
<controls:DatePicker ShowClearButton="True" SelectedDate="{x:Static system:DateTime.Now}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0"/>
|
||||
<controls:DatePicker SelectedDate="{x:Static system:DateTime.Now}" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
|
||||
<controls:DatePicker ShowClearButton="True" SelectedDate="{x:Static system:DateTime.Now}" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0"/>
|
||||
<controls:DatePicker Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class DatePickerDemoCtl
|
||||
{
|
||||
public DatePickerDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.DateTimePickerDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Margin="32" Orientation="Horizontal">
|
||||
<StackPanel>
|
||||
<controls:DateTimePicker ShowClearButton="True"/>
|
||||
<controls:DateTimePicker Margin="0,16,0,0" IsEnabled="False"/>
|
||||
|
||||
<controls:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerExtend}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0"/>
|
||||
<controls:DateTimePicker controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource DateTimePickerExtend}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
|
||||
<controls:DateTimePicker ShowClearButton="True" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" Style="{StaticResource DateTimePickerExtend}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0"/>
|
||||
<controls:DateTimePicker Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource DateTimePickerExtend}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="32,0,0,0">
|
||||
<controls:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerPlus}"/>
|
||||
<controls:DateTimePicker Margin="0,16,0,0" IsEnabled="False" Style="{StaticResource DateTimePickerPlus}"/>
|
||||
|
||||
<controls:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerPlus}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0"/>
|
||||
<controls:DateTimePicker controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource DateTimePickerPlus}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
|
||||
<controls:DateTimePicker ShowClearButton="True" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" Style="{StaticResource DateTimePickerPlus}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0"/>
|
||||
<controls:DateTimePicker Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource DateTimePickerPlus}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class DateTimePickerDemoCtl
|
||||
{
|
||||
public DateTimePickerDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.DialogDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
MinWidth="300"
|
||||
DataContext="{Binding DialogDemo,Source={StaticResource Locator}}">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Margin="32" VerticalAlignment="Center">
|
||||
<Button Content="{x:Static langs:Lang.TextDialog}" Command="{Binding ShowTextCmd}" />
|
||||
<TextBox Margin="0,32,0,0" Text="{Binding DialogResult,UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource TextBoxExtend}" controls:InfoElement.Placeholder="{x:Static langs:Lang.PleaseInput}"/>
|
||||
<Button Margin="0,10,0,0" Content="{x:Static langs:Lang.InteractiveDialog}" Command="{Binding ShowInteractiveDialogCmd}"/>
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class DialogDemoCtl
|
||||
{
|
||||
public DialogDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.FlipClockDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:FlipClock Margin="32"/>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class FlipClockDemoCtl
|
||||
{
|
||||
public FlipClockDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.GifImageDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:GifImage x:Name="GifImageMain" Margin="32" Width="400" Height="300">
|
||||
<controls:GifImage.Source>
|
||||
<BitmapImage UriSource="/HandyControlDemo;component/Resources/Img/car_chase.gif"/>
|
||||
</controls:GifImage.Source>
|
||||
</controls:GifImage>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class GifImageDemoCtl : IDisposable
|
||||
{
|
||||
public GifImageDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
GifImageMain.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.GotoTopDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:SimplePanel Width="500" Height="400">
|
||||
<controls:ScrollViewer Name="ScrollViewerDemo" IsEnableInertia="True" Margin="0,10,0,0">
|
||||
<Border Height="2000" Margin="8,0">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="White" Offset="0"/>
|
||||
<GradientStop Color="Black" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
</Border>
|
||||
</controls:ScrollViewer>
|
||||
<controls:GotoTop Animated="True" AutoHiding="True" AnimationTime="500" Target="{Binding ElementName=ScrollViewerDemo}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,20,20"/>
|
||||
</controls:SimplePanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class GotoTopDemoCtl
|
||||
{
|
||||
public GotoTopDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.GravatarDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Margin="32" Orientation="Horizontal">
|
||||
<UniformGrid Rows="3" Columns="3" Width="240" Height="240">
|
||||
<controls:Gravatar Id="User1"/>
|
||||
<controls:Gravatar Id="User2"/>
|
||||
<controls:Gravatar Style="{StaticResource GravatarCircleImg}">
|
||||
<Image Source="/HandyControlDemo;component/Resources/Img/Album/2.jpg"/>
|
||||
</controls:Gravatar>
|
||||
<controls:Gravatar Id="User4"/>
|
||||
<controls:Gravatar Id="User5" Style="{StaticResource GravatarCircle}"/>
|
||||
<controls:Gravatar Id="User6"/>
|
||||
<controls:Gravatar Style="{StaticResource GravatarCircle}" Source="/HandyControlDemo;component/Resources/Img/Album/1.jpg"/>
|
||||
<controls:Gravatar Id="User8"/>
|
||||
<controls:Gravatar Id="User9"/>
|
||||
</UniformGrid>
|
||||
<StackPanel Margin="16,0,0,0" Height="220" VerticalAlignment="Center">
|
||||
<TextBox Text="User1" Name="TextBoxName" Width="180"/>
|
||||
<controls:Gravatar Height="180" Width="180" Id="{Binding Text,ElementName=TextBoxName}" Margin="10"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class GravatarDemoCtl
|
||||
{
|
||||
public GravatarDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.GrowlDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
DataContext="{Binding GrowlDemo,Source={StaticResource Locator}}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Margin="32">
|
||||
<WrapPanel VerticalAlignment="Center">
|
||||
<Button Command="{Binding InfoCmd}" Content="{x:Static langs:Lang.Info}" Margin="0,5,5,5" Style="{StaticResource ButtonInfo}"/>
|
||||
<Button Command="{Binding SuccessCmd}" Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
|
||||
<Button Command="{Binding WarningCmd}" Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ButtonWarning}"/>
|
||||
<Button Command="{Binding ErrorCmd}" Content="{x:Static langs:Lang.Error}" Margin="5" Style="{StaticResource ButtonDanger}"/>
|
||||
<Button Command="{Binding AskCmd}" Content="{x:Static langs:Lang.Ask}" Margin="5" Background="BlueViolet" Foreground="White"/>
|
||||
<Button Command="{Binding FatalCmd}" Content="{x:Static langs:Lang.Fatal}" Margin="5,0"/>
|
||||
<Button Command="{Binding ClearCmd}" Content="{x:Static langs:Lang.Clear}" Margin="5,0,0,0" Style="{StaticResource ButtonPrimary}"/>
|
||||
</WrapPanel>
|
||||
<Button Command="{Binding NewWindowCmd}" Content="{x:Static langs:Lang.NewWindow}" Margin="0,5,0,0" HorizontalAlignment="Left"/>
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// GrowlDemoGrid.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class GrowlDemoCtl
|
||||
{
|
||||
public GrowlDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.ImageBrowserDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
DataContext="{Binding ImageBrowserDemo,Source={StaticResource Locator}}"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Margin="32">
|
||||
<controls:ImageViewer Background="{DynamicResource BackgroundBrush}" Width="600" Height="330" ImageSource="/HandyControlDemo;component/Resources/Img/1.jpg"/>
|
||||
<Button Margin="0,32,0,0" Command="{Binding OpenImgCmd}" Content="{x:Static langs:Lang.OpenImageBrowser}" Style="{StaticResource ButtonPrimary}" HorizontalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// ImageBrowserDemoCtl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class ImageBrowserDemoCtl
|
||||
{
|
||||
public ImageBrowserDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.LoadingDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Width="600" Margin="32" VerticalAlignment="Center">
|
||||
<controls:LoadingLine/>
|
||||
<controls:LoadingLine Margin="0,30" Foreground="BlueViolet" Style="{StaticResource LoadingLineLarge}"/>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<controls:LoadingCircle/>
|
||||
<Border VerticalAlignment="Center" Margin="32,0,0,0" Background="{DynamicResource PrimaryBrush}" CornerRadius="10">
|
||||
<controls:LoadingCircle Style="{StaticResource LoadingCircleLight}" Margin="10"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class LoadingDemoCtl
|
||||
{
|
||||
public LoadingDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.NotifyIconDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:interactivity="clr-namespace:HandyControl.Interactivity;assembly=HandyControl"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:command="http://www.galasoft.ch/mvvmlight"
|
||||
DataContext="{Binding NotifyIconDemo,Source={StaticResource Locator}}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:SimplePanel Margin="32">
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<GroupBox Header="ContextMenu" Padding="10">
|
||||
<StackPanel>
|
||||
<GroupBox controls:TitleElement.TitleAlignment="Left" Style="{StaticResource GroupBoxOriginal}" Header="{x:Static langs:Lang.Visibility}">
|
||||
<ToggleButton IsChecked="{Binding ContextMenuIsShow}" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
</GroupBox>
|
||||
<TextBlock Foreground="{DynamicResource InfoBrush}" Visibility="{Binding ContextMenuIsShow,Converter={StaticResource Boolean2VisibilityConverter}}" Text="{x:Static langs:Lang.Try2CloseApp}" Margin="0,6,0,0"/>
|
||||
<GroupBox Margin="0,10,0,0" controls:TitleElement.TitleAlignment="Left" Style="{StaticResource GroupBoxOriginal}" Header="{x:Static langs:Lang.Blink}">
|
||||
<ToggleButton IsChecked="{Binding ContextMenuIsBlink}" IsEnabled="{Binding ContextMenuIsShow}" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<GroupBox Header="ContextContent" Margin="16,0,0,0" Padding="10">
|
||||
<StackPanel>
|
||||
<GroupBox controls:TitleElement.TitleAlignment="Left" Style="{StaticResource GroupBoxOriginal}" Header="{x:Static langs:Lang.Visibility}">
|
||||
<ToggleButton IsChecked="{Binding ContextContentIsShow}" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
</GroupBox>
|
||||
<TextBlock Foreground="{DynamicResource InfoBrush}" Visibility="{Binding ContextContentIsShow,Converter={StaticResource Boolean2VisibilityConverter}}" Text="{x:Static langs:Lang.Try2CloseApp}" Margin="0,6,0,0"/>
|
||||
<GroupBox Margin="0,10,0,0" controls:TitleElement.TitleAlignment="Left" Style="{StaticResource GroupBoxOriginal}" Header="{x:Static langs:Lang.Blink}">
|
||||
<ToggleButton IsChecked="{Binding ContextContentIsBlink}" IsEnabled="{Binding ContextContentIsShow}" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
<controls:NotifyIcon Text="HandyControl" IsBlink="{Binding ContextMenuIsBlink}" Visibility="{Binding ContextMenuIsShow,Converter={StaticResource Boolean2VisibilityConverter}}">
|
||||
<controls:NotifyIcon.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Command="interactivity:ControlCommands.PushMainWindow2Top" Header="{x:Static langs:Lang.OpenPanel}"/>
|
||||
<MenuItem Command="interactivity:ControlCommands.ShutdownApp" Header="{x:Static langs:Lang.Exit}"/>
|
||||
</ContextMenu>
|
||||
</controls:NotifyIcon.ContextMenu>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<command:EventToCommand Command="interactivity:ControlCommands.PushMainWindow2Top"/>
|
||||
</i:EventTrigger>
|
||||
<i:EventTrigger EventName="MouseDoubleClick">
|
||||
<command:EventToCommand Command="{Binding MouseCmd}" CommandParameter="MouseDoubleClick"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</controls:NotifyIcon>
|
||||
<controls:NotifyIcon x:Name="NotifyIconContextContent" Text="HandyControl" IsBlink="{Binding ContextContentIsBlink}" Visibility="{Binding ContextContentIsShow,Converter={StaticResource Boolean2VisibilityConverter}}" Icon="/HandyControlDemo;component/Resources/Img/icon-white.ico">
|
||||
<controls:NotifyIcon.ContextContent>
|
||||
<Border CornerRadius="4" Margin="10" Background="White" Effect="{StaticResource EffectShadow2}">
|
||||
<StackPanel VerticalAlignment="Center" Margin="16">
|
||||
<Path Width="100" Height="100" Fill="#f06632" Data="{StaticResource LogoGeometry}"/>
|
||||
<StackPanel Margin="0,16,0,0" HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<Button Click="ButtonPush_OnClick" Command="interactivity:ControlCommands.PushMainWindow2Top" MinWidth="100" Content="{x:Static langs:Lang.OpenPanel}"/>
|
||||
<Button Command="interactivity:ControlCommands.ShutdownApp" Margin="16,0,0,0" MinWidth="100" Style="{StaticResource ButtonPrimary}" Content="{x:Static langs:Lang.Exit}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</controls:NotifyIcon.ContextContent>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<command:EventToCommand Command="interactivity:ControlCommands.PushMainWindow2Top"/>
|
||||
</i:EventTrigger>
|
||||
<i:EventTrigger EventName="MouseDoubleClick">
|
||||
<command:EventToCommand Command="{Binding MouseCmd}" CommandParameter="MouseDoubleClick"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</controls:NotifyIcon>
|
||||
</controls:SimplePanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,14 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class NotifyIconDemoCtl
|
||||
{
|
||||
public NotifyIconDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void ButtonPush_OnClick(object sender, RoutedEventArgs e) => NotifyIconContextContent.CloseContextControl();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.NumericUpDownDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Margin="32" Orientation="Horizontal">
|
||||
<StackPanel>
|
||||
<controls:NumericUpDown/>
|
||||
<controls:NumericUpDown Margin="0,32,0,0" IsEnabled="False"/>
|
||||
|
||||
<controls:NumericUpDown controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" Style="{StaticResource NumericUpDownExtend}"/>
|
||||
<controls:NumericUpDown controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" controls:InfoElement.Necessary="True" Style="{StaticResource NumericUpDownExtend}"/>
|
||||
<controls:NumericUpDown Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource NumericUpDownExtend}" Margin="0,32,0,0"/>
|
||||
<controls:NumericUpDown Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource NumericUpDownExtend}" controls:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="32,0,0,0">
|
||||
<controls:NumericUpDown Name="NumericUpDownCustomVerify" ShowClearButton="True" Style="{StaticResource NumericUpDownPlus}"/>
|
||||
<controls:NumericUpDown Margin="0,32,0,0" IsEnabled="False" Style="{StaticResource NumericUpDownPlus}"/>
|
||||
|
||||
<controls:NumericUpDown ShowClearButton="True" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" Style="{StaticResource NumericUpDownPlus}"/>
|
||||
<controls:NumericUpDown controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" controls:InfoElement.Necessary="True" Style="{StaticResource NumericUpDownPlus}"/>
|
||||
<controls:NumericUpDown Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource NumericUpDownPlus}" Margin="0,32,0,0"/>
|
||||
<controls:NumericUpDown DecimalPlaces="2" ShowClearButton="True" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource NumericUpDownPlus}" controls:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,19 @@
|
||||
using HandyControl.Data;
|
||||
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.OutlineTextDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Margin="32" Width="400">
|
||||
<controls:OutlineText TextWrapping="Wrap" Text="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=20}"/>
|
||||
<controls:OutlineText Margin="0,10,0,0" FontSize="30" Fill="{DynamicResource SuccessBrush}" Text="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=8}"/>
|
||||
<controls:OutlineText Margin="0,10,0,0" FontSize="30" FontStyle="Italic" Text="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=8}"/>
|
||||
<controls:OutlineText Margin="0,10,0,0" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" FontSize="50" StrokeThickness="2" Fill="{DynamicResource DangerBrush}" Stroke="{DynamicResource PrimaryBrush}" Text="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}"/>
|
||||
<controls:OutlineText Margin="0,10,0,0" FontSize="80" FontWeight="Bold" StrokeThickness="4" Fill="{DynamicResource PrimaryBrush}" Stroke="{DynamicResource DangerBrush}" Text="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class OutlineTextDemoCtl
|
||||
{
|
||||
public OutlineTextDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.PaginationDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
DataContext="{Binding PaginationDemo,Source={StaticResource Locator}}"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:i="clr-namespace:HandyControl.Interactivity;assembly=HandyControl">
|
||||
<controls:TransitioningContentControl>
|
||||
<Grid Margin="32">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<controls:Pagination MaxPageCount="10" PageIndex="{Binding PageIndex}">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="PageUpdated">
|
||||
<i:EventToCommand Command="{Binding PageUpdatedCmd}" PassEventArgsToCommand="True" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</controls:Pagination>
|
||||
<DataGrid IsReadOnly="True" Width="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}}"/>
|
||||
</DataTemplate>
|
||||
</DataGrid.RowHeaderTemplate>
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn IsReadOnly="True" Width="80" CanUserResize="False" Binding="{Binding Index}" Header="{x:Static langs:Lang.Index}"/>
|
||||
<DataGridTemplateColumn Width="50" CanUserResize="False">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Image Source="{Binding ImgPath}" Width="32" Height="32" Stretch="Uniform"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Width="1*" Binding="{Binding Name}" Header="{x:Static langs:Lang.Name}"/>
|
||||
<DataGridCheckBoxColumn Width="100" CanUserResize="False" Binding="{Binding IsSelected}" Header="{x:Static langs:Lang.Selected}"/>
|
||||
<DataGridComboBoxColumn ItemsSource="{Binding Source={StaticResource DemoTypes}}" Width="100" CanUserResize="False" SelectedValueBinding="{Binding Type}" Header="{x:Static langs:Lang.Type}"/>
|
||||
<DataGridTextColumn Width="1*" Binding="{Binding Remark}" Header="{x:Static langs:Lang.Remark}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class PaginationDemoCtl
|
||||
{
|
||||
public PaginationDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.PasswordBoxDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Margin="32">
|
||||
<controls:PasswordBox ShowClearButton="True" ShowPassword="False" Password="123456"/>
|
||||
<controls:PasswordBox Password="123456" ShowPassword="True" Margin="0,16,0,0"/>
|
||||
|
||||
<controls:PasswordBox ShowClearButton="True" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Password="123456" Margin="0,32,0,0"/>
|
||||
<controls:PasswordBox controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" controls:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
|
||||
<controls:PasswordBox ShowClearButton="True" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0" Password="123456"/>
|
||||
<controls:PasswordBox Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" controls:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class PasswordBoxDemoCtl
|
||||
{
|
||||
public PasswordBoxDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.PreviewSliderDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:PreviewSlider Name="PreviewSlider" Width="800" Value="500" Maximum="1000" VerticalAlignment="Center" Margin="32">
|
||||
<controls:PreviewSlider.PreviewContent>
|
||||
<Label Style="{StaticResource LabelPrimary}" Content="{Binding PreviewPosition,ElementName=PreviewSlider}" ContentStringFormat="{}{0:#0.0}"/>
|
||||
</controls:PreviewSlider.PreviewContent>
|
||||
</controls:PreviewSlider>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class PreviewSliderDemoCtl
|
||||
{
|
||||
public PreviewSliderDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.ProgressBarDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Margin="32">
|
||||
<Slider Value="50" Name="SliderDemo" Maximum="100"/>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,32,0,0">
|
||||
<controls:CircleProgressBar Value="{Binding Value,ElementName=SliderDemo}"/>
|
||||
<controls:CircleProgressBar Value="{Binding Value,ElementName=SliderDemo}" FontSize="30" Margin="16,0,0,0"/>
|
||||
<controls:CircleProgressBar Value="{Binding Value,ElementName=SliderDemo}" Margin="16,0,0,0" ShowText="False" Width="20" Height="20" ArcThickness="2" Style="{StaticResource ProgressBarSuccessCircle}"/>
|
||||
<controls:CircleProgressBar Value="{Binding Value,ElementName=SliderDemo}" Margin="16,0,0,0" ShowText="False" Width="30" Height="30" ArcThickness="6" Style="{StaticResource ProgressBarInfoCircle}"/>
|
||||
<controls:CircleProgressBar Value="{Binding Value,ElementName=SliderDemo}" Margin="16,0,0,0" ShowText="False" Width="40" Height="40" ArcThickness="10" Style="{StaticResource ProgressBarWarningCircle}"/>
|
||||
<controls:CircleProgressBar Value="{Binding Value,ElementName=SliderDemo}" Margin="16,0,0,0" Width="50" Height="50" Style="{StaticResource ProgressBarDangerCircle}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,32,0,0">
|
||||
<controls:WaveProgressBar Value="{Binding Value,ElementName=SliderDemo}"/>
|
||||
<controls:WaveProgressBar Value="{Binding Value,ElementName=SliderDemo}" FontSize="20" Margin="16,0,0,0" WaveThickness="4" WaveStroke="#FFFF0080">
|
||||
<controls:WaveProgressBar.WaveFill>
|
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
|
||||
<GradientStop Color="#66FF0080" Offset="0"/>
|
||||
<GradientStop Color="#FFFF0080" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</controls:WaveProgressBar.WaveFill>
|
||||
</controls:WaveProgressBar>
|
||||
<controls:WaveProgressBar Value="{Binding Value,ElementName=SliderDemo}" Margin="16,0,0,0" ShowText="False" Width="50" Height="50" Style="{StaticResource ProgressBarWarningWave}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class ProgressBarDemoCtl
|
||||
{
|
||||
public ProgressBarDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.ProgressButtonDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Margin="32" Width="300" Button.Click="ButtonProgress_OnClick" VerticalAlignment="Center">
|
||||
<controls:ProgressButton IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StrConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
|
||||
<controls:ProgressButton Style="{StaticResource ProgressButtonPrimary}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StrConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
|
||||
<controls:ProgressButton Style="{StaticResource ProgressButtonSuccess}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StrConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
|
||||
<controls:ProgressButton Style="{StaticResource ProgressButtonInfo}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StrConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
|
||||
<controls:ProgressButton Style="{StaticResource ProgressButtonWarning}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StrConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
|
||||
<controls:ProgressButton Style="{StaticResource ProgressButtonDanger}" IsChecked="{Binding IsUploading,Mode=TwoWay}" Progress="{Binding Progress}" Content="{Binding IsChecked,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2StrConverter},ConverterParameter={x:Static langs:Lang.UploadStr}}" Width="180" Margin="5"/>
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Threading;
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class ProgressButtonDemoCtl
|
||||
{
|
||||
public static readonly DependencyProperty ProgressProperty = DependencyProperty.Register(
|
||||
"Progress", typeof(int), typeof(ProgressButtonDemoCtl), new PropertyMetadata(default(int)));
|
||||
|
||||
public int Progress
|
||||
{
|
||||
get => (int) GetValue(ProgressProperty);
|
||||
set => SetValue(ProgressProperty, value);
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.RateDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Margin="32" HorizontalAlignment="Center" VerticalAlignment="Center" Width="170">
|
||||
<controls:Rate Value="2"/>
|
||||
<controls:Rate Value="5" Count="6" Margin="0,16,0,0" Foreground="{DynamicResource SuccessBrush}"/>
|
||||
<controls:Rate DefaultValue="3" IsReadOnly="True" AllowHalf="True" Margin="0,16,0,0" Foreground="{DynamicResource WarningBrush}"/>
|
||||
<controls:Rate DefaultValue="1" AllowClear="False" AllowHalf="True" Margin="0,16,0,0" Foreground="{DynamicResource DangerBrush}" Icon="{StaticResource LoveGeometry}"/>
|
||||
<controls:Rate Value="4.5" AllowHalf="True" ShowText="True" Margin="0,16,0,0" Foreground="{DynamicResource DangerBrush}" Icon="{StaticResource LoveGeometry}"/>
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class RateDemoCtl
|
||||
{
|
||||
public RateDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.ScrollViewerDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
Width="550"
|
||||
Height="600">
|
||||
<controls:TransitioningContentControl>
|
||||
<Grid Margin="32">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
|
||||
<controls:ScrollViewer Orientation="Horizontal" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden" IsEnableInertia="True">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</controls:ScrollViewer>
|
||||
</Border>
|
||||
<Border Grid.Row="1" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Margin="0,16,0,0">
|
||||
<controls:ScrollViewer IsEnableInertia="True">
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
</WrapPanel>
|
||||
</controls:ScrollViewer>
|
||||
</Border>
|
||||
</Grid>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class ScrollViewerDemoCtl
|
||||
{
|
||||
public ScrollViewerDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.SearchBarDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
DataContext="{Binding SearchBarDemo,Source={StaticResource Locator}}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Margin="32" Orientation="Horizontal">
|
||||
<StackPanel>
|
||||
<controls:SearchBar Command="{Binding SearchCmd}" CommandParameter="{Binding Text,RelativeSource={RelativeSource Self}}"/>
|
||||
<controls:SearchBar Margin="0,32,0,0" IsEnabled="False"/>
|
||||
|
||||
<controls:SearchBar controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" Style="{StaticResource SearchBarExtend}"/>
|
||||
<controls:SearchBar controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" controls:InfoElement.Necessary="True" Style="{StaticResource SearchBarExtend}"/>
|
||||
<controls:SearchBar Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource SearchBarExtend}" Margin="0,32,0,0"/>
|
||||
<controls:SearchBar Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource SearchBarExtend}" controls:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="32,0,0,0">
|
||||
<controls:SearchBar Name="SearchBarCustomVerify" ShowClearButton="True" Style="{StaticResource SearchBarPlus}"/>
|
||||
<controls:SearchBar Margin="0,32,0,0" IsEnabled="False" Style="{StaticResource SearchBarPlus}"/>
|
||||
|
||||
<controls:SearchBar ShowClearButton="True" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" Style="{StaticResource SearchBarPlus}"/>
|
||||
<controls:SearchBar TextType="Mail" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterEmail}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" controls:InfoElement.Necessary="True" Style="{StaticResource SearchBarPlus}"/>
|
||||
<controls:SearchBar Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource SearchBarPlus}" Margin="0,32,0,0"/>
|
||||
<controls:SearchBar ShowClearButton="True" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource SearchBarPlus}" controls:InfoElement.Necessary="True" Margin="0,32,0,0"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class SearchBarDemoCtl
|
||||
{
|
||||
public SearchBarDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.ShieldDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:interactivity="clr-namespace:HandyControl.Interactivity;assembly=HandyControl"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Orientation="Horizontal" Margin="32">
|
||||
<controls:Shield Subject=".net" Status=">=4.0" Color="#1182c3"/>
|
||||
<controls:Shield Subject="c#" Status="7.0" Margin="4,0,0,0" Color="#1182c3"/>
|
||||
<controls:Shield Subject="IDE" Status="2017" Margin="4,0,0,0" Color="#1182c3"/>
|
||||
<controls:Shield Subject="chat" Status="on gitter" Margin="4,0,0,0" Color="#4eb899" Command="interactivity:ControlCommands.OpenLink" controls:LinkElement.Link="https://gitter.im/HandyControl/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"/>
|
||||
<controls:Shield Subject="qq" Status="714704041" Margin="4,0,0,0" Color="#d8624c" Command="interactivity:ControlCommands.OpenLink" controls:LinkElement.Link="http://shang.qq.com/wpa/qunwpa?idkey=a571e5553c9d41e49c4f22f3a8b2865451497a795ff281fedf3285def247efc1"/>
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class ShieldDemoCtl
|
||||
{
|
||||
public ShieldDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.StepBarDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
DataContext="{Binding StepBarDemo,Source={StaticResource Locator}}"
|
||||
FocusManager.FocusedElement="{Binding RelativeSource={x:Static RelativeSource.Self}, Mode=OneTime}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<Grid Margin="32" Name="PanelMain">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<controls:StepBar Grid.ColumnSpan="2">
|
||||
<controls:StepBarItem Content="{x:Static langs:Lang.Register}"/>
|
||||
<controls:StepBarItem Content="{x:Static langs:Lang.BasicInfo}"/>
|
||||
<controls:StepBarItem Content="{x:Static langs:Lang.UploadFile}"/>
|
||||
<controls:StepBarItem Content="{x:Static langs:Lang.Complete}"/>
|
||||
</controls:StepBar>
|
||||
<StackPanel Margin="0,32" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" HorizontalAlignment="Center">
|
||||
<Button Command="{Binding PrevCmd}" CommandParameter="{Binding ElementName=PanelMain}" Width="180" Content="{x:Static langs:Lang.Prev}" Style="{StaticResource ButtonPrimary}"/>
|
||||
<Button Command="{Binding NextCmd}" CommandParameter="{Binding ElementName=PanelMain}" Width="180" Margin="0,16,0,0" Content="{x:Static langs:Lang.Next}" Style="{StaticResource ButtonPrimary}"/>
|
||||
</StackPanel>
|
||||
<controls:StepBar Margin="0,0,0,32" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Dock="Bottom">
|
||||
<controls:StepBarItem Content="{x:Static langs:Lang.Register}"/>
|
||||
<controls:StepBarItem Content="{x:Static langs:Lang.BasicInfo}"/>
|
||||
<controls:StepBarItem Content="{x:Static langs:Lang.UploadFile}"/>
|
||||
<controls:StepBarItem Content="{x:Static langs:Lang.Complete}"/>
|
||||
</controls:StepBar>
|
||||
<controls:StepBar Grid.Column="0" Grid.Row="3" ItemsSource="{Binding DataList}" Dock="Left">
|
||||
<controls:StepBar.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Header}" FontSize="16" FontWeight="Bold" HorizontalAlignment="Left"/>
|
||||
<TextBlock Margin="0,4,0,0" Text="{Binding Content}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</controls:StepBar.ItemTemplate>
|
||||
</controls:StepBar>
|
||||
<controls:StepBar Grid.Column="1" Grid.Row="3" ItemsSource="{Binding DataList}" Dock="Right">
|
||||
<controls:StepBar.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Header}" FontSize="16" FontWeight="Bold" HorizontalAlignment="Left"/>
|
||||
<TextBlock Margin="0,4,0,0" Text="{Binding Content}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</controls:StepBar.ItemTemplate>
|
||||
</controls:StepBar>
|
||||
</Grid>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// StepBarDemoCtl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class StepBarDemoCtl
|
||||
{
|
||||
public StepBarDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.TabControlDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:ScrollViewer HorizontalScrollBarVisibility="Auto">
|
||||
<StackPanel>
|
||||
<Label Style="{StaticResource LabelPrimary}" Content="Default" Margin="32,32,0,0" HorizontalAlignment="Left"/>
|
||||
<controls:TabControl Margin="32,16,32,0" Width="800" Height="300">
|
||||
<controls:TabItem Header="TabItem1">
|
||||
<controls:SimplePanel Background="White"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem2">
|
||||
<controls:SimplePanel Background="{DynamicResource DarkDangerBrush}"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem3" IsSelected="True">
|
||||
<controls:SimplePanel Background="{DynamicResource PrimaryBrush}"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem4">
|
||||
<controls:SimplePanel Background="{DynamicResource DarkInfoBrush}"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem5">
|
||||
<controls:SimplePanel Background="{DynamicResource DarkSuccessBrush}"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem6">
|
||||
<controls:SimplePanel Background="{DynamicResource DarkWarningBrush}"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem7">
|
||||
<controls:SimplePanel Background="{DynamicResource DarkAccentBrush}"/>
|
||||
</controls:TabItem>
|
||||
</controls:TabControl>
|
||||
<StackPanel Orientation="Horizontal" Margin="32,32,32,16">
|
||||
<Label Style="{StaticResource LabelPrimary}" Margin="0" Content="IsEnableTabFill = True"/>
|
||||
<Label Style="{StaticResource LabelPrimary}" Margin="16,0,0,0" Content="ShowCloseButton = True"/>
|
||||
<Label Style="{StaticResource LabelPrimary}" Margin="16,0,0,0" Content="IsDraggable = True"/>
|
||||
<Label Style="{StaticResource LabelPrimary}" Margin="16,0,0,0" Content="IsEnableAnimation = True"/>
|
||||
</StackPanel>
|
||||
<controls:TabControl IsEnableAnimation="True" ShowCloseButton="True" IsDraggable="True" IsEnableTabFill="True" Margin="32,0,32,32" Width="800" Height="300">
|
||||
<controls:TabItem Header="TabItem1">
|
||||
<controls:SimplePanel Background="White"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem IsSelected="True" Header="TabItem2">
|
||||
<controls:SimplePanel Background="#FFE8563F"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem3">
|
||||
<controls:SimplePanel Background="#FF3F4EE8"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem4">
|
||||
<controls:SimplePanel Background="#FFE83F6D"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem5">
|
||||
<controls:SimplePanel Background="#FFB23FE8"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem6">
|
||||
<controls:SimplePanel Background="#FF3FE8E8"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem7">
|
||||
<controls:SimplePanel Background="#FFE8E03F"/>
|
||||
</controls:TabItem>
|
||||
</controls:TabControl>
|
||||
</StackPanel>
|
||||
</controls:ScrollViewer>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class TabControlDemoCtl
|
||||
{
|
||||
public TabControlDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.TagDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:TagPanel AddTagButtonClick="TagPanel_OnAddTagButtonClick" Margin="32" Orientation="Horizontal" MaxWidth="400" VerticalAlignment="Center" ShowAddButton="True">
|
||||
<controls:Tag ShowCloseButton="False" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
|
||||
<controls:Tag Selectable="True" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=3}"/>
|
||||
<controls:Tag ShowCloseButton="False" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=4}"/>
|
||||
<controls:Tag Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}"/>
|
||||
<controls:Tag IsSelected="True" Selectable="True" ShowCloseButton="False" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=4}"/>
|
||||
<controls:Tag Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=3}"/>
|
||||
<controls:Tag ShowCloseButton="False" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
|
||||
<controls:Tag IsSelected="True" Selectable="True" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=3}"/>
|
||||
<controls:Tag ShowCloseButton="False" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=4}"/>
|
||||
<controls:Tag Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}"/>
|
||||
</controls:TagPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using HandyControl.Controls;
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class TagDemoCtl
|
||||
{
|
||||
public TagDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void TagPanel_OnAddTagButtonClick(object sender, EventArgs e)
|
||||
{
|
||||
if (sender is TagPanel panel)
|
||||
{
|
||||
panel.Children.Add(new Tag
|
||||
{
|
||||
Content = Properties.Langs.Lang.SubTitle
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.TextBoxDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Margin="32">
|
||||
<controls:TextBox ShowClearButton="True" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<controls:TextBox Text="{x:Static langs:Lang.ContentDemoStr}" Margin="0,16,0,0" IsEnabled="False"/>
|
||||
|
||||
<controls:TextBox ShowClearButton="True" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<controls:TextBox TextType="Mail" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterEmail}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
<controls:TextBox Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||
<controls:TextBox ShowClearButton="True" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class TextBoxDemoCtl
|
||||
{
|
||||
public TextBoxDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.TimeBarDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:TimeBar BorderThickness="0" Margin="32" Width="600" VerticalAlignment="Center"/>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class TimeBarDemoCtl
|
||||
{
|
||||
public TimeBarDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.TimePickerDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Margin="32" Orientation="Horizontal">
|
||||
<StackPanel>
|
||||
<controls:TimePicker ShowClearButton="True"/>
|
||||
<controls:TimePicker Margin="0,16,0,0" IsEnabled="False"/>
|
||||
|
||||
<controls:TimePicker ShowClearButton="True" Style="{StaticResource TimePickerExtend}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0"/>
|
||||
<controls:TimePicker controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource TimePickerExtend}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
|
||||
<controls:TimePicker ShowClearButton="True" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" Style="{StaticResource TimePickerExtend}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0"/>
|
||||
<controls:TimePicker Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource TimePickerExtend}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="32,0,0,0">
|
||||
<controls:TimePicker ShowClearButton="True" Style="{StaticResource TimePickerPlus}"/>
|
||||
<controls:TimePicker Margin="0,16,0,0" IsEnabled="False" Style="{StaticResource TimePickerPlus}"/>
|
||||
|
||||
<controls:TimePicker ShowClearButton="True" Style="{StaticResource TimePickerPlus}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0"/>
|
||||
<controls:TimePicker controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource TimePickerPlus}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
|
||||
<controls:TimePicker ShowClearButton="True" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" Style="{StaticResource TimePickerPlus}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0"/>
|
||||
<controls:TimePicker Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource TimePickerPlus}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class TimePickerDemoCtl
|
||||
{
|
||||
public TimePickerDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.TransferDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:Transfer ItemsSource="{Binding DataList}" Margin="32" Height="300">
|
||||
<controls:Transfer.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
</DataTemplate>
|
||||
</controls:Transfer.ItemTemplate>
|
||||
</controls:Transfer>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class TransferDemoCtl
|
||||
{
|
||||
public TransferDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.WaterfallPanelDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:interactivity="clr-namespace:HandyControl.Interactivity;assembly=HandyControl"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<Grid Margin="32">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<controls:NumericUpDown x:Name="UpDownGroups" HorizontalAlignment="Center" Value="2" Minimum="1" Maximum="3" Width="200" Style="{StaticResource NumericUpDownExtend}" controls:TitleElement.Title="{x:Static langs:Lang.Groups}" controls:TitleElement.TitleWidth="50" controls:TitleElement.TitleAlignment="Left"/>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,16,0,0">
|
||||
<controls:ScrollViewer MaxHeight="300">
|
||||
<controls:WaterfallPanel VerticalAlignment="Center" Width="300" Groups="{Binding Value,ElementName=UpDownGroups}" controls:PanelElement.FluidMoveBehavior="{StaticResource BehaviorXY200}">
|
||||
<Border Height="100" Background="{DynamicResource PrimaryBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
<Border Height="140" Background="{DynamicResource DangerBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
<Border Height="100" Background="{DynamicResource SuccessBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
<Border Height="170" Background="{DynamicResource InfoBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
<Border Height="100" Background="{DynamicResource WarningBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</controls:WaterfallPanel>
|
||||
</controls:ScrollViewer>
|
||||
<controls:ScrollViewer Margin="32,0,0,0" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden" Orientation="Horizontal" MaxWidth="300">
|
||||
<controls:WaterfallPanel VerticalAlignment="Center" Height="300" Orientation="Vertical" Groups="{Binding Value,ElementName=UpDownGroups}" controls:PanelElement.FluidMoveBehavior="{StaticResource BehaviorXY200}">
|
||||
<Border Width="100" Background="{DynamicResource PrimaryBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
<Border Width="140" Background="{DynamicResource DangerBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
<Border Width="100" Background="{DynamicResource SuccessBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
<Border Width="170" Background="{DynamicResource InfoBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
<Border Width="100" Background="{DynamicResource WarningBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</controls:WaterfallPanel>
|
||||
</controls:ScrollViewer>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class WaterfallPanelDemoCtl
|
||||
{
|
||||
public WaterfallPanelDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.WindowDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:data="clr-namespace:HandyControlDemo.Data"
|
||||
DataContext="{Binding WindowDemo,Source={StaticResource Locator}}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<UniformGrid Margin="32" Columns="3" Rows="3" Height="200">
|
||||
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.CommonWindow}" Content="{x:Static langs:Lang.OpenCommonWindow}"/>
|
||||
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.BlurWindow}" Content="{x:Static langs:Lang.OpenBlurWindow}"/>
|
||||
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.CustomNonClientAreaWindow}" Content="{x:Static langs:Lang.OpenCustomNonClientAreaWindow}"/>
|
||||
<Button Click="ButtonMessage_OnClick" Content="{x:Static langs:Lang.OpenMessageWindow}"/>
|
||||
<Button Click="ButtonCustomMessage_OnClick" Content="{x:Static langs:Lang.OpenCustomMessageWindow}"/>
|
||||
<Button Click="ButtonCustomContent_OnClick" Content="{x:Static langs:Lang.OpenCustomContentWindow}"/>
|
||||
<Button Name="ButtonMouseFollow" Click="ButtonMouseFollow_OnClick" Content="{x:Static langs:Lang.OpenMouseFollowWindow}"/>
|
||||
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.NoNonClientAreaDragableWindow}" Content="{x:Static langs:Lang.OpenNoNonClientAreaDragableWindow}"/>
|
||||
</UniformGrid>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,65 @@
|
||||
using System.Windows;
|
||||
using HandyControl.Controls;
|
||||
using HandyControl.Data;
|
||||
using HandyControl.Tools;
|
||||
using MessageBox = HandyControl.Controls.MessageBox;
|
||||
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class WindowDemoCtl
|
||||
{
|
||||
public WindowDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void ButtonMessage_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MessageBox.Show(Properties.Langs.Lang.GrowlAsk, Properties.Langs.Lang.Title, MessageBoxButton.YesNo, MessageBoxImage.Question);
|
||||
}
|
||||
|
||||
private void ButtonCustomMessage_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MessageBox.Show(new MessageBoxInfo
|
||||
{
|
||||
MessageBoxText = Properties.Langs.Lang.GrowlAsk,
|
||||
Caption = Properties.Langs.Lang.Title,
|
||||
Button = MessageBoxButton.YesNo,
|
||||
IconBrushKey = ResourceToken.AccentBrush,
|
||||
IconKey = ResourceToken.AskGeometry,
|
||||
Style = ResourceHelper.GetResource<Style>("MessageBoxCustom")
|
||||
});
|
||||
}
|
||||
|
||||
private void ButtonMouseFollow_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var picker = SingleOpenHelper.CreateControl<ColorPicker>();
|
||||
var window = new PopupWindow
|
||||
{
|
||||
PopupElement = picker
|
||||
};
|
||||
picker.SelectedColorChanged += delegate { window.Close(); };
|
||||
picker.Canceled += delegate { window.Close(); };
|
||||
window.Show(ButtonMouseFollow, false);
|
||||
}
|
||||
|
||||
private void ButtonCustomContent_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var picker = SingleOpenHelper.CreateControl<ColorPicker>();
|
||||
var window = new PopupWindow
|
||||
{
|
||||
PopupElement = picker,
|
||||
WindowStartupLocation = WindowStartupLocation.CenterScreen,
|
||||
AllowsTransparency = true,
|
||||
WindowStyle = WindowStyle.None,
|
||||
MinWidth = 0,
|
||||
MinHeight = 0,
|
||||
Title = Properties.Langs.Lang.ColorPicker
|
||||
};
|
||||
picker.SelectedColorChanged += delegate { window.Close(); };
|
||||
picker.Canceled += delegate { window.Close(); };
|
||||
window.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.ContributorsView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl"
|
||||
DataContext="{Binding ContributorsView,Source={StaticResource Locator}}"
|
||||
Background="{DynamicResource SecondaryRegionBrush}">
|
||||
<ListBox Background="{DynamicResource GitHubDrawingBrush}" ItemContainerStyle="{StaticResource ListBoxItemCustom}" BorderThickness="0" ItemsSource="{Binding DataList}" ItemsPanel="{StaticResource FluidMoveBehaviorWrapPanelItemsPanelTemplate}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<userControl:Avatar UserName="{Binding UserName}" Link="{Binding Link}" Source="{Binding AvatarUri}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class ContributorsView
|
||||
{
|
||||
public ContributorsView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,410 @@
|
||||
<Border controls:ScrollViewer.IsEnableInertia="True"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:command="http://www.galasoft.ch/mvvmlight"
|
||||
x:Class="HandyControlDemo.UserControl.LeftMainContent"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:data="clr-namespace:HandyControlDemo.Data"
|
||||
Background="{Binding Background,RelativeSource={RelativeSource AncestorType=Window}}"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<TabControl SelectionChanged="TabControl_OnSelectionChanged" Style="{StaticResource TabControlInLine}" Background="Transparent" >
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<command:EventToCommand Command="{Binding SwitchDemoCmd}" PassEventArgsToCommand="True" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
<TabItem Background="Transparent" Header="{x:Static langs:Lang.Styles}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<controls:SearchBar x:Name="SearchBarStyle" SearchStarted="SearchBarStyle_OnSearchStarted" Style="{StaticResource SearchBarPlus}" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterKey}" Margin="4"/>
|
||||
<ToggleButton Name="ButtonStyleAscending" Click="ButtonStyleAscending_OnClick" Grid.Row="0" Grid.Column="1" Margin="0,0,4,0" Style="{StaticResource ToggleButtonCustom}">
|
||||
<Border CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" Height="30" Width="30" >
|
||||
<Image Stretch="None" Source="/HandyControlDemo;component/Resources/Img/LeftMainContent/SortAscending_grey_16x.png"/>
|
||||
</Border>
|
||||
<controls:StatusSwitchElement.CheckedElement>
|
||||
<Border CornerRadius="4" Height="30" Width="30" BorderThickness="1" BorderBrush="{DynamicResource PrimaryBrush}"/>
|
||||
</controls:StatusSwitchElement.CheckedElement>
|
||||
</ToggleButton>
|
||||
<ListBox Name="ListBoxStyle" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.BrushDemoCtl}" Content="{x:Static langs:Lang.Brush}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Brush_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ButtonDemoCtl}" Content="{x:Static langs:Lang.Button}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ButtonClick_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ToggleButtonDemoCtl}" Content="{x:Static langs:Lang.ToggleButton}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Toggle_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.RadioButtonDemoCtl}" Content="{x:Static langs:Lang.RadioButton}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/RadioButton_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CheckBoxDemoCtl}" Content="{x:Static langs:Lang.CheckBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/CheckBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativeScrollViewerDemoCtl}" Content="{x:Static langs:Lang.ScrollViewer}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ScrollBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.SliderDemoCtl}" Content="{x:Static langs:Lang.Slider}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Slider_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TextBlockDemoCtl}" Content="{x:Static langs:Lang.TextBlock}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TextBlock_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativeTextBoxDemoCtl}" Content="{x:Static langs:Lang.TextBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TextBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativeComboBoxDemoCtl}" Content="{x:Static langs:Lang.ComboBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ComboBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativePasswordBoxDemoCtl}" Content="{x:Static langs:Lang.PasswordBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/PasswordBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ExpanderDemoCtl}" Content="{x:Static langs:Lang.Expander}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Expander_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativeProgressBarDemoCtl}" Content="{x:Static langs:Lang.ProgressBar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ProgressBar_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CalendarDemoCtl}" Content="{x:Static langs:Lang.Calendar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Calendar_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativeDatePickerDemoCtl}" Content="{x:Static langs:Lang.DatePicker}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DatePicker_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativeTabControlDemoCtl}" Content="{x:Static langs:Lang.TabControl}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TabPage_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.DataGridDemoCtl}" Content="{x:Static langs:Lang.DataGrid}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DataGrid_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TreeViewDemoCtl}" Content="{x:Static langs:Lang.TreeView}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TreeView_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ListBoxDemoCtl}" Content="{x:Static langs:Lang.ListBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ListBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ListViewDemoCtl}" Content="{x:Static langs:Lang.ListView}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ListView_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.GroupBoxDemoCtl}" Content="{x:Static langs:Lang.GroupBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/GroupBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.MenuDemoCtl}" Content="{x:Static langs:Lang.Menu}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ContextMenu_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.RichTextBoxDemoCtl}" Content="{x:Static langs:Lang.RichTextBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/RichTextBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ToolBarDemoCtl}" Content="{x:Static langs:Lang.ToolBar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ToolBar_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.BorderDemoCtl}" Content="{x:Static langs:Lang.Border1}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/BorderElement_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.LabelDemoCtl}" Content="{x:Static langs:Lang.Label}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Label_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Background="Transparent" Header="{x:Static langs:Lang.Controls}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<controls:SearchBar SearchStarted="SearchBarControl_OnSearchStarted" Style="{StaticResource SearchBarPlus}" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterKey}" Margin="4"/>
|
||||
<ToggleButton Name="ButtonControlAscending" Click="ButtonControlAscending_OnClick" Grid.Row="0" Grid.Column="1" Margin="0,0,4,0" Style="{StaticResource ToggleButtonCustom}">
|
||||
<Border CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" Height="30" Width="30" >
|
||||
<Image Stretch="None" Source="/HandyControlDemo;component/Resources/Img/LeftMainContent/SortAscending_grey_16x.png"/>
|
||||
</Border>
|
||||
<controls:StatusSwitchElement.CheckedElement>
|
||||
<Border CornerRadius="4" Height="30" Width="30" BorderThickness="1" BorderBrush="{DynamicResource PrimaryBrush}"/>
|
||||
</controls:StatusSwitchElement.CheckedElement>
|
||||
</ToggleButton>
|
||||
<ListBox Name="ListBoxControl" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.GravatarDemoCtl}" Content="{x:Static langs:Lang.Gravatar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/User_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.BadgeDemoCtl}" Content="{x:Static langs:Lang.Badge}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DotLarge_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.GotoTopDemoCtl}" Content="{x:Static langs:Lang.GotoTop}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/GoToTop_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ProgressButtonDemoCtl}" Content="{x:Static langs:Lang.ProgressButton}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ProgressButton_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ChatBubbleDemoCtl}" Content="{x:Static langs:Lang.ChatBubble}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Bubble_16xLG.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.NotifyIconDemoCtl}" Content="{x:Static langs:Lang.NotifyIcon}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/NotificationHub_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NumericUpDownDemoCtl}" Content="{x:Static langs:Lang.NumericUpDown}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/NumericListBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TextBoxDemoCtl}" Content="{x:Static langs:Lang.TextBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TextBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ComboBoxDemoCtl}" Content="{x:Static langs:Lang.ComboBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ComboBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.PasswordBoxDemoCtl}" Content="{x:Static langs:Lang.PasswordBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/PasswordBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.DatePickerDemoCtl}" Content="{x:Static langs:Lang.DatePicker}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DatePicker_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ClockDemoCtl}" Content="{x:Static langs:Lang.Clock}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Time_color_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TimePickerDemoCtl}" Content="{x:Static langs:Lang.TimePicker}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TimePicker_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CalendarWithClockDemoCtl}" Content="{x:Static langs:Lang.CalendarWithClock}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Calendar_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.DateTimePickerDemoCtl}" Content="{x:Static langs:Lang.DateTimePicker}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DatePicker_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TransferDemoCtl}" Content="{x:Static langs:Lang.Transfer}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Transfer_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.FlipClockDemoCtl}" Content="{x:Static langs:Lang.FlipClock}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/FlipVertical_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.RateDemoCtl}" Content="{x:Static langs:Lang.Rate}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Star.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ShieldDemoCtl}" Content="{x:Static langs:Lang.Shield}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Shield_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.SearchBarDemoCtl}" Content="{x:Static langs:Lang.SearchBar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Search_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TagDemoCtl}" Content="{x:Static langs:Lang.Tag}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Tag_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.GifImageDemoCtl}" Content="{x:Static langs:Lang.GifImage}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Animation_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.OutlineTextDemoCtl}" Content="{x:Static langs:Lang.OutlineText}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TextBlock_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CirclePanelDemoCtl}" Content="{x:Static langs:Lang.CirclePanel}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ColorWheel_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.WaterfallPanelDemoCtl}" Content="{x:Static langs:Lang.WaterfallPanel}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Panel_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CoverViewDemoCtl}" Content="{x:Static langs:Lang.CoverView}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DetailDataView_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CoverFlowDemoCtl}" Content="{x:Static langs:Lang.CoverFlow}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/LinearCarousel_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.ProgressBarDemoCtl}" Content="{x:Static langs:Lang.ProgressBar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ProgressBar_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.StepBarDemoCtl}" Content="{x:Static langs:Lang.StepBar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Flow_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.GrowlDemoCtl}" Content="{x:Static langs:Lang.Growl}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Message_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.LoadingDemoCtl}" Content="{x:Static langs:Lang.Loading}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Loading_Blue_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ImageBrowserDemoCtl}" Content="{x:Static langs:Lang.ImageBrowser}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ImageBrowser_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ColorPickerDemoCtl}" Content="{x:Static langs:Lang.ColorPicker}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ColorPalette_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CarouselDemoCtl}" Content="{x:Static langs:Lang.Carousel}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Carousel_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CompareSliderDemoCtl}" Content="{x:Static langs:Lang.CompareSlider}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/SplitterControl_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.PreviewSliderDemoCtl}" Content="{x:Static langs:Lang.PreviewSlider}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/HoverMenu_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TimeBarDemoCtl}" Content="{x:Static langs:Lang.TimeBar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Timeline_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.PaginationDemoCtl}" Content="{x:Static langs:Lang.Pagination}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Paginator_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.AnimationPathDemoCtl}" Content="{x:Static langs:Lang.AnimationPath}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Path_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TabControlDemoCtl}" Content="{x:Static langs:Lang.TabControl}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TabPage_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ScrollViewerDemoCtl}" Content="{x:Static langs:Lang.ScrollViewer}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ScrollBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.DialogDemoCtl}" Content="{x:Static langs:Lang.Dialog}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Dialog_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.WindowDemoCtl}" Content="{x:Static langs:Lang.Window}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/WindowsForm_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Border>
|
||||
@@ -0,0 +1,79 @@
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using HandyControl.Data;
|
||||
using HandyControl.Tools.Extension;
|
||||
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 左侧主内容
|
||||
/// </summary>
|
||||
public partial class LeftMainContent
|
||||
{
|
||||
public LeftMainContent()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void TabControl_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (e.AddedItems.Count == 0) return;
|
||||
if (e.AddedItems[0] is TabItem tabItem && tabItem.Content is ListBox listBox)
|
||||
{
|
||||
if (listBox.SelectedItem != null)
|
||||
{
|
||||
var item = listBox.SelectedItem;
|
||||
listBox.SelectedIndex = -1;
|
||||
listBox.SelectedItem = item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ButtonStyleAscending_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (ButtonStyleAscending.IsChecked == true)
|
||||
{
|
||||
ListBoxStyle.Items.SortDescriptions.Add(new SortDescription("Content", ListSortDirection.Ascending));
|
||||
}
|
||||
else
|
||||
{
|
||||
ListBoxStyle.Items.SortDescriptions.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
private void ButtonControlAscending_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (ButtonControlAscending.IsChecked == true)
|
||||
{
|
||||
ListBoxControl.Items.SortDescriptions.Add(new SortDescription("Content", ListSortDirection.Ascending));
|
||||
}
|
||||
else
|
||||
{
|
||||
ListBoxControl.Items.SortDescriptions.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
private void SearchBarStyle_OnSearchStarted(object sender, FunctionEventArgs<string> e)
|
||||
{
|
||||
if (e.Info == null) return;
|
||||
|
||||
foreach (var listBoxItem in ListBoxStyle.Items.OfType<ListBoxItem>())
|
||||
{
|
||||
listBoxItem.Show(listBoxItem.Content.ToString().ToLower().Contains(e.Info.ToLower()));
|
||||
}
|
||||
}
|
||||
|
||||
private void SearchBarControl_OnSearchStarted(object sender, FunctionEventArgs<string> e)
|
||||
{
|
||||
if (e.Info == null) return;
|
||||
|
||||
foreach (var listBoxItem in ListBoxControl.Items.OfType<ListBoxItem>())
|
||||
{
|
||||
listBoxItem.Show(listBoxItem.Content.ToString().ToLower().Contains(e.Info.ToLower()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<Border xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:Class="HandyControlDemo.UserControl.MainContent"
|
||||
Background="{DynamicResource MainContentBackgroundBrush}">
|
||||
<Border Background="{DynamicResource MainContentForegroundDrawingBrush}">
|
||||
<Grid Name="GridMain" MinHeight="300" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="16">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Name="BorderEffect" Grid.RowSpan="2" Background="{DynamicResource RegionBrush}" CornerRadius="10" Effect="{StaticResource EffectShadow4}"/>
|
||||
<Border Height="32" Name="BorderTitle" Grid.Row="0" CornerRadius="10,10,0,0" Background="{DynamicResource TitleBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockDefault}" Foreground="White" Text="{Binding ContentTitle}"/>
|
||||
</Border>
|
||||
<Border Grid.Row="1" ClipToBounds="True">
|
||||
<ContentPresenter Name="PresenterMain" Margin="0,0,0,10" Content="{Binding SubContent}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Border>
|
||||
@@ -0,0 +1,47 @@
|
||||
using System.Windows;
|
||||
using GalaSoft.MvvmLight.Messaging;
|
||||
using HandyControl.Tools.Extension;
|
||||
using HandyControlDemo.Data;
|
||||
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 主内容
|
||||
/// </summary>
|
||||
public partial class MainContent
|
||||
{
|
||||
private bool _isFull;
|
||||
|
||||
public MainContent()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Messenger.Default.Register<bool>(this, MessageToken.FullSwitch, FullSwitch);
|
||||
}
|
||||
|
||||
private void FullSwitch(bool isFull)
|
||||
{
|
||||
if (_isFull == isFull) return;
|
||||
_isFull = isFull;
|
||||
if (_isFull)
|
||||
{
|
||||
BorderEffect.Collapse();
|
||||
BorderTitle.Collapse();
|
||||
GridMain.HorizontalAlignment = HorizontalAlignment.Stretch;
|
||||
GridMain.VerticalAlignment = VerticalAlignment.Stretch;
|
||||
GridMain.Margin = new Thickness();
|
||||
PresenterMain.Margin = new Thickness();
|
||||
}
|
||||
else
|
||||
{
|
||||
BorderEffect.Show();
|
||||
BorderTitle.Show();
|
||||
GridMain.HorizontalAlignment = HorizontalAlignment.Center;
|
||||
GridMain.VerticalAlignment = VerticalAlignment.Center;
|
||||
GridMain.Margin = new Thickness(16);
|
||||
PresenterMain.Margin = new Thickness(0, 0, 0, 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loaded 100 of 1920 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user