Visibility Problem

May 17, 2012 at 8:14 PM

Hi, every time I change the visibility of the ChildWindow, then the close icon button doesn't close the window.

What can I do?

 

Thanks.

Coordinator
May 22, 2012 at 3:01 PM

Hi,

 

When you click on the Close button of the ChildWindow, the WindowState of the control goes from "Open" to "Closed".  The ChildWindow default template has a trigger that sets the Visibility to "Collapsed" when the WindowState is set to "Closed".  My guess is that you masking the trigger's value by setting a "local" value on the ChildWindow.Visibility property.  In a way, you are breaking the link there is between the WindowState and the Visibility property.

 

If you want to show or hide the ChildWindow, try to use the ChildWindow.WindowState property instead of the ChildWindow.Visibility property.