File tree Expand file tree Collapse file tree 6 files changed +63
-0
lines changed
WPFDevelopers.Samples.Shared
WPFDevelopers.SamplesCode Expand file tree Collapse file tree 6 files changed +63
-0
lines changed Original file line number Diff line number Diff line change
1
+ <UserControl
2
+ x : Class =" WPFDevelopers.Samples.ExampleViews.TimePickerExample"
3
+ xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4
+ xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
5
+ xmlns : controls =" clr-namespace:WPFDevelopers.Samples.Controls"
6
+ xmlns : d =" http://schemas.microsoft.com/expression/blend/2008"
7
+ xmlns : local =" clr-namespace:WPFDevelopers.Samples.ExampleViews"
8
+ xmlns : mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
9
+ xmlns : wd =" https://github.com/WPFDevelopersOrg/WPFDevelopers"
10
+ d : DesignHeight =" 450"
11
+ d : DesignWidth =" 800"
12
+ mc : Ignorable =" d" >
13
+ <controls : CodeViewer >
14
+ <UniformGrid >
15
+ <wd : TimePicker
16
+ Width =" 200"
17
+ VerticalAlignment =" Center"
18
+ wd:ElementHelper.Watermark=" 请选择任意时间" />
19
+ <wd : TimePicker
20
+ Width =" 200"
21
+ VerticalAlignment =" Center"
22
+ IsCurrentTime =" True" />
23
+ <wd : TimePicker
24
+ Width =" 200"
25
+ VerticalAlignment =" Center"
26
+ SelectedTime =" 2023-05-06 23:59:59" />
27
+ </UniformGrid >
28
+ <controls : CodeViewer .SourceCodes>
29
+ <controls : SourceCodeModel CodeSource =" /WPFDevelopers.SamplesCode;component/ExampleViews/TimePickerExample.xaml" CodeType =" Xaml" />
30
+ <controls : SourceCodeModel CodeSource =" /WPFDevelopers.SamplesCode;component/ExampleViews/TimePickerExample.xaml.cs" CodeType =" CSharp" />
31
+ </controls : CodeViewer .SourceCodes>
32
+ </controls : CodeViewer >
33
+ </UserControl >
Original file line number Diff line number Diff line change
1
+ using System . Windows . Controls ;
2
+
3
+ namespace WPFDevelopers . Samples . ExampleViews
4
+ {
5
+ /// <summary>
6
+ /// TimePickerExample.xaml 的交互逻辑
7
+ /// </summary>
8
+ public partial class TimePickerExample : UserControl
9
+ {
10
+ public TimePickerExample ( )
11
+ {
12
+ InitializeComponent ( ) ;
13
+ }
14
+ }
15
+ }
Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ public enum MenuEnum
78
78
NumericBox ,
79
79
ColorPicker ,
80
80
IPEditBox ,
81
+ TimePicker ,
81
82
VirtualizingWrapPanel ,
82
83
AcrylicBlur ,
83
84
TaskbarInfo
Original file line number Diff line number Diff line change @@ -312,6 +312,9 @@ void MenuItemSelection(string _menuName)
312
312
case MenuEnum . IPEditBox :
313
313
ControlPanel = new IPEditBoxExample ( ) ;
314
314
break ;
315
+ case MenuEnum . TimePicker :
316
+ ControlPanel = new TimePickerExample ( ) ;
317
+ break ;
315
318
case MenuEnum . VirtualizingWrapPanel :
316
319
ControlPanel = new VirtualizingWrapPanel ( ) ;
317
320
new VirtualizingWrapPanelExample ( ) . MaskShowDialog ( ) ;
Original file line number Diff line number Diff line change 394
394
<SubType >Code</SubType >
395
395
<DependentUpon >ThermometerExample.xaml</DependentUpon >
396
396
</Compile >
397
+ <Compile Include =" $(MSBuildThisFileDirectory)ExampleViews\TimePickerExample.xaml.cs" >
398
+ <DependentUpon >TimePickerExample.xaml</DependentUpon >
399
+ </Compile >
397
400
<Compile Include =" $(MSBuildThisFileDirectory)ExampleViews\TransformThumbExample.xaml.cs" >
398
401
<SubType >Code</SubType >
399
402
<DependentUpon >TransformThumbExample.xaml</DependentUpon >
868
871
<Generator >MSBuild:Compile</Generator >
869
872
<SubType >Designer</SubType >
870
873
</Page >
874
+ <Page Include =" $(MSBuildThisFileDirectory)ExampleViews\TimePickerExample.xaml" >
875
+ <Generator >MSBuild:Compile</Generator >
876
+ <SubType >Designer</SubType >
877
+ </Page >
871
878
<Page Include =" $(MSBuildThisFileDirectory)ExampleViews\TransformThumbExample.xaml" >
872
879
<Generator >MSBuild:Compile</Generator >
873
880
<SubType >Designer</SubType >
Original file line number Diff line number Diff line change 141
141
<Resource Include =" ..\WPFDevelopers.Samples.Shared\ExampleViews\ColorPickerExample.xaml.cs" Link =" ExampleViews\ColorPickerExample.xaml.cs" DependentUpon =" ColorPickerExample.xaml" />
142
142
<Resource Include =" ..\WPFDevelopers.Samples.Shared\ExampleViews\IPEditBoxExample.xaml.cs" Link =" ExampleViews\IPEditBoxExample.xaml.cs" DependentUpon =" IPEditBoxExample.xaml" />
143
143
<Resource Include =" ..\WPFDevelopers.Samples.Shared\ExampleViews\IPEditBoxExample.xaml.cs" Link =" ExampleViews\TransformThumbExample.xaml.cs" DependentUpon =" TransformThumbExample.xaml" />
144
+ <Resource Include =" ..\WPFDevelopers.Samples.Shared\ExampleViews\TimePickerExample.xaml.cs" Link =" ExampleViews\TimePickerExample.xaml.cs" DependentUpon =" TimePickerExample.xaml" />
144
145
</ItemGroup >
145
146
<ItemGroup >
146
147
<Resource Include =" ..\WPFDevelopers.Samples.Shared\ExampleViews\AboutWindow.xaml" >
476
477
<Resource Include =" ..\WPFDevelopers.Samples.Shared\ExampleViews\IPEditBoxExample.xaml" >
477
478
<Link >ExampleViews\IPEditBoxExample.xaml</Link >
478
479
</Resource >
480
+ <Resource Include =" ..\WPFDevelopers.Samples.Shared\ExampleViews\TimePickerExample.xaml" >
481
+ <Link >ExampleViews\TimePickerExample.xaml</Link >
482
+ </Resource >
479
483
</ItemGroup >
480
484
</Project >
You can’t perform that action at this time.
0 commit comments