How Can I use this code in WPF:
foreach (Control c in this.Controls)
{
}
(I want to change opacity of elements one after another!)
How Can I use this code in WPF:
foreach (Control c in this.Controls)
{
}
(I want to change opacity of elements one after another!)
WPF doesn't have the concept of controls the same way WinForms does.
You need to determine if it's a ContentControl or a Panel. ContentControl has Content of object and Panel has Children of UIElement.
Look at my answer on this question... I show how to cycle the controls and I explain it as well.