App.cs 823 B

12345678910111213141516171819202122232425262728
  1. // Copyright (c) The Perspex Project. All rights reserved.
  2. // Licensed under the MIT license. See licence.md file in the project root for full license information.
  3. using System;
  4. using Perspex;
  5. using Perspex.Controls;
  6. using Perspex.Controls.Templates;
  7. using Perspex.Themes.Default;
  8. namespace TestApplication
  9. {
  10. public class App : Application
  11. {
  12. public App()
  13. {
  14. RegisterServices();
  15. InitializeSubsystems((int)Environment.OSVersion.Platform);
  16. Styles = new DefaultTheme();
  17. Styles.Add(new SampleTabStyle());
  18. DataTemplates = new DataTemplates
  19. {
  20. new FuncTreeDataTemplate<Node>(
  21. x => new TextBlock {Text = x.Name},
  22. x => x.Children),
  23. };
  24. }
  25. }
  26. }