Skip to content

Commit b33c22f

Browse files
committed
Add Clock Sample
1 parent d340390 commit b33c22f

7 files changed

Lines changed: 48 additions & 0 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ Install-Package DevWinUI
152152

153153
- ✨ DateTimePicker
154154
- ✨ CalendarWithClock
155+
- ✨ Clock
156+
- ✨ CirclePanel
155157
- ✨ CalendarView Style
156158
- ✨ ProgressButton
157159
- ✨ TextBox
@@ -258,6 +260,9 @@ Install-Package DevWinUI.ContextMenu
258260
### CalendarWithClock
259261
![DevWinUI](https://raw.githubusercontent.com/ghost1372/DevWinUI-Resources/refs/heads/main/DevWinUI-Docs/CalendarWithClock.gif)
260262

263+
### Clock
264+
![DevWinUI](https://raw.githubusercontent.com/ghost1372/DevWinUI-Resources/refs/heads/main/DevWinUI-Docs/Clock.gif)
265+
261266
### ProgressButton
262267
![DevWinUI](https://raw.githubusercontent.com/ghost1372/DevWinUI-Resources/refs/heads/main/DevWinUI-Docs/ProgressButton.gif)
263268

7.27 KB
Loading

dev/DevWinUI.Gallery/Assets/NavViewMenu/AppData.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@
9494
"ImagePath": "ms-appx:///Assets/Fluent/RatingControl.png",
9595
"IsSpecialSection": false,
9696
"Items": [
97+
{
98+
"UniqueId": "DevWinUIGallery.Views.ClockPage",
99+
"Title": "Clock",
100+
"Subtitle": "Analog Clock",
101+
"IsNew": true,
102+
"ImagePath": "ms-appx:///Assets/Fluent/Clock.png"
103+
},
97104
{
98105
"UniqueId": "DevWinUIGallery.Views.DateTimePickerPage",
99106
"Title": "DateTimePicker",

dev/DevWinUI.Gallery/T4Templates/NavigationPageMappings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public partial class NavigationPageMappings
2525
{"DevWinUIGallery.Views.WaveCirclePage", typeof(DevWinUIGallery.Views.WaveCirclePage)},
2626
{"DevWinUIGallery.Views.BubblePage", typeof(DevWinUIGallery.Views.BubblePage)},
2727
{"DevWinUIGallery.Views.GooeyPage", typeof(DevWinUIGallery.Views.GooeyPage)},
28+
{"DevWinUIGallery.Views.ClockPage", typeof(DevWinUIGallery.Views.ClockPage)},
2829
{"DevWinUIGallery.Views.DateTimePickerPage", typeof(DevWinUIGallery.Views.DateTimePickerPage)},
2930
{"DevWinUIGallery.Views.CalendarWithClockPage", typeof(DevWinUIGallery.Views.CalendarWithClockPage)},
3031
{"DevWinUIGallery.Views.RichTextFormatterPage", typeof(DevWinUIGallery.Views.RichTextFormatterPage)},
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<Page x:Class="DevWinUIGallery.Views.ClockPage"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6+
xmlns:dev="using:DevWinUI"
7+
xmlns:local="using:DevWinUIGallery"
8+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
9+
mc:Ignorable="d">
10+
11+
<ScrollViewer>
12+
<StackPanel Margin="10"
13+
dev:PanelAttach.ChildrenTransitions="Default"
14+
Spacing="10">
15+
<local:ControlExample DocPage="controls/clock"
16+
HeaderText="Analog Clock">
17+
<local:ControlExample.Xaml>
18+
<x:String>&lt;dev:Clock /&gt;</x:String>
19+
</local:ControlExample.Xaml>
20+
<dev:Clock />
21+
</local:ControlExample>
22+
</StackPanel>
23+
</ScrollViewer>
24+
</Page>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace DevWinUIGallery.Views;
2+
3+
public sealed partial class ClockPage : Page
4+
{
5+
public ClockPage()
6+
{
7+
this.InitializeComponent();
8+
}
9+
}

dev/DevWinUI.Gallery/Views/Pages/Features/DateTimePickerPage.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
</StackPanel>
3333
</local:ControlExample.Pane>
3434
<dev:DateTimePicker x:Name="DateTimePickerSample"
35+
HorizontalAlignment="Center"
3536
VerticalAlignment="Top"
3637
ConfirmButtonContent="{x:Bind TxtConfirm.Text, Mode=OneWay}"
3738
Description="Choose your Date and Time from CalendarView and Clock"
@@ -76,6 +77,7 @@
7677
</StackPanel>
7778
</local:ControlExample.Pane>
7879
<dev:DateTimePicker x:Name="DateTimePickerSample2"
80+
HorizontalAlignment="Center"
7981
VerticalAlignment="Top"
8082
ClockMode="TimePicker"
8183
ConfirmButtonContent="{x:Bind TxtConfirm2.Text, Mode=OneWay}"

0 commit comments

Comments
 (0)