title: Determine WPF element type
body: <p>How to determine the element type in WPF programatically?</p>
  
  <p>For example my xaml is consisting of textbox, radio buttons, combo's, list boxes etc.</p>
  
  <p>In the load event, say I want to do something related to the controls.(Say for all textbox,</p>
  
  <p>the foreground color will be red, for all labels the background color will be green).. </p>
  
  <p>something of that sort.</p>
  
  <p>So I have to loop through the entire list of controls present in the Xaml and then have to </p>
  
  <p>write the control specific logic. </p>
  
  <p>Is it by using Framework element?</p>
  
  <p>Please give the code in c#. For example please take 3/4 controls of your choice.</p>
  
  <p>I am also searching in google!</p>
  
  <p>Thanks in advance</p>