-
Notifications
You must be signed in to change notification settings - Fork 12
DataTemplateSelectors
Håvard Moås edited this page Jun 4, 2020
·
3 revisions
Data template selectors can be used by different view elements. We have provided a couple of built in templates that is useful. A very common and well used pattern is to use it with a ContentControl.
👉 To get started, make sure you have followed the getting started steps
Namespace: DIPS.Xamarin.UI.Content.DataTemplateSelectors
This selector lets you select a DataTemplate
based on an boolean item.
Example:
<dxui:ContentControl SelectorItem="{Binding BooleanProperty}"
TemplateSelector="{dxui:BooleanDataTemplateSelector
TrueTemplate={StaticResource TrueTemplate},
FalseTemplate={StaticResource FalseTemplate}}" />
This will select select TrueTemplate
/ FalseTemplate
depending on the boolean value. This will result in the content of the ContentControl
change according to the BooleanProperty
.
- ContentControl
- DataTemplateSelectors
- Date- and TimePicker
- Modality
- Contextual Menus
- RadioButton
- TrendGraph
- Tag
- Toast