I'm trying to bind a subclass property to a GridViewColumn. I have a mother class M1 and 3 differents subclasses S1, S2 and S3. The GridViewColumn is filled with objects of class M1. I'd like to bind to the header of this GridViewColumn a property of S2 that isn't implemented in M1.
Could someone explain to me how to do that please ?
EDIT :
I've got this line :
<GridViewColumn DisplayMemberBinding="{Binding _s2Attr}" Header="desc" Width="100" />
The GridView ItemsSource is filled with objects of class M1 but they are all S1, S2 or S3.
S3orS1, instead ofS2? - DennisSystem.Windows.Data Error: 40 : BindingExpression path error: 'SomeProperty' property not found on 'object' 'S3' (HashCode=3806203)'. BindingExpression:Path=SomeProperty; DataItem='S3' (HashCode=3806203); target element is 'TextBlock' (Name=''); target property is 'NoTarget' (type 'Object')- Sheridan