I have an ArrayList of FrameworkElements in variable "selectedElementArray"
and the below code is used to align controls to top
double top = 100;
selectedElementArray.Cast<FrameworkElement>()
.ToList()
.ForEach(fe => Canvas.SetTop(fe, top));
this is working fine.
but i need to avoid a FrameworkElement, say parentElement, which exists in "selectedElementArray"
selectedElementArray.Cast<FrameworkElement>()
.ToList()
.Except(parentElement)
.ToList()
.ForEach(fe => Canvas.SetTop(fe, top));
i tried using "Except". but throwing some exception.
pls help....
Binil
Exceptmethod expects anIEnumerable<object>, not a singleobject- that would give you a compile time error.