I have a test.xaml -
<Grid>
<ListBox Name="ListBox1"/>
</Grid>
And in the test.xaml.cs file, I initiatilize the ListBox
for (int i=1; i<=50; i++)
{
ListBox1.Items.Add("Item" + i);
}
Now I want to set a HelpText AutomationProperty to each of the ListItems. How do I do it?
I tried the following, but no success -
<Grid>
<ListBox>
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock
AutomationProperties.HelpText="{Binding .}"
Text="{Binding .}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
ASKED:
May 11 2009 12:55 AM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _