Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone,
I have a treeview:

<TreeView Grid.ColumnSpan="2"  Margin="5" Background="LightYellow"
          ItemTemplate="{DynamicResource AccountsTreeViewItemTemplate}"
          x:Name="treeView1" FontFamily="Cairo" FontSize="16"/>


And here is the template:

XML
<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>


I am currently using Blend for VS 2022, version 17.0.5

In a previous version several years age, I remember doing so by editing current template ,
but now that option is disabled despite the template is assigned ..

I don't know if I am missing something or if there is a bug in blend?

(The template is working as it is, but I need to edit it visually in the designer)

What I have tried:

1. Right-Click the tree view -- edit additional templates -- edit generated items (item template) -- edit current .. but it is disabled

2. Tried to open the resource dictionary file (in which the template is defined) in the designer, but got :
Quote:
TreeViewStyles.xaml cannot be edited in the Design view.
Posted
Updated 26-Jul-23 16:18pm
v2
Comments
Maciej Los 14-Feb-22 11:39am    
Clean and rebuild your solution. Let me know if this helped.
Ahmad_kelany 14-Feb-22 11:59am    
Thanks for the reply,

Did that, didn't work, I am beginning to think that it is a missing feature in Blend 2022.
Maciej Los 14-Feb-22 13:18pm    
If you've got installed Resharper - uninstall it and then try to repair VS installation. If not, just try to repair VS installation.

1 solution

Same issue for me.
MS removed template visual designer and resource manage view since VS2019.
The best workaround I know so far is to edit raw XAML and use the XAML hot reload to view change at runtime.

I think maybe they are thinking of phasing out XAML anyway.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900