protected virtual void OnWindowMinimized( object sender, EventArgs e )
{
if( Dispatcher.CurrentDispatcher != Application.Current.Dispatcher ) throw new InvalidOperationException( "This method should only be called by the Application Thread. Call OnWindowMinimizedInternal to make sure the correct thread carries on." );
IWindowElement windowElement = sender as IWindowElement;
if( windowElement != null )
{
WindowElementData data = null;
if( _dic.TryGetValue( windowElement, out data ) )
{
if( WindowMinimized != null )
WindowMinimized( sender, new WindowElementEventArgs( windowElement ) );
}
}
}