BlipFace.Helpers.WindowSettings.Attach C# (CSharp) Method

Attach() private method

private Attach ( ) : void
return void
        private void Attach()
        {
            if (this.window != null)
            {
                this.window.Closing += new CancelEventHandler(window_Closing);
                this.window.Initialized += new EventHandler(window_Initialized);
            }
        }

Usage Example

Example #1
0
 /// <summary>
 /// Called when Save is changed on an object.
 /// </summary>
 private static void OnSaveInvalidated(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
 {
     Window window = dependencyObject as Window;
     if (window != null)
     {
         if ((bool)e.NewValue)
         {
             WindowSettings settings = new WindowSettings(window);
             settings.Attach();
         }
     }
 }