protected virtual void TearDownCore()
        {
            if (realWindow != null)
            {
#if !SILVERLIGHT
                realWindow.SourceInitialized -= OnRealWindowSourceInitialized;
#endif
                realWindow.Close();
                realWindow.Content = null;
            }
            if (window != null)
            {
                window.Close();
                window.Content   = null;
                window.MaxWidth  = double.PositiveInfinity;
                window.MinWidth  = 0.0;
                window.MaxHeight = double.PositiveInfinity;
                window.MinHeight = 0.0;
                window.Width     = double.NaN;
                window.Height    = double.NaN;
            }
            window     = null;
            realWindow = null;
            DispatcherHelper.DoEvents();
        }
Пример #2
0
 protected virtual void TearDownCore()
 {
     if (realWindow != null)
     {
         realWindow.Close();
         realWindow.Content = null;
     }
     if (window != null)
     {
         window.Close();
         window.Content = null;
     }
     window     = null;
     realWindow = null;
     DispatcherHelper.DoEvents();
 }