You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 7, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on May 7, 2022. It is now read-only.
Im getting BindingExpression errors for every item I add to the MultiSelectTreeView. I have a very simple tree view where all I have done is set the ItemSource and SelectedItems in the XAML.
But when I add 1000 entries into it, I get the following binding expression failures for each and every item:
System.Windows.Data Warning: 40 : BindingExpression path error: '(Controls:MultiSelectTreeView.HoverHighlighting)' property not found on 'object' ''MultiSelectTreeView' (Name='')'. BindingExpression:Path=(Controls:MultiSelectTreeView.HoverHighlighting); DataItem='MultiSelectTreeView' (Name=''); target element is 'MultiSelectTreeViewItem' (Name=''); target property is 'HoverHighlighting' (type 'Boolean')
System.Windows.Data Warning: 40 : BindingExpression path error: '(Controls:MultiSelectTreeView.ItemIndent)' property not found on 'object' ''MultiSelectTreeView' (Name='')'. BindingExpression:Path=(Controls:MultiSelectTreeView.ItemIndent); DataItem='MultiSelectTreeView' (Name=''); target element is 'MultiSelectTreeViewItem' (Name=''); target property is 'ItemIndent' (type 'Int32')
System.Windows.Data Warning: 40 : BindingExpression path error: '(Controls:MultiSelectTreeView.IsKeyboardMode)' property not found on 'object' ''MultiSelectTreeView' (Name='')'. BindingExpression:Path=(Controls:MultiSelectTreeView.IsKeyboardMode); DataItem='MultiSelectTreeView' (Name=''); target element is 'MultiSelectTreeViewItem' (Name=''); target property is 'IsKeyboardMode' (type 'Boolean')
Im not sure what I should do to remove these, as those seems to be TreeView related and not related to my view models.
For everyone who wants to fix that issue on his own:
search for:
<!-- Pass on the MultiSelectTreeView' HoverHighlighting value to each item because we couldn't access it otherwise in the triggers -->
<Setter Property="HoverHighlighting"
Value="{Binding (Controls:MultiSelectTreeView.HoverHighlighting), RelativeSource={RelativeSource AncestorType={x:Type Controls:MultiSelectTreeView}}, Mode=OneWay, FallbackValue=False}"/>
<Setter Property="ItemIndent"
Value="{Binding (Controls:MultiSelectTreeView.ItemIndent), RelativeSource={RelativeSource AncestorType={x:Type Controls:MultiSelectTreeView}}, Mode=OneWay, FallbackValue=13}"/>
<Setter Property="IsKeyboardMode"
Value="{Binding (Controls:MultiSelectTreeView.IsKeyboardMode), RelativeSource={RelativeSource AncestorType={x:Type Controls:MultiSelectTreeView}}, Mode=OneWay, FallbackValue=False}"/>
and replace with:
<!-- Pass on the MultiSelectTreeView' HoverHighlighting value to each item because we couldn't access it otherwise in the triggers -->
<Setter Property="HoverHighlighting"
Value="{Binding Path=HoverHighlighting, RelativeSource={RelativeSource AncestorType={x:Type Controls:MultiSelectTreeView}}, Mode=OneWay, FallbackValue=False}"/>
<Setter Property="ItemIndent"
Value="{Binding Path=ItemIndent, RelativeSource={RelativeSource AncestorType={x:Type Controls:MultiSelectTreeView}}, Mode=OneWay, FallbackValue=13}"/>
<Setter Property="IsKeyboardMode"
Value="{Binding Path=IsKeyboardMode, RelativeSource={RelativeSource AncestorType={x:Type Controls:MultiSelectTreeView}}, Mode=OneWay, FallbackValue=False}"/>
The files that contain that xaml code are:
MultiSelectTreeViewItem.Aero2.xaml
MultiSelectTreeViewItem.Classic.xaml
MultiSelectTreeViewItem.Luna.xaml
MultiSelectTreeViewItem.Aero.xaml
Activity
TFTomSun commentedon May 27, 2017
I have the same issue and would also appreciate a solution for it.
AnotherKiwi commentedon Jul 10, 2017
Me too.
TFTomSun commentedon Oct 2, 2017
For everyone who wants to fix that issue on his own:
search for:
and replace with:
The files that contain that xaml code are:
MultiSelectTreeViewItem.Aero2.xaml
MultiSelectTreeViewItem.Classic.xaml
MultiSelectTreeViewItem.Luna.xaml
MultiSelectTreeViewItem.Aero.xaml
fix binding errors -- ygoe#41