David Jefferies
Topic Author
Posts: 27
Joined: 14 Jan 2021, 17:09

Editing the XAML of a DataTemplate

15 Dec 2023, 12:19

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?
 
User avatar
sfernandez
Site Admin
Posts: 2997
Joined: 22 Dec 2011, 19:20

Re: Editing the XAML of a DataTemplate

15 Dec 2023, 13:02

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?

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 7 guests