add datetimepicker

This commit is contained in:
NaBian committed 2018-11-20 15:31:10 +08:00
1 parent 4d56cc121e
commit ed8ef8c7a9
32 files changed
+1611 -106

No files matched your search

@@ -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>
@@ -0,0 +1,10 @@
namespace HandyControlDemo.UserControl
{
public partial class CalendarWithClockDemoCtl
{
public CalendarWithClockDemoCtl()
{
InitializeComponent();
}
}
}
@@ -4,7 +4,7 @@
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
Background="White">
Background="{DynamicResource RegionBrush}">
<controls:TransitioningContentControl>
<StackPanel Margin="32">
<controls:DatePicker ShowClearButton="True" SelectedDate="{x:Static system:DateTime.Now}"/>
@@ -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();
}
}
}
@@ -1,9 +1,5 @@
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl
{
/// <summary>
/// TimePickerDemoCtl.xaml 的交互逻辑
/// </summary>
public partial class TimePickerDemoCtl
{
public TimePickerDemoCtl()
@@ -144,16 +144,31 @@
<Image Source="../../Resources/Img/LeftMainContent/PasswordBox_16x.png"/>
</controls:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.DatePickerDemoCtl}" Content="{x:Static langs:Lang.DatePicker}">
<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 Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.TimePickerDemoCtl}" Content="{x:Static langs:Lang.TimePicker}">
<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 Style="{StaticResource ListBoxItemNew}" 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 Style="{StaticResource ListBoxItemNew}" 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.CirclePanelDemoCtl}" Content="{x:Static langs:Lang.CirclePanel}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ColorWheel_16x.png"/>
@@ -164,11 +179,6 @@
<Image Source="../../Resources/Img/LeftMainContent/ShapeArcRing_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.StepBarDemoCtl}" Content="{x:Static langs:Lang.StepBar}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Flow_16x.png"/>