2,854 questions
WPF-Blend How can I edit Item Template or Control Template in designer in Blend VS 2022
Ahmed Kelany
1
Reputation point
Hello everyone,
I have a treeview:
<TreeView ItemTemplate="{DynamicResource AccountsTreeViewItemTemplate}" />
and here is the template:
<HierarchicalDataTemplate x:Key="AccountsTreeViewItemTemplate" ItemsSource="{Binding Children}" DataType="{x:Type local:AccountHierarchy}" >
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Name}" Grid.Column="1" />
<TextBlock Text="{Binding Id}" />
</Grid>
</HierarchicalDataTemplate>
The template works, but I need to edit it in the designer to edit the visual states, the problem is:
- Edit current template is disabled despite it is assigned to as displayed in code above
- Can't find a way to edit the template visually in designer,
(I tried editing template of other controls e.g. button, but also couldn't find a way also)
I am using Blend for vs 2022, version 17.05
Developer technologies Windows Presentation Foundation
Developer technologies XAML
859 questions
Sign in to answer