feat: add clock tick.

This commit is contained in:
rabbitism
2024-04-21 22:14:41 +08:00
parent f4ca383f6c
commit 14d3958873
7 changed files with 208 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
<UserControl
x:Class="Ursa.Demo.Pages.ClockDemo"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:u="https://irihi.tech/ursa"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<Grid>
<u:ClockTicks
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
HourTickWidth="4"
MinuteTickWidth="1"
HourTickForeground="Black"
MinuteTickForeground="Red" />
</Grid>
</UserControl>

View File

@@ -0,0 +1,13 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Ursa.Demo.Pages;
public partial class ClockDemo : UserControl
{
public ClockDemo()
{
InitializeComponent();
}
}