DatePickerPage.xaml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  3. <StackPanel Orientation="Vertical" Gap="4">
  4. <TextBlock Classes="h1">DatePicker</TextBlock>
  5. <TextBlock Classes="h2">A control for selecting dates with a calendar drop-down</TextBlock>
  6. <StackPanel Orientation="Horizontal"
  7. Margin="0,16,0,0"
  8. HorizontalAlignment="Center"
  9. Gap="16">
  10. <StackPanel Orientation="Vertical"
  11. Width="200">
  12. <TextBlock Text="SelectedDateFormat: Short"/>
  13. <DatePicker Name="DatePicker1"
  14. SelectedDateFormat="Short"
  15. Margin="0,0,0,8"/>
  16. <TextBlock Text="SelectedDateFormat: Long"/>
  17. <DatePicker Name="DatePicker2"
  18. SelectedDateFormat="Long"
  19. Margin="0,0,0,8"/>
  20. <TextBlock Text="SelectedDateFormat: Custom"/>
  21. <DatePicker Name="DatePicker3"
  22. SelectedDateFormat="Custom"
  23. CustomDateFormatString="ddd, MMM d"
  24. Margin="0,0,0,8"/>
  25. <TextBlock Text="Blackout Dates"/>
  26. <DatePicker Name="DatePicker4"
  27. Margin="0,0,0,8"/>
  28. <DatePicker Margin="0,0,0,8"
  29. Watermark="Watermark"/>
  30. <DatePicker Margin="0,0,0,8"
  31. Name="DatePicker5"
  32. Watermark="Floating Watermark"
  33. UseFloatingWatermark="True"/>
  34. <TextBlock Text="Disabled"/>
  35. <DatePicker IsEnabled="False"/>
  36. </StackPanel>
  37. </StackPanel>
  38. </StackPanel>
  39. </UserControl>