Skip to content

Provide minimal templated control setup as part of template #157

@michael-hawker

Description

@michael-hawker

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)

Metadata

Metadata

Assignees

Labels

dev loop ➰For issues that impact the core dev-loop of building experimentsdocumentation 📃Improvements or additions to documentationtemplatingtesting 🏗

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions