I want to remove a suppose control whose type is of border, from the grid control. how can I achieve it in WPF C# ?
Sorry Guys, My problem is that I have grid control which has GUI design at XAML end and user control which are added using C# and the some controls are overlapped. Some controls are removed but some are left which overlap one another. How can I remove all controls. The code you have posted work for control which are not overlapped but for overlapped ones, it didn’t work.
Here is my code:
My error was that each time I used the
Children.Countin theforloop and every time I removed a child, theChildren.Countchanged and not all children were removed.