File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/MaterialDesignThemes.Wpf Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff 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 } ) ;
You can’t perform that action at this time.
0 commit comments