Hi i am famliar with windows forms, Now i am going to start WPF, in windows i reset the controls with the following recursive method
internal void clrCntrls(Control cntrl)
{
if (cntrl.GetType() == typeof(TextBox))
{
TextBox cntrl = (TextBox)cntrl;
cntrl.Text = "";
}
else if (cntrl.GetType() == typeof(ComboBox))
{
ComboBox cntrl = (ComboBox)cntrl;
cntrl.SelectedIndex = -1;
}
else
{
foreach (Control subCntrl in _cntrl.Controls)
{
clrCntrls(subCntrl);
}
}
it works fine for me in windows but the same how can i do in WPF. i am slight Confusion with that. Please help with it.