enhance the function of datepicker

This commit is contained in:
NaBian committed 2018-11-18 16:22:41 +08:00
1 parent 368fb52ed4
commit 9b8b072e83
19 files changed
+739 -381

No files matched your search

@@ -2,8 +2,20 @@
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="White">
<controls:TransitioningContentControl>
<DatePicker Margin="32" SelectedDate="2018-10-01"/>
<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>
@@ -1,9 +1,5 @@
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
namespace HandyControlDemo.UserControl
{
/// <summary>
/// DatePickerDemoCtl.xaml 的交互逻辑
/// </summary>
public partial class DatePickerDemoCtl
{
public DatePickerDemoCtl()
@@ -85,7 +85,7 @@
<Image Source="../../Resources/Img/LeftMainContent/Calendar_16x.png"/>
</controls:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.DatePickerDemoCtl}" Content="{x:Static langs:Lang.DatePicker}">
<ListBoxItem Tag="{x:Static data:MessageToken.NaiveDatePickerDemoCtl}" Content="{x:Static langs:Lang.DatePicker}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/DatePicker_16x.png"/>
</controls:EdgeElement.LeftContent>
@@ -134,16 +134,21 @@
<Image Source="../../Resources/Img/LeftMainContent/TextBox_16x.png"/>
</controls:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.ComboBoxDemoCtl}" Content="{x:Static langs:Lang.ComboBox}">
<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 Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.PasswordBoxDemoCtl}" Content="{x:Static langs:Lang.PasswordBox}">
<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 Style="{StaticResource ListBoxItemNew}" 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.CirclePanelDemoCtl}" Content="{x:Static langs:Lang.CirclePanel}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ColorWheel_16x.png"/>
@@ -179,7 +184,7 @@
<Image Source="../../Resources/Img/LeftMainContent/Loading_Blue_16x.png"/>
</controls:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.ImageBrowserDemoCtl}" Content="{x:Static langs:Lang.ImageBrowser}">
<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>
@@ -1,14 +0,0 @@
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
{
/// <summary>
/// DatePickerDemoCtl.xaml 的交互逻辑
/// </summary>
public partial class DatePickerDemoCtl
{
public DatePickerDemoCtl()
{
InitializeComponent();
}
}
}
@@ -1,4 +1,4 @@
<UserControl x:Class="HandyControlDemo.UserControl.DatePickerDemoCtl"
<UserControl x:Class="HandyControlDemo.UserControl.NaiveDatePickerDemoCtl"
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"
@@ -0,0 +1,10 @@
namespace HandyControlDemo.UserControl
{
public partial class NaiveDatePickerDemoCtl
{
public NaiveDatePickerDemoCtl()
{
InitializeComponent();
}
}
}