void OnBeforeBinding( object sender, WindowBindingEventArgs e )
{
Debug.Assert( Dispatcher.CurrentDispatcher == Application.Current.Dispatcher, "This method should only be called by the Application Thread." );
if( e.BindingType == BindingEventType.Attach )
{
Rect r = e.Binding.GetWindowArea();
if( r != Rect.Empty )
{
//Console.WriteLine( "OnBeforeBinding ! Origin : {0}", e.Binding.Origin.Name );
var move = WindowManager.Move( e.Binding.Origin, r.Top, r.Left );
var resize = WindowManager.Resize( e.Binding.Origin, r.Width, r.Height );
move.Broadcast();
resize.Broadcast();
}
}
}