Member 14890678 Ответов: 1

Devexpress получает доступ к элементу управления внутри datatemplate


How can I retrieve the control "Form_PdfViewer_Button_Image" that is inside the DataTemplate.
I don't want to iterate on controls but I want to be able to do FindName.
From behind it is only visible "Form_Buscar_LayoutPanel".


<pre><dxdo:LayoutGroup x:Name="Form_Buscar_LayoutGroup" Orientation="Vertical" VerticalAlignment="Stretch">
<dxdo:LayoutPanel x:Name="Form_Buscar_LayoutPanel" Caption="Opciones de Búsqueda" Style="{StaticResource Dev_Layout}" ItemHeight="*" VerticalAlignment="Stretch">

                     <dxdo:LayoutPanel.ControlBoxContentTemplate>
                                     <DataTemplate x:Name="Form_Botones_Superior_DataTemplate">
                                            
                                         <DockPanel x:Name="Form_Botones_Superior" Style="{StaticResource Botones_Superior}">
                                             <Button x:Name="Form_PdfViewer_Button" Style="{StaticResource Button_Visor}" Width="29" Height="auto" Padding="0" Click="Fcn_AppVisores_Button_Click" Visibility="Visible">
                                                 <Image x:Name="Form_PdfViewer_Button_Image" Source="{StaticResource pdf}" Style="{StaticResource Button_Visor_Image}" Width="29" Height="auto"/>
                                             </Button>
                                         </DockPanel>
                                     </DataTemplate>
                                 </dxdo:LayoutPanel.ControlBoxContentTemplate>
                                 <TabControl x:Name="Form_PageControl" DockPanel.Dock="Top" TabStripPlacement="Top">
                                     <TabItem x:Name="Form_Buscar_TabItem" Header="Buscar" VerticalAlignment="Stretch">
                                         <Grid x:Name="Form_Buscar_Grid" DockPanel.Dock="Top" Margin="2,0,2,0" VerticalAlignment="Top">
                                             <Grid x:Name="Form_PdfViewer_Panel_Contenedor" Panel.ZIndex="2">
                                                 <dxpdf:PdfViewerControl x:Name="Form_PdfViewer" Visibility="Hidden"/>
                                             </Grid>


Что я уже пробовал:

А что вы пробовали?
А что вы пробовали?