Im currently working on a project in which we need a child window to behave like the one from silverlight.
Animate in/out, close, semi transparent & locked background etc.
I decompiled the one from Silverlight and have had some success with running it. I cannot however get the "moving" part working. Moving as in drag and drop the window elsewhere on the screen.
Here's the method in question:
private void Chrome_MouseMove(object sender, MouseEventArgs e)
if (((this._isMouseCaptured && (this.ContentRoot != null)) && (Application.Current != null)) && (Application.Current.MainWindow != null))
Point position = e.GetPosition(Application.Current.MainWindow);
GeneralTransform transform = this.ContentRoot.TransformToVisual(Application.Current.MainWindow);
if (transform != null)
Point point2 = transform.Transform(this._clickPoint);
this._windowPosition = transform.Transform(new Point(0.0, 0.0));
if (position.X < 0.0)
num = FindPositionY(point2, position, 0.0);
position = new Point(0.0, num);
if (position.X > base.Width)
num = FindPositionY(point2, position,
View Complete Post