/// <summary> /// Called when [loaded]. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param> private void OnLoaded(object sender, System.Windows.RoutedEventArgs e) { this.app = new MainApp(); this.Source = this.app.RunImageSource(); this.MouseMove += this.OnMouseMove; this.MouseWheel += this.OnMouseWheel; this.MouseDown += this.OnMouseDown; this.MouseUp += this.OnMouseUp; this.MouseLeave += this.OnMouseLeave; this.LostMouseCapture += this.OnMouseLostCapture; CompositionTarget.Rendering += this.OnRendering; CompositionTarget.Rendering += this.CheckInit; }