Skip to content

Commit 345487f

Browse files
clean up
1 parent a17bf56 commit 345487f

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
@@ -296,11 +296,11 @@ private DataTemplate CreateToggleButtonTemplate(DataTemplate originalTemplate)
296296
{
297297
Converter = TreeListViewIndentConverter.Instance,
298298
};
299-
marginMultiBinding.Bindings.Add(new Binding("LevelIndentSize")
299+
marginMultiBinding.Bindings.Add(new Binding(LevelIndentSizeProperty.Name)
300300
{
301301
RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(TreeListView), 1)
302302
});
303-
marginMultiBinding.Bindings.Add(new Binding("Level")
303+
marginMultiBinding.Bindings.Add(new Binding(TreeListViewItem.LevelProperty.Name)
304304
{
305305
RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(TreeListViewItem), 1)
306306
});
@@ -309,7 +309,7 @@ private DataTemplate CreateToggleButtonTemplate(DataTemplate originalTemplate)
309309
var toggleButtonFactory = new FrameworkElementFactory(typeof(ToggleButton));
310310
toggleButtonFactory.SetValue(ToggleButton.StyleProperty, Application.Current.Resources["MaterialDesignTreeListViewToggleButtonStyle"]);
311311

312-
toggleButtonFactory.SetBinding(ToggleButton.IsCheckedProperty, new Binding("IsExpanded")
312+
toggleButtonFactory.SetBinding(ToggleButton.IsCheckedProperty, new Binding(TreeListViewItem.IsExpandedProperty.Name)
313313
{
314314
RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(TreeListViewItem), 1)
315315
});

0 commit comments

Comments
 (0)