Not all controls are retrieved from an .aspx page

  • Thread starter Thread starter zequion1
  • Start date Start date
Z

zequion1

Guest
I can't find the WPF forum.

I use a recursive function to locate all the controls on a .aspx page in WPF and in Asp.net, but many controls are not localized. If I use control.FindName ("Control_Name") it does find those controls.

I need the recursive function to find all the controls because I can't go searching one by one by name.

Example: Controls below AutoHideGroup are not found (and Form_OpcionesEx2_Panel is visible):

<dxdo:AutoHideGroup x:Name="Form_OpcionesEx2_AutoHideGroup">
<dxdo:LayoutPanel x:Name="Form_OpcionesEx2_Panel" Caption="Details" Visibility="Visible">

My Recursive code (Resume):

internal static dynamic Fcn_ControlFindRec(dynamic ThRead_Funciones, ref dynamic ThRead_Controles, System.Windows.DependencyObject MyContenedor, string MyControlNombre
{ dynamic MyDynRet = null;

try
{ int MyChildrenCount = System.Windows.Media.VisualTreeHelper.GetChildrenCount(MyContenedor);

for (int index = 0; index < MyChildrenCount; index++)
{ System.Windows.DependencyObject MyChild = System.Windows.Media.VisualTreeHelper.GetChild(MyContenedor, index);

MyDynRet = Name_Wpf_Control_Find.Cls_Wpf_Control_Find.Fcn_ControlFindRec(ThRead_Funciones, ref ThRead_Controles, MyChild, MyControlNombre);
}
}
catch (System.Exception ErrorExcp){}
return MyDynRet;
}

Continue reading...
 
Back
Top