private void Maximizing_Completed(object sender, EventArgs e) { maximizingStoryboard.Stop(); maximizingStoryboard.Remove(this); this.Width = HostPanel.ActualWidth; this.Height = HostPanel.ActualHeight; this.Position = new Point(0, 0); Focus(); OnMaximized(EventArgs.Empty); }