Page 1 of 1

Editing the XAML of a DataTemplate

Posted: 15 Dec 2023, 12:19
by David Jefferies
We use DataTemplates a lot so that we can programmatically generate lists of items to be displayed in a ItemsControl.

The UI designers use Blend to create the XAML for how the item looks and we then create a DataTemplate using that XAML.
The problem is that once the DataTemplate is created the XAML is no longer editable in Blend.

Is there a workflow that allows us to use DataTemplates but still keep the XAML editable?

Re: Editing the XAML of a DataTemplate

Posted: 15 Dec 2023, 13:02
by sfernandez
In Blend you can create, apply or edit additional templates for some controls using the context menu:

- ContentControl.ContentTemplate:
ContenTemplate.png
.
- ItemsControl.ItemTemplate and ItemsPanel:
ItemTemplate.png
.
Is this what you are looking for?