This is a migrated thread and some comments may be shown as answers.

System.Windows.Data Error 40 when removing nodes?

1 Answer 101 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Kristoffer
Top achievements
Rank 1
Kristoffer asked on 31 Jan 2013, 10:21 AM

public override bool RemoveItem(FilterNode node)
{
    return base.RemoveItem(node); // This method call produces the error output below
}

System.Windows.Data Error: 40 : BindingExpression path error: 'Visibility' property not found on 'object' ''DiagramViewModel' (HashCode=33233561)'. BindingExpression:Path=Visibility; DataItem='DiagramViewModel' (HashCode=33233561); target element is 'MyChartShape' (Name=''); target property is 'Visibility' (type 'Visibility')
System.Windows.Data Error: 40 : BindingExpression path error: 'IsSelected' property not found on 'object' ''DiagramViewModel' (HashCode=33233561)'. BindingExpression:Path=IsSelected; DataItem='DiagramViewModel' (HashCode=33233561); target element is 'MyChartShape' (Name=''); target property is 'IsSelected' (type 'Boolean')

I have a shape style that does some binding:

<Style TargetType="views:MyChartShape" x:Key="MyShapeStyle">
        <Setter Property="Visibility" Value="{Binding Visibility, Mode=TwoWay}" />
        <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />


Probably not critical, but I believe these errors could indicate a performance issue. The node's shape is obviously rendered when it has been removed (along with its DataContext).

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 31 Jan 2013, 05:28 PM
Hi Kristoffer,

These issues indicate databinding problems but I wasn't able to reproduce them locally. Do you think you can try to isolate this part of your application and send a sample solution reproducing these exceptions? This will allow us to further investigate them and suggest a solution.

Thank you in advance for your cooperation.

All the best,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Diagram
Asked by
Kristoffer
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or