| Description | Dragging a default (implicit) DataTemplate between resource dictionaries in Studio adds an x:Key containing the resolved design-time type name. This changes the template’s resource key and prevents automatic template selection for the corresponding runtime type in the game.
- Open a Studio project containing a design-time data type named Item.
- Create two resource dictionaries, A.xaml and B.xaml.
- In A.xaml, create a default DataTemplate for Item with DataType set and no explicit x:Key.
- In the Resources panel, drag the template from A.xaml to B.xaml.
- Inspect B.xaml. The template now has an explicit x:Key containing the design-time type name, such as Design.namespace.Item.
- Save and run the game with B.xaml loaded. The template is no longer automatically applied to Item objects.
|
|---|