DatePickers.cs 588 B

123456789101112131415161718192021222324252627
  1. 
  2. namespace UICatalog.Scenarios;
  3. [ScenarioMetadata ("Date Picker", "Demonstrates how to use DatePicker class")]
  4. [ScenarioCategory ("Controls")]
  5. [ScenarioCategory ("DateTime")]
  6. public class DatePickers : Scenario
  7. {
  8. public override void Main ()
  9. {
  10. Application.Init ();
  11. Window app = new ()
  12. {
  13. Title = GetQuitKeyAndName ()
  14. };
  15. var datePicker = new DatePicker { Y = Pos.Center (), X = Pos.Center () };
  16. app.Add (datePicker);
  17. Application.Run (app);
  18. app.Dispose ();
  19. Application.Shutdown ();
  20. }
  21. }