Close button does not close window

Dec 22, 2010 at 8:24 PM

I'm having an issue where the close button (x in upper right corner) does not close the window.  When I click the button nothing happens.  

Using Silverlight 4; Blend 4, VS 2010

 

Thanks for any help!

Feb 8, 2011 at 12:56 AM

Add logic to collapse the window on closing:

<windows:FloatableWindow x:Name="ResultsContainer" Effect="{StaticResource dropShadow}" Background="{StaticResource CommonBackgroundBrush}"

MinWidth="400" MinHeight="220" Width="400" Height="220" ResizeMode="CanResize" Title="Test" Closing="ResultsContainer_Closing" >

 

private void ResultsContainer_Closing(object sender, CancelEventArgs e)
        {
            ResultsContainer.Visibility = Visibility.Collapsed;
        }