Skip to content

Commit f21fa24

Browse files
MohammadHadi2031Keboo
authored andcommitted
clean up
1 parent e52d521 commit f21fa24

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/MaterialDesignThemes.Wpf/TreeListView.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,11 @@ private DataTemplate CreateToggleButtonTemplate(DataTemplate originalTemplate)
304304
{
305305
Converter = TreeListViewIndentConverter.Instance,
306306
};
307-
marginMultiBinding.Bindings.Add(new Binding("LevelIndentSize")
307+
marginMultiBinding.Bindings.Add(new Binding(LevelIndentSizeProperty.Name)
308308
{
309309
RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(TreeListView), 1)
310310
});
311-
marginMultiBinding.Bindings.Add(new Binding("Level")
311+
marginMultiBinding.Bindings.Add(new Binding(TreeListViewItem.LevelProperty.Name)
312312
{
313313
RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(TreeListViewItem), 1)
314314
});
@@ -317,7 +317,7 @@ private DataTemplate CreateToggleButtonTemplate(DataTemplate originalTemplate)
317317
var toggleButtonFactory = new FrameworkElementFactory(typeof(ToggleButton));
318318
toggleButtonFactory.SetValue(ToggleButton.StyleProperty, Application.Current.Resources["MaterialDesignTreeListViewToggleButtonStyle"]);
319319

320-
toggleButtonFactory.SetBinding(ToggleButton.IsCheckedProperty, new Binding("IsExpanded")
320+
toggleButtonFactory.SetBinding(ToggleButton.IsCheckedProperty, new Binding(TreeListViewItem.IsExpandedProperty.Name)
321321
{
322322
RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(TreeListViewItem), 1)
323323
});

0 commit comments

Comments
 (0)