Witam, mam taki problem, jak z codu behind mieć dostęp do np. Label w tym wypadku o nazwie "xwc"
<DataGrid Name="datagrid" Margin="5,0,5,0" GridLinesVisibility="None" CanUserAddRows="False" ItemsSource="{Binding nowy}" >
<DataGrid.Columns>
<DataGridTemplateColumn>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Expander Name="expander" IsExpanded="False" Collapsed="sw" Expanded="pos"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
<DataGrid.RowDetailsTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Label Content="Place of arrival:"/>
<Label Name="xwc"/>
<!--<DataGrid CanUserAddRows="False" ItemsSource="{Binding Source={StaticResource ResourceKey=data}, Path=flight_list}" HeadersVisibility="All"/>
--> </StackPanel>
</DataTemplate>
</DataGrid.RowDetailsTemplate>
</DataGrid>
Datagrid o nazwie "datagrid" jest widoczna w C#, ale już Label "xwc" w RowDetailsTemplate nie.