Skip to content

Commit

Permalink
Update Clock Sample
Browse files Browse the repository at this point in the history
  • Loading branch information
ghost1372 committed Dec 21, 2024
1 parent b33c22f commit 4cc1cac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dev/DevWinUI.Gallery/Views/Pages/Features/ClockPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
<local:ControlExample.Xaml>
<x:String>&lt;dev:Clock /&gt;</x:String>
</local:ControlExample.Xaml>
<dev:Clock />
<local:ControlExample.Pane>
<TextBlock x:Name="Txt" />
</local:ControlExample.Pane>
<dev:Clock HorizontalAlignment="Left"
SelectedTimeChanged="Clock_SelectedTimeChanged" />
</local:ControlExample>
</StackPanel>
</ScrollViewer>
Expand Down
5 changes: 5 additions & 0 deletions dev/DevWinUI.Gallery/Views/Pages/Features/ClockPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ public ClockPage()
{
this.InitializeComponent();
}

private void Clock_SelectedTimeChanged(object sender, DateTime e)
{
Txt.Text = e.ToLongTimeString();
}
}

0 comments on commit 4cc1cac

Please sign in to comment.