Skip to content

Commit

Permalink
[bugfix] shows the expanded dynamic tree after link (#52)
Browse files Browse the repository at this point in the history
* [bugfix] shows the expanded dynamic tree after link

After click on a link from ckeck helper to dynamic section, the tree was not shown as expanded at the correct way.

* fix: select showed item

---------

Co-authored-by: Mike <45664417+thewhobox@users.noreply.github.com>
  • Loading branch information
olterion and thewhobox authored Sep 10, 2024
1 parent e1025a6 commit c1443f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Kaenx.Creator/Controls/DynamicView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@
<TreeView.ItemContainerStyle>
<Style TargetType="TreeViewItem">
<Setter Property="IsExpanded" Value="{Binding IsExpanded}" />
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
</Style>
</TreeView.ItemContainerStyle>
<TreeView.Resources>
Expand Down
3 changes: 3 additions & 0 deletions Kaenx.Creator/Controls/DynamicView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ public void ShowItem(object item)
ditem = ditem.Parent;
ditem.IsExpanded = true;
}
DynamicList.Items.Refresh();
DynamicList.UpdateLayout();
((Models.Dynamic.IDynItems)item).IsSelected = true;
}

private void SetExpandedFalse(Models.Dynamic.IDynItems item)
Expand Down

0 comments on commit c1443f2

Please sign in to comment.