A lot of what we write in the Toolkit are templated controls.
As part of our template we should include the base setup for this. This'll also help better illustrate how to work with labs in the samples as well as the test infrastructure being developed in #156.
Ideally we setup the following things in the template:
- src
- ProjectTemplateControl.cs (a simple templated control based off
Control)
- ProjectTemplateControl.xaml
- a minimal template with a textblock and some text
- has a named style
- uses the named style in the implicit style setting
- shows template binding
- has a basic theme dictionary and an example color set for themed
- has a static resource for something else defined
- Themes/generic.xaml (merged dictionary pointing to ProjectTemplateControl.xaml)
- samples/ProjectTemplate.Sample
- ProjectTemplateFirstSamplePage.xaml (add reference to new control in xaml)
- tests/ProjectTemplate.Tests
- ExampleProjectTemplatePage.xaml/xaml.cs (add a new test page here with the control referenced in it)
- ExampleProjectTemplateTestClass.cs (add a new test using
[LabsUITestMethod] with the parameter of the test and asset that the test was found)
Dependent on #156 and #146 (tests need reference to toolkit for FindDescendent to make example test easy)
A lot of what we write in the Toolkit are templated controls.
As part of our template we should include the base setup for this. This'll also help better illustrate how to work with labs in the samples as well as the test infrastructure being developed in #156.
Ideally we setup the following things in the template:
Control)[LabsUITestMethod]with the parameter of the test and asset that the test was found)Dependent on #156 and #146 (tests need reference to toolkit for
FindDescendentto make example test easy)