Skip to content

Commit

Permalink
Add Clock Sample
Browse files Browse the repository at this point in the history
  • Loading branch information
ghost1372 committed Dec 21, 2024
1 parent d340390 commit b33c22f
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ Install-Package DevWinUI

- ✨ DateTimePicker
- ✨ CalendarWithClock
- ✨ Clock
- ✨ CirclePanel
- ✨ CalendarView Style
- ✨ ProgressButton
- ✨ TextBox
Expand Down Expand Up @@ -258,6 +260,9 @@ Install-Package DevWinUI.ContextMenu
### CalendarWithClock
![DevWinUI](https://raw.githubusercontent.com/ghost1372/DevWinUI-Resources/refs/heads/main/DevWinUI-Docs/CalendarWithClock.gif)

### Clock
![DevWinUI](https://raw.githubusercontent.com/ghost1372/DevWinUI-Resources/refs/heads/main/DevWinUI-Docs/Clock.gif)

### ProgressButton
![DevWinUI](https://raw.githubusercontent.com/ghost1372/DevWinUI-Resources/refs/heads/main/DevWinUI-Docs/ProgressButton.gif)

Expand Down
Binary file added dev/DevWinUI.Gallery/Assets/Fluent/Clock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions dev/DevWinUI.Gallery/Assets/NavViewMenu/AppData.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@
"ImagePath": "ms-appx:///Assets/Fluent/RatingControl.png",
"IsSpecialSection": false,
"Items": [
{
"UniqueId": "DevWinUIGallery.Views.ClockPage",
"Title": "Clock",
"Subtitle": "Analog Clock",
"IsNew": true,
"ImagePath": "ms-appx:///Assets/Fluent/Clock.png"
},
{
"UniqueId": "DevWinUIGallery.Views.DateTimePickerPage",
"Title": "DateTimePicker",
Expand Down
1 change: 1 addition & 0 deletions dev/DevWinUI.Gallery/T4Templates/NavigationPageMappings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public partial class NavigationPageMappings
{"DevWinUIGallery.Views.WaveCirclePage", typeof(DevWinUIGallery.Views.WaveCirclePage)},
{"DevWinUIGallery.Views.BubblePage", typeof(DevWinUIGallery.Views.BubblePage)},
{"DevWinUIGallery.Views.GooeyPage", typeof(DevWinUIGallery.Views.GooeyPage)},
{"DevWinUIGallery.Views.ClockPage", typeof(DevWinUIGallery.Views.ClockPage)},
{"DevWinUIGallery.Views.DateTimePickerPage", typeof(DevWinUIGallery.Views.DateTimePickerPage)},
{"DevWinUIGallery.Views.CalendarWithClockPage", typeof(DevWinUIGallery.Views.CalendarWithClockPage)},
{"DevWinUIGallery.Views.RichTextFormatterPage", typeof(DevWinUIGallery.Views.RichTextFormatterPage)},
Expand Down
24 changes: 24 additions & 0 deletions dev/DevWinUI.Gallery/Views/Pages/Features/ClockPage.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>
<Page x:Class="DevWinUIGallery.Views.ClockPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dev="using:DevWinUI"
xmlns:local="using:DevWinUIGallery"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

<ScrollViewer>
<StackPanel Margin="10"
dev:PanelAttach.ChildrenTransitions="Default"
Spacing="10">
<local:ControlExample DocPage="controls/clock"
HeaderText="Analog Clock">
<local:ControlExample.Xaml>
<x:String>&lt;dev:Clock /&gt;</x:String>
</local:ControlExample.Xaml>
<dev:Clock />
</local:ControlExample>
</StackPanel>
</ScrollViewer>
</Page>
9 changes: 9 additions & 0 deletions dev/DevWinUI.Gallery/Views/Pages/Features/ClockPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace DevWinUIGallery.Views;

public sealed partial class ClockPage : Page
{
public ClockPage()
{
this.InitializeComponent();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
</StackPanel>
</local:ControlExample.Pane>
<dev:DateTimePicker x:Name="DateTimePickerSample"
HorizontalAlignment="Center"
VerticalAlignment="Top"
ConfirmButtonContent="{x:Bind TxtConfirm.Text, Mode=OneWay}"
Description="Choose your Date and Time from CalendarView and Clock"
Expand Down Expand Up @@ -76,6 +77,7 @@
</StackPanel>
</local:ControlExample.Pane>
<dev:DateTimePicker x:Name="DateTimePickerSample2"
HorizontalAlignment="Center"
VerticalAlignment="Top"
ClockMode="TimePicker"
ConfirmButtonContent="{x:Bind TxtConfirm2.Text, Mode=OneWay}"
Expand Down

0 comments on commit b33c22f

Please sign in to comment.