Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,781 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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:
(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