60 lines
2.6 KiB
XML
60 lines
2.6 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
x:Class="ControlGallery.Pages.PickersPage"
|
|
Title="Pickers">
|
|
|
|
<ScrollView>
|
|
<VerticalStackLayout Spacing="20" Padding="20">
|
|
|
|
<Label Text="Picker Controls" FontSize="24" FontAttributes="Bold" />
|
|
|
|
<!-- Basic Picker -->
|
|
<Frame Padding="15" CornerRadius="8">
|
|
<VerticalStackLayout Spacing="10">
|
|
<Label Text="Basic Picker" FontAttributes="Bold" />
|
|
<Picker Title="Select a color" SelectedIndexChanged="OnColorPickerChanged">
|
|
<Picker.Items>
|
|
<x:String>Red</x:String>
|
|
<x:String>Green</x:String>
|
|
<x:String>Blue</x:String>
|
|
<x:String>Yellow</x:String>
|
|
<x:String>Purple</x:String>
|
|
</Picker.Items>
|
|
</Picker>
|
|
<Label x:Name="ColorResultLabel" Text="No color selected" TextColor="{StaticResource Gray500}" />
|
|
</VerticalStackLayout>
|
|
</Frame>
|
|
|
|
<!-- DatePicker -->
|
|
<Frame Padding="15" CornerRadius="8">
|
|
<VerticalStackLayout Spacing="10">
|
|
<Label Text="DatePicker" FontAttributes="Bold" />
|
|
<DatePicker DateSelected="OnDateSelected" />
|
|
<Label x:Name="DateResultLabel" Text="Select a date" TextColor="{StaticResource Gray500}" />
|
|
</VerticalStackLayout>
|
|
</Frame>
|
|
|
|
<!-- TimePicker -->
|
|
<Frame Padding="15" CornerRadius="8">
|
|
<VerticalStackLayout Spacing="10">
|
|
<Label Text="TimePicker" FontAttributes="Bold" />
|
|
<TimePicker PropertyChanged="OnTimeChanged" />
|
|
<Label x:Name="TimeResultLabel" Text="Select a time" TextColor="{StaticResource Gray500}" />
|
|
</VerticalStackLayout>
|
|
</Frame>
|
|
|
|
<!-- DatePicker with Range -->
|
|
<Frame Padding="15" CornerRadius="8">
|
|
<VerticalStackLayout Spacing="10">
|
|
<Label Text="DatePicker with Range" FontAttributes="Bold" />
|
|
<Label Text="Limited to next 30 days" TextColor="{StaticResource Gray500}" />
|
|
<DatePicker x:Name="RangeDatePicker" />
|
|
</VerticalStackLayout>
|
|
</Frame>
|
|
|
|
</VerticalStackLayout>
|
|
</ScrollView>
|
|
|
|
</ContentPage>
|