csharpc-sharpdotnetxamlavaloniauicross-platformcross-platform-xamlavaloniaguimulti-platformuser-interfacedotnetcore
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
210 lines
8.0 KiB
210 lines
8.0 KiB
<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:sys="using:System"
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
x:Class="ControlCatalog.Pages.DateTimePickerPage">
|
|
<StackPanel Orientation="Vertical" Spacing="4" HorizontalAlignment="Stretch">
|
|
<TextBlock Name="DatePickerDesc" Classes="h2" TextWrapping="Wrap"/>
|
|
<TextBlock Name="TimePickerDesc" Classes="h2" TextWrapping="Wrap"/>
|
|
|
|
<StackPanel Orientation="Vertical"
|
|
Margin="16"
|
|
HorizontalAlignment="Stretch"
|
|
Spacing="16">
|
|
<TextBlock FontSize="18">A simple DatePicker</TextBlock>
|
|
<StackPanel Orientation="Vertical">
|
|
<Border BorderBrush="{DynamicResource CatalogBaseLowColor}"
|
|
BorderThickness="1" Padding="15">
|
|
<DatePicker />
|
|
</Border>
|
|
<Panel Background="{DynamicResource CatalogBaseLowColor}">
|
|
<TextBlock Padding="15">
|
|
<TextBlock.Text>
|
|
<x:String>
|
|
<DatePicker/>
|
|
</x:String>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
</Panel>
|
|
</StackPanel>
|
|
|
|
|
|
<Border BorderBrush="{DynamicResource CatalogBaseLowColor}"
|
|
BorderThickness="1" Padding="15">
|
|
<DatePicker >
|
|
<DataValidationErrors.Error>
|
|
<sys:Exception />
|
|
</DataValidationErrors.Error>
|
|
</DatePicker>
|
|
</Border>
|
|
|
|
<TextBlock FontSize="18">A DatePicker with day formatted and year hidden.</TextBlock>
|
|
<StackPanel Orientation="Vertical">
|
|
<Border BorderBrush="{DynamicResource CatalogBaseLowColor}"
|
|
BorderThickness="1" Padding="15">
|
|
<DatePicker x:Name="Control2" DayFormat="d (ddd)"
|
|
YearVisible="False" />
|
|
</Border>
|
|
<Panel Background="{DynamicResource CatalogBaseLowColor}">
|
|
<TextBlock Padding="15">
|
|
<TextBlock.Text>
|
|
<x:String>
|
|
<DatePicker DayFormat="d (ddd)" YearVisible="False" />
|
|
</x:String>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
</Panel>
|
|
</StackPanel>
|
|
|
|
<Border Background="{DynamicResource CatalogBaseLowColor}" BorderThickness="1" Margin="15" />
|
|
|
|
<TextBlock FontSize="18">A simple TimePicker.</TextBlock>
|
|
<StackPanel Orientation="Vertical">
|
|
<Border BorderBrush="{DynamicResource CatalogBaseLowColor}"
|
|
BorderThickness="1" Padding="15">
|
|
<TimePicker />
|
|
</Border>
|
|
<Panel Background="{DynamicResource CatalogBaseLowColor}">
|
|
<TextBlock Padding="15">
|
|
<TextBlock.Text>
|
|
<x:String>
|
|
<TimePicker />
|
|
</x:String>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
</Panel>
|
|
</StackPanel>
|
|
|
|
<TextBlock FontSize="18">A TimePicker with seconds enabled.</TextBlock>
|
|
<StackPanel Orientation="Vertical">
|
|
<Border BorderBrush="{DynamicResource CatalogBaseLowColor}"
|
|
BorderThickness="1" Padding="15">
|
|
<TimePicker UseSeconds="True" />
|
|
</Border>
|
|
<Panel Background="{DynamicResource CatalogBaseLowColor}">
|
|
<TextBlock Padding="15">
|
|
<TextBlock.Text>
|
|
<x:String>
|
|
<TimePicker UseSeconds="True" />
|
|
</x:String>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
</Panel>
|
|
</StackPanel>
|
|
|
|
<Border BorderBrush="{DynamicResource CatalogBaseLowColor}"
|
|
BorderThickness="1" Padding="15">
|
|
<TimePicker>
|
|
<DataValidationErrors.Error>
|
|
<sys:Exception />
|
|
</DataValidationErrors.Error>
|
|
</TimePicker>
|
|
</Border>
|
|
|
|
<TextBlock FontSize="18">A TimePicker with minute increment specified.</TextBlock>
|
|
<StackPanel Orientation="Vertical">
|
|
<Border BorderBrush="{DynamicResource CatalogBaseLowColor}"
|
|
BorderThickness="1" Padding="15">
|
|
<TimePicker MinuteIncrement="15" />
|
|
</Border>
|
|
<Panel Background="{DynamicResource CatalogBaseLowColor}">
|
|
<TextBlock Padding="15">
|
|
<TextBlock.Text>
|
|
<x:String>
|
|
<TimePicker MinuteIncrement="15" SecondIncrement="30" />
|
|
</x:String>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
</Panel>
|
|
</StackPanel>
|
|
|
|
<TextBlock FontSize="18">A TimePicker with seconds enabled and minute & second increments specified.</TextBlock>
|
|
<StackPanel Orientation="Vertical">
|
|
<Border BorderBrush="{DynamicResource CatalogBaseLowColor}"
|
|
BorderThickness="1" Padding="15">
|
|
<TimePicker UseSeconds="True" MinuteIncrement="15" SecondIncrement="30" />
|
|
</Border>
|
|
<Panel Background="{DynamicResource CatalogBaseLowColor}">
|
|
<TextBlock Padding="15">
|
|
<TextBlock.Text>
|
|
<x:String>
|
|
<TimePicker UseSeconds="True" MinuteIncrement="15" SecondIncrement="30" />
|
|
</x:String>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
</Panel>
|
|
</StackPanel>
|
|
|
|
<TextBlock FontSize="18">A TimePicker using a 12-hour clock.</TextBlock>
|
|
<StackPanel Orientation="Vertical">
|
|
<Border BorderBrush="{DynamicResource CatalogBaseLowColor}"
|
|
BorderThickness="1" Padding="15">
|
|
<TimePicker ClockIdentifier="12HourClock"/>
|
|
</Border>
|
|
<Panel Background="{DynamicResource CatalogBaseLowColor}">
|
|
<TextBlock Padding="15">
|
|
<TextBlock.Text>
|
|
<x:String>
|
|
<TimePicker ClockIdentifier="12HourClock" />
|
|
</x:String>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
</Panel>
|
|
</StackPanel>
|
|
|
|
<TextBlock FontSize="18">A TimePicker using a 24-hour clock.</TextBlock>
|
|
<StackPanel Orientation="Vertical">
|
|
<Border BorderBrush="{DynamicResource CatalogBaseLowColor}"
|
|
BorderThickness="1" Padding="15">
|
|
<TimePicker ClockIdentifier="24HourClock" />
|
|
</Border>
|
|
<Panel Background="{DynamicResource CatalogBaseLowColor}">
|
|
<TextBlock Padding="15">
|
|
<TextBlock.Text>
|
|
<x:String>
|
|
<TimePicker ClockIdentifier="24HourClock" />
|
|
</x:String>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
</Panel>
|
|
</StackPanel>
|
|
|
|
<TextBlock FontSize="18">A TimePicker using a 12-hour clock and seconds.</TextBlock>
|
|
<StackPanel Orientation="Vertical">
|
|
<Border BorderBrush="{DynamicResource CatalogBaseLowColor}"
|
|
BorderThickness="1" Padding="15">
|
|
<TimePicker ClockIdentifier="12HourClock" UseSeconds="True" />
|
|
</Border>
|
|
<Panel Background="{DynamicResource CatalogBaseLowColor}">
|
|
<TextBlock Padding="15">
|
|
<TextBlock.Text>
|
|
<x:String>
|
|
<TimePicker ClockIdentifier="12HourClock" UseSeconds="True" />
|
|
</x:String>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
</Panel>
|
|
</StackPanel>
|
|
|
|
<TextBlock FontSize="18">A TimePicker using a 24-hour clock and seconds.</TextBlock>
|
|
<StackPanel Orientation="Vertical">
|
|
<Border BorderBrush="{DynamicResource CatalogBaseLowColor}"
|
|
BorderThickness="1" Padding="15">
|
|
<TimePicker ClockIdentifier="24HourClock" UseSeconds="True" />
|
|
</Border>
|
|
<Panel Background="{DynamicResource CatalogBaseLowColor}">
|
|
<TextBlock Padding="15">
|
|
<TextBlock.Text>
|
|
<x:String>
|
|
<TimePicker ClockIdentifier="24HourClock" UseSeconds="True" />
|
|
</x:String>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
</Panel>
|
|
</StackPanel>
|
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</UserControl>
|
|
|