feat: fix separator visibility. add dropdown button.

This commit is contained in:
rabbitism
2024-04-27 00:39:50 +08:00
parent 63b9ccfe5e
commit 9cce1cc180
4 changed files with 159 additions and 45 deletions

View File

@@ -1,13 +1,28 @@
<UserControl 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"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Ursa.Demo.Pages.TimePickerDemo">
<UserControl
x:Class="Ursa.Demo.Pages.TimePickerDemo"
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">
<StackPanel HorizontalAlignment="Left">
<ToggleSwitch Content="Need Confirm" Name="needConfirm"></ToggleSwitch>
<TextBlock Text="{Binding #picker.SelectedTime}" ></TextBlock>
<u:TimePicker Name="picker" Width="200" NeedConfirmation="{Binding #needConfirm.IsChecked}" PanelFormat="hh mm tt"></u:TimePicker>
<ToggleSwitch Name="needConfirm" Content="Need Confirm" />
<TextBlock Text="{Binding #picker.SelectedTime}" />
<u:TimePicker
Name="picker"
Width="200"
HorizontalAlignment="Left"
NeedConfirmation="{Binding #needConfirm.IsChecked}"
PanelFormat="hh mm tt" />
<u:TimePicker
Width="300"
DisplayFormat="HH 时 mm 分 ss 秒"
PanelFormat="HH mm ss tt"
HorizontalAlignment="Left"
InnerLeftContent="时刻"
InnerRightContent="截止" />
</StackPanel>
</UserControl>