This question is locked. New answers and comments are not allowed.
I have the follow XAML in a RadBook control and I am attempting to find a control in the Grid.
| <telerikNavigation:RadBook.LeftPageTemplate> |
| <DataTemplate> |
| <Border BorderBrush="Silver" BorderThickness="2"> |
| <Grid x:Name="PageRoot" Background="GhostWhite"> |
| <Grid.RowDefinitions> |
| <RowDefinition Height="Auto"/> |
| <RowDefinition Height="*"/> |
| <RowDefinition Height="Auto"/> |
| </Grid.RowDefinitions> |
| <Border Background="LightGray" Opacity="0.5" BorderThickness="0 0 0 1" BorderBrush="Gray"> |
| <TextBlock Text="{Binding FullName}" HorizontalAlignment="Center" FontSize="14" FontWeight="Bold" TextWrapping="Wrap" /> |
| </Border> |
| <Image Source="{Binding Photograph, Converter={StaticResource convertImage}}" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="1" Stretch="None" Opacity="1" /> |
| <TextBlock x:Name="EmpNo" Text="{Binding EmployeeNumber}" HorizontalAlignment="Center" Grid.Row="2" VerticalAlignment="Center" FontSize="12" FontWeight="Bold" TextWrapping="Wrap" Tag="{Binding EEID}" /> |
| </Grid> |
| </Border> |
| </DataTemplate> |
| </telerikNavigation:RadBook.LeftPageTemplate> |
| TextBlock empNo = e.Page.FindName("PageRoot") as TextBlock; |
The empNo instance is always null and of course EmpNo is not defined because it is inside a DataTemplate control. Is there anyway to access the TextBlock either in code or declaratively. Thank you in advance!
