Flyout​Base Flyout​Base Flyout​Base Class

Definition

Represents the base class for flyout controls, such as Flyout and MenuFlyout.

public class FlyoutBase : DependencyObject, IFlyoutBase, IFlyoutBase2, IFlyoutBase3, IFlyoutBaseOverridespublic class FlyoutBase : DependencyObject, IFlyoutBase, IFlyoutBase2, IFlyoutBase3, IFlyoutBaseOverridesPublic Class FlyoutBase Inherits DependencyObject Implements IFlyoutBase, IFlyoutBase2, IFlyoutBase3, IFlyoutBaseOverrides
Inheritance
FlyoutBaseFlyoutBaseFlyoutBase
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Inherited Members

Inherited methods

Inherited properties

Remarks

FlyoutBase derived classes

FlyoutBase is the parent class for Flyout and MenuFlyout.

Constructors

FlyoutBase() FlyoutBase() FlyoutBase()

Provides base class initialization behavior for FlyoutBase derived classes.

protected FlyoutBase()protected FlyoutBase()Protected Sub New()
Attributes

Properties

AllowFocusOnInteraction AllowFocusOnInteraction AllowFocusOnInteraction

Gets or sets a value that indicates whether the element automatically gets focus when the user interacts with it.

public PlatForm::Boolean AllowFocusOnInteraction { get; set; }public bool AllowFocusOnInteraction { get; set; }Public ReadWrite Property AllowFocusOnInteraction As bool
<flyoutAllowFocusOnInteraction="bool"/>
Value
bool bool bool

true if the element gets focus when a user interacts with it; otherwise, false.

Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Remarks

Available starting in Windows 10, version 1607.

AllowFocusOnInteractionProperty AllowFocusOnInteractionProperty AllowFocusOnInteractionProperty

Identifies the AllowFocusOnInteraction dependency property.

public static DependencyProperty AllowFocusOnInteractionProperty { get; }public static DependencyProperty AllowFocusOnInteractionProperty { get; }Public Static ReadOnly Property AllowFocusOnInteractionProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the AllowFocusOnInteraction dependency property.

Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

AllowFocusWhenDisabled AllowFocusWhenDisabled AllowFocusWhenDisabled

Gets or sets a value that specifies whether the control can receive focus when it's disabled.

public PlatForm::Boolean AllowFocusWhenDisabled { get; set; }public bool AllowFocusWhenDisabled { get; set; }Public ReadWrite Property AllowFocusWhenDisabled As bool
Value
bool bool bool

true if the control can receive focus when it's disabled; otherwise, false.

Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

AllowFocusWhenDisabledProperty AllowFocusWhenDisabledProperty AllowFocusWhenDisabledProperty

Identifies the AllowFocusWhenDisabled dependency property.

public static DependencyProperty AllowFocusWhenDisabledProperty { get; }public static DependencyProperty AllowFocusWhenDisabledProperty { get; }Public Static ReadOnly Property AllowFocusWhenDisabledProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the AllowFocusWhenDisabled dependency property.

Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

AttachedFlyoutProperty AttachedFlyoutProperty AttachedFlyoutProperty

Identifies the FlyoutBase.AttachedFlyout XAML attached property.

public static DependencyProperty AttachedFlyoutProperty { get; }public static DependencyProperty AttachedFlyoutProperty { get; }Public Static ReadOnly Property AttachedFlyoutProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the FlyoutBase.AttachedFlyout XAML attached property.

Attributes

ElementSoundMode ElementSoundMode ElementSoundMode

Gets or sets a value that specifies the control's preference for whether it plays sounds.

public ElementSoundMode ElementSoundMode { get; set; }public ElementSoundMode ElementSoundMode { get; set; }Public ReadWrite Property ElementSoundMode As ElementSoundMode
Value
ElementSoundMode ElementSoundMode ElementSoundMode

An enumeration value that specifies the control's preference for whether it plays sounds. The default is Default.

Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Remarks

For more info, see Sound in UWP apps.

See Also

ElementSoundModeProperty ElementSoundModeProperty ElementSoundModeProperty

Identifies the ElementSoundMode dependency property.

public static DependencyProperty ElementSoundModeProperty { get; }public static DependencyProperty ElementSoundModeProperty { get; }Public Static ReadOnly Property ElementSoundModeProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the ElementSoundMode dependency property.

Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

LightDismissOverlayMode LightDismissOverlayMode LightDismissOverlayMode

Gets or sets a value that specifies whether the area outside of a light-dismiss UI is darkened.

public LightDismissOverlayMode LightDismissOverlayMode { get; set; }public LightDismissOverlayMode LightDismissOverlayMode { get; set; }Public ReadWrite Property LightDismissOverlayMode As LightDismissOverlayMode
Value
LightDismissOverlayMode LightDismissOverlayMode LightDismissOverlayMode

A value of the enumeration that specifies whether the area outside of a light-dismiss UI is darkened. The default is Auto.

Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Remarks

Transient UI, such as a Flyout or MenuFlyout, closes when you click or tap outside of it. This is called light-dismiss. "Overlay" refers to the area outside of a light-dismiss UI.

By default, the "overlay" is darkened on the Xbox, and not darkened on other devices families. You can set LightDismissOverlayMode to On to make your app darken the "overlay" area on all device families, or set it to Off to not darken the "overlay" area on all device families.

LightDismissOverlayModeProperty LightDismissOverlayModeProperty LightDismissOverlayModeProperty

Identifies the LightDismissOverlayMode dependency property.

public static DependencyProperty LightDismissOverlayModeProperty { get; }public static DependencyProperty LightDismissOverlayModeProperty { get; }Public Static ReadOnly Property LightDismissOverlayModeProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the LightDismissOverlayMode dependency property.

Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

OverlayInputPassThroughElement OverlayInputPassThroughElement OverlayInputPassThroughElement

Gets or sets an element that should receive pointer input events even when underneath the flyout's overlay.

public DependencyObject OverlayInputPassThroughElement { get; set; }public DependencyObject OverlayInputPassThroughElement { get; set; }Public ReadWrite Property OverlayInputPassThroughElement As DependencyObject
Value
DependencyObject DependencyObject DependencyObject

The element that should receive pointer input events even when underneath the flyout's overlay.

Attributes
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

OverlayInputPassThroughElementProperty OverlayInputPassThroughElementProperty OverlayInputPassThroughElementProperty

Identifies the OverlayInputPassThroughElement dependency property.

public static DependencyProperty OverlayInputPassThroughElementProperty { get; }public static DependencyProperty OverlayInputPassThroughElementProperty { get; }Public Static ReadOnly Property OverlayInputPassThroughElementProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the OverlayInputPassThroughElement dependency property.

Attributes
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Placement Placement Placement

Gets or sets the default placement to be used for the flyout, in relation to its placement target.

public FlyoutPlacementMode Placement { get; set; }public FlyoutPlacementMode Placement { get; set; }Public ReadWrite Property Placement As FlyoutPlacementMode
<flyoutPlacement="flyoutPlacementModeMemberName" />
Value
FlyoutPlacementMode FlyoutPlacementMode FlyoutPlacementMode

A named constant of the enumeration that indicates where the flyout is placed in relation to its placement target. The default is Top.

Attributes
See Also

PlacementProperty PlacementProperty PlacementProperty

Identifies the Placement dependency property.

public static DependencyProperty PlacementProperty { get; }public static DependencyProperty PlacementProperty { get; }Public Static ReadOnly Property PlacementProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the Placement dependency property.

Attributes

Target Target Target

Gets the element to use as the flyout's placement target.

public FrameworkElement Target { get; }public FrameworkElement Target { get; }Public ReadOnly Property Target As FrameworkElement
<flyoutTarget="flyoutPlacementTarget" />
Value
FrameworkElement FrameworkElement FrameworkElement

The element to use as the flyout's placement target.

Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Remarks

Available starting in Windows 10, version 1607.

Methods

CreatePresenter() CreatePresenter() CreatePresenter()

When overridden in a derived class, initializes a control to show the flyout content as appropriate for the derived control. Note: This method has no base class implementation and must be overridden in a derived class.

protected virtual Control CreatePresenter()protected virtual Control CreatePresenter()Protected Overridable Function CreatePresenter() As Control
Returns

The control that displays the content of the flyout.

Attributes

Remarks

This method has no base class implementation and must be overridden in a derived class.

GetAttachedFlyout(FrameworkElement) GetAttachedFlyout(FrameworkElement) GetAttachedFlyout(FrameworkElement)

Gets the flyout associated with the specified element.

public static FlyoutBase GetAttachedFlyout(FrameworkElement element)public static FlyoutBase GetAttachedFlyout(FrameworkElement element)Public Static Function GetAttachedFlyout(element As FrameworkElement) As FlyoutBase
Parameters
element
FrameworkElement FrameworkElement FrameworkElement

The element for which to get the associated flyout.

Returns

The flyout attached to the specified element.

Attributes

Hide() Hide() Hide()

Closes the flyout.

public void Hide()public void Hide()Public Function Hide() As void
Attributes

SetAttachedFlyout(FrameworkElement, FlyoutBase) SetAttachedFlyout(FrameworkElement, FlyoutBase) SetAttachedFlyout(FrameworkElement, FlyoutBase)

Associates the specified flyout with the specified FrameworkElement.

public static void SetAttachedFlyout(FrameworkElement element, FlyoutBase value)public static void SetAttachedFlyout(FrameworkElement element, FlyoutBase value)Public Static Function SetAttachedFlyout(element As FrameworkElement, value As FlyoutBase) As void
Parameters
element
FrameworkElement FrameworkElement FrameworkElement

The element to associate the flyout with.

value
FlyoutBase FlyoutBase FlyoutBase

The flyout to associate with the specified element.

Attributes

ShowAt(FrameworkElement) ShowAt(FrameworkElement) ShowAt(FrameworkElement)

Shows the flyout placed in relation to the specified element.

public void ShowAt(FrameworkElement placementTarget)public void ShowAt(FrameworkElement placementTarget)Public Function ShowAt(placementTarget As FrameworkElement) As void
Parameters
placementTarget
FrameworkElement FrameworkElement FrameworkElement

The element to use as the flyout's placement target.

Attributes

ShowAttachedFlyout(FrameworkElement) ShowAttachedFlyout(FrameworkElement) ShowAttachedFlyout(FrameworkElement)

Shows the flyout associated with the specified element, if any.

public static void ShowAttachedFlyout(FrameworkElement flyoutOwner)public static void ShowAttachedFlyout(FrameworkElement flyoutOwner)Public Static Function ShowAttachedFlyout(flyoutOwner As FrameworkElement) As void
Parameters
flyoutOwner
FrameworkElement FrameworkElement FrameworkElement

The element for which to show the associated flyout.

Attributes

Events

Closed Closed Closed

Occurs when the flyout is hidden.

public event EventHandler Closedpublic event EventHandler ClosedPublic Event Closed
<flyout Closed="eventhandler"/>
Attributes

Closing Closing Closing

Occurs when the flyout starts to be hidden.

public event TypedEventHandler Closingpublic event TypedEventHandler ClosingPublic Event Closing
<flyout Closing="eventhandler"/>
Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Remarks

Available starting in Windows 10, version 1607.

Opened Opened Opened

Occurs when the flyout is shown.

public event EventHandler Openedpublic event EventHandler OpenedPublic Event Opened
<flyout Opened="eventhandler"/>
Attributes

Opening Opening Opening

Occurs before the flyout is shown.

public event EventHandler Openingpublic event EventHandler OpeningPublic Event Opening
<flyout Opening="eventhandler"/>
Attributes

See Also