Templates
If the default templates of the control do not suit your needs, you can easily define custom ones. The available templates for customizing are:
-
PlaceholderTemplate(ControlTemplate): Defines the template visualized for the placeholder.
- DisplayTemplate(ControlTemplate): Defines the template visualized when the picked date/time is displayed.
- HeaderTemplate(ControlTemplate): Defines what will be displayed inside the dialog(popup) header.
- FooterTemplate(ControlTemplate): Defines what will be displayed inside the dialog(popup) footer.
PlaceholderTemplate
DisplayTemplate
HeaderTemplate
FooterTemplate
and the TimeSpan Picker definition:
Example How to Customize the Default Look
The snippet below shows a simple TimeSpan Picker definition:
Now lets add the templates definition to the page resources:
Custom PlaceholderTemplate
Custom DisplayTemplate
Custom HeaderTemplate
Custom FooterTemplate
Here is how the header and footer looks after customization:
In addition to this, you need to add the following namespace:
A sample Custom Templates example can be found in the TimeSpan/Features folder of the SDK Samples Browser application.