Skip to main content

WindowClosingBehavior Enum

Definition

Assembly:Avalonia.Controls
Package:Avalonia

Describes how the Avalonia.Controls.Window.Closing event behaves in the presence of child windows.

public enum WindowClosingBehavior

Inheritance: Enum -> WindowClosingBehavior

Fields

NameDescription
OwnerAndChildWindowsWhen the owner window is closed, the child windows' Avalonia.Controls.Window.Closing event will be raised, followed by the owner window's Avalonia.Controls.Window.Closing events. A child canceling the close will result in the owner Window's close being cancelled.
OwnerWindowOnlyWhen the owner window is closed, only the owner window's Avalonia.Controls.Window.Closing event will be raised. This behavior is the same as WPF's.

OwnerAndChildWindows Field

When the owner window is closed, the child windows' Avalonia.Controls.Window.Closing event will be raised, followed by the owner window's Avalonia.Controls.Window.Closing events. A child canceling the close will result in the owner Window's close being cancelled.

public Avalonia.Controls.WindowClosingBehavior OwnerAndChildWindows

OwnerWindowOnly Field

When the owner window is closed, only the owner window's Avalonia.Controls.Window.Closing event will be raised. This behavior is the same as WPF's.

public Avalonia.Controls.WindowClosingBehavior OwnerWindowOnly