Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clean up
  • Loading branch information
MohammadHadi2031 authored and Keboo committed Sep 26, 2025
commit f21fa24c6d9725a3f418437c5827001b9620eaa9
6 changes: 3 additions & 3 deletions src/MaterialDesignThemes.Wpf/TreeListView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,11 @@ private DataTemplate CreateToggleButtonTemplate(DataTemplate originalTemplate)
{
Converter = TreeListViewIndentConverter.Instance,
};
marginMultiBinding.Bindings.Add(new Binding("LevelIndentSize")
marginMultiBinding.Bindings.Add(new Binding(LevelIndentSizeProperty.Name)
{
RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(TreeListView), 1)
});
marginMultiBinding.Bindings.Add(new Binding("Level")
marginMultiBinding.Bindings.Add(new Binding(TreeListViewItem.LevelProperty.Name)
{
RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(TreeListViewItem), 1)
});
Expand All @@ -317,7 +317,7 @@ private DataTemplate CreateToggleButtonTemplate(DataTemplate originalTemplate)
var toggleButtonFactory = new FrameworkElementFactory(typeof(ToggleButton));
toggleButtonFactory.SetValue(ToggleButton.StyleProperty, Application.Current.Resources["MaterialDesignTreeListViewToggleButtonStyle"]);

toggleButtonFactory.SetBinding(ToggleButton.IsCheckedProperty, new Binding("IsExpanded")
toggleButtonFactory.SetBinding(ToggleButton.IsCheckedProperty, new Binding(TreeListViewItem.IsExpandedProperty.Name)
{
RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(TreeListViewItem), 1)
});
Expand Down