I have a question to following issue:
I have a ListView that includes a GridView.
<ListView Margin="10,10,10,48" Name="listView_Anlagen" AutomationProperties.LabeledBy="{Binding Dateiname}" >
<ListView.View>
<GridView>
<GridViewColumn Header="Dateiname" Width="200" DisplayMemberBinding="{Binding Dateiname}" />
<GridViewColumn Header="Dateigröße" Width="75" DisplayMemberBinding="{Binding Dateigroesse}" />
<GridViewColumn Header="Pfad" Width="460" DisplayMemberBinding="{Binding Pfad}" />
</GridView>
</ListView.View>
</ListView>
The 3 bindings are defined in a class.
public class Anlage
{
public string Pfad { get; set; }
public string Dateiname { get; set; }
public string Dateigroesse { get; set; }
}
Every item of this class gets merged in a list.
internal static List<Anlage> AnlagenListe = new List<Anlage>();
And this list is the source for the ListView.
My issue is: When I tab into the list and select an item, the narrator is reading "namespace.name_of_the_class", not its content or just one property.
My question is: how to get the narrator to read one specific property instead?
EDIT: I currently found a dirty workaround by overriding the "ToString" method of the class.
public class Anlage
{
public string Pfad { get; set; }
public string Dateiname { get; set; }
public string Dateigroesse { get; set; }
public override string ToString()
{
return Dateiname;
}