In WPF application I create Listbox with it's ItemTemplate defined in following DataTemplate in XAML:
<DataTemplate x:Key="ListItemTemplate">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<StackPanel>
<Button/>
<Button/>
<Button Name="btnRefresh" IsEnabled="false"/>
<TextBlock/>
<TextBlock/>
<TextBlock/>
<TextBlock/>
</StackPanel>
<TextBox/>
</Grid>
</DataTemplate>
Once ListBox is generated I need to change following button IsEnabled propety to true on all ListBoxItem(s): <Button Name="btnRefresh" IsEnabled="false"/>
PROBLEM:
I Cannot access ListBoxItem(s) and therefore cant access their children with that button among them.
Is there in WPF anything like ListBox.Descendents() which is in Silverlight or any other way to get to that button,