Hi,
I want to collapse or hide a child element that is in a StackPanel on Main WPF window at run-time on a particular condition. When I collapse after the Window is initialized, the element is not visible but I still see the empty space. Is there a way to re-render the Window layout after I hide or collapse that child element ? I am also fine to conditionally create that element in XAML but not sure how to write C# code in XAML to determine if that condition is true or not ?
Please help.
Thanks.
I want to collapse or hide a child element that is in a StackPanel on Main WPF window at run-time on a particular condition. When I collapse after the Window is initialized, the element is not visible but I still see the empty space. Is there a way to re-render the Window layout after I hide or collapse that child element ? I am also fine to conditionally create that element in XAML but not sure how to write C# code in XAML to determine if that condition is true or not ?
Please help.
Thanks.