Class WindowExtensions
Provides extension methods for a System.Windows.Window.
Inheritance
System.Object
    WindowExtensions
  
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.ToString()
    
    Namespace: Sartorius.SAF.Presentation.Controls.Extensions
Assembly: Sartorius.SAF.Presentation.Controls.dll
Syntax
public static class WindowExtensions
  Methods
View SourceConceal(Window)
Conceals the window.
Declaration
public static void Conceal(this Window window)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Windows.Window | window | The window to conceal.  | 
      
Reveal(Window)
Reveals the window.
Declaration
public static void Reveal(this Window window)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Windows.Window | window | The concealed window.  | 
      
ShowDialogOverlayAware(Window)
Shows the window as a modal window while only disabling windows that are completely overlaid by an overlay effect.
Declaration
public static bool? ShowDialogOverlayAware(this Window window)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Windows.Window | window | The window.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Nullable<System.Boolean> | A System.Nullable<T> value of type System.Boolean that specifies whether the activity was accepted (true) or canceled (false). The return value is the value of the System.Windows.Window.DialogResult property before a window closes.  | 
      
Remarks
Using this method will only deactivate windows that are completely overlaid.
Examples
The following example shows how to show a modal dialog that does only disable it's parent window.
        var arguments = new OverlayArguments(sourceContent);
        using (overlayEffect.Apply(arguments))
        {
            // this would overlay only the source window defined by sourceContent but ShowDialog disables
            // all windows in the UI thread. So this is not the right way!!
            //window.ShowDialog();
            // this will only disable overlaid windows
            window.ShowDialogOverlayAware();
        }
        // this will do the overlaying and correctly disable only overlayed windows.
  See Also
System.Windows.Window.ShowDialog()