Files
maui-linux/samples/ControlGallery/Pages/PickersPage.xaml.cs
logikonline f945d2a537 Add control gallery sample and roadmap documentation
- Add comprehensive ControlGallery sample app with 12 pages
  demonstrating all 35+ controls
- Add detailed ROADMAP.md with version milestones
- Add README placeholders for VSIX icons and template images
- Sample pages include: Home, Buttons, Labels, Entry, Pickers,
  Sliders, Toggles, Progress, Images, CollectionView, CarouselView,
  SwipeView, RefreshView

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 05:24:35 -05:00

37 lines
994 B
C#

namespace ControlGallery.Pages;
public partial class PickersPage : ContentPage
{
public PickersPage()
{
InitializeComponent();
// Set date range
RangeDatePicker.MinimumDate = DateTime.Today;
RangeDatePicker.MaximumDate = DateTime.Today.AddDays(30);
}
private void OnColorPickerChanged(object sender, EventArgs e)
{
var picker = (Picker)sender;
if (picker.SelectedIndex >= 0)
{
ColorResultLabel.Text = $"Selected: {picker.Items[picker.SelectedIndex]}";
}
}
private void OnDateSelected(object sender, DateChangedEventArgs e)
{
DateResultLabel.Text = $"Selected: {e.NewDate:MMMM dd, yyyy}";
}
private void OnTimeChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(TimePicker.Time))
{
var picker = (TimePicker)sender;
TimeResultLabel.Text = $"Selected: {picker.Time:hh\\:mm}";
}
}
}