Table of Contents

Class ContentDialogHostBehavior

Namespace
Wpf.Ui.Controls
Assembly
Wpf.Ui.dll

Provides attached behavior helpers for dialog hosts implemented with ContentPresenter.

Exposes attached properties to enable the behavior on any ContentPresenter, which will manage a Wpf.Ui.Controls.ContentDialogHostController for runtime dialog lifecycle handling:

Typical usage: attach ContentDialogHostBehavior.IsEnabled="True" to a ContentPresenter placed in the window to enable dialog isolation behavior for dialogs injected into that presenter.

public static class ContentDialogHostBehavior
Inheritance
ContentDialogHostBehavior
Inherited Members

Fields

IsDisableSiblingsEnabledProperty

Attached property which controls whether sibling elements should be disabled while a dialog is active. The value is forwarded to the internal controller managed by the behavior.

public static readonly DependencyProperty IsDisableSiblingsEnabledProperty

Field Value

DependencyProperty

IsEnabledProperty

Attached property that enables the behavior on a ContentPresenter when set to true. When enabled the behavior will create and manage an internal controller that reacts to Content changes.

public static readonly DependencyProperty IsEnabledProperty

Field Value

DependencyProperty

Methods

GetIsDisableSiblingsEnabled(ContentPresenter)

Helper for getting IsDisableSiblingsEnabledProperty from element.

[AttachedPropertyBrowsableForType(typeof(ContentPresenter))]
public static bool GetIsDisableSiblingsEnabled(ContentPresenter element)

Parameters

element ContentPresenter

ContentPresenter to read IsDisableSiblingsEnabledProperty from.

Returns

bool

IsDisableSiblingsEnabled property value.

GetIsEnabled(ContentPresenter)

Helper for getting IsEnabledProperty from element.

[AttachedPropertyBrowsableForType(typeof(ContentPresenter))]
public static bool GetIsEnabled(ContentPresenter element)

Parameters

element ContentPresenter

ContentPresenter to read IsEnabledProperty from.

Returns

bool

IsEnabled property value.

SetIsDisableSiblingsEnabled(ContentPresenter, bool)

Helper for setting IsDisableSiblingsEnabledProperty on element.

public static void SetIsDisableSiblingsEnabled(ContentPresenter element, bool value)

Parameters

element ContentPresenter

ContentPresenter to set IsDisableSiblingsEnabledProperty on.

value bool

IsDisableSiblingsEnabled property value.

SetIsEnabled(ContentPresenter, bool)

Helper for setting IsEnabledProperty on element.

public static void SetIsEnabled(ContentPresenter element, bool value)

Parameters

element ContentPresenter

ContentPresenter to set IsEnabledProperty on.

value bool

IsEnabled property value.