FlyoutBase FlyoutBase FlyoutBase Class

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

Syntax

Declaration

public class FlyoutBasepublic class FlyoutBasePublic Class FlyoutBase

Inheritance Hierarchy

Remarks

FlyoutBase derived classes

FlyoutBase is the parent class for Flyout and MenuFlyout.

Constructors summary

Provides base class initialization behavior for FlyoutBase derived classes.

Properties summary

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

Identifies the AllowFocusOnInteraction dependency property.

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

Identifies the AllowFocusWhenDisabled dependency property.

Identifies the AttachedFlyoutProperty XAML attached property.

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

Identifies the ElementSoundMode dependency property.

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

Identifies the LightDismissOverlayMode dependency property.

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

Prerelease. Identifies the OverlayInputPassThroughElement dependency property.

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

Identifies the Placement dependency property.

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

Methods summary

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.

Gets the flyout associated with the specified element.

Closes the flyout.

Associates the specified flyout with the specified FrameworkElement.

Shows the flyout placed in relation to the specified element.

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

Events summary

Occurs when the flyout is hidden.

Occurs when the flyout starts to be hidden.

Occurs when the flyout is shown.

Occurs before the flyout is shown.

Constructors

  • FlyoutBase()
    FlyoutBase()
    FlyoutBase()
    FlyoutBase()

    Provides base class initialization behavior for FlyoutBase derived classes.

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

Properties

  • AllowFocusOnInteraction
    AllowFocusOnInteraction
    AllowFocusOnInteraction
    AllowFocusOnInteraction

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

    public bool AllowFocusOnInteraction { get; set; }public bool AllowFocusOnInteraction { get; set; }Public ReadWrite Property AllowFocusOnInteraction As boolpublic bool AllowFocusOnInteraction { get; set; }
    <flyoutAllowFocusOnInteraction="bool"/>
    

    Property Value

    • bool
      bool
      bool

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

    Remarks

    Available starting in Windows 10, version 1607.

  • AllowFocusOnInteractionProperty
    AllowFocusOnInteractionProperty
    AllowFocusOnInteractionProperty
    AllowFocusOnInteractionProperty

    Identifies the AllowFocusOnInteraction dependency property.

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

    Property Value

  • AllowFocusWhenDisabled
    AllowFocusWhenDisabled
    AllowFocusWhenDisabled
    AllowFocusWhenDisabled

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

    public bool AllowFocusWhenDisabled { get; set; }public bool AllowFocusWhenDisabled { get; set; }Public ReadWrite Property AllowFocusWhenDisabled As boolpublic bool AllowFocusWhenDisabled { get; set; }

    Property Value

    • bool
      bool
      bool

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

  • AllowFocusWhenDisabledProperty
    AllowFocusWhenDisabledProperty
    AllowFocusWhenDisabledProperty
    AllowFocusWhenDisabledProperty

    Identifies the AllowFocusWhenDisabled dependency property.

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

    Property Value

  • AttachedFlyoutProperty
    AttachedFlyoutProperty
    AttachedFlyoutProperty
    AttachedFlyoutProperty

    Identifies the AttachedFlyoutProperty XAML attached property.

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

    Property Value

  • ElementSoundMode
    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 ElementSoundModepublic ElementSoundMode ElementSoundMode { get; set; }

    Property Value

    Remarks

    For more info, see Sound in UWP apps.

  • ElementSoundModeProperty
    ElementSoundModeProperty
    ElementSoundModeProperty
    ElementSoundModeProperty

    Identifies the ElementSoundMode dependency property.

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

    Property Value

  • LightDismissOverlayMode
    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 LightDismissOverlayModepublic LightDismissOverlayMode LightDismissOverlayMode { get; set; }

    Property Value

    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
    LightDismissOverlayModeProperty

    Identifies the LightDismissOverlayMode dependency property.

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

    Property Value

  • OverlayInputPassThroughElement
    OverlayInputPassThroughElement
    OverlayInputPassThroughElement
    OverlayInputPassThroughElement

    Prerelease. 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 DependencyObjectpublic DependencyObject OverlayInputPassThroughElement { get; set; }

    Property Value

  • OverlayInputPassThroughElementProperty
    OverlayInputPassThroughElementProperty
    OverlayInputPassThroughElementProperty
    OverlayInputPassThroughElementProperty

    Prerelease. Identifies the OverlayInputPassThroughElement dependency property.

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

    Property Value

  • Placement
    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 FlyoutPlacementModepublic FlyoutPlacementMode Placement { get; set; }
    <flyoutPlacement="flyoutPlacementModeMemberName" />
    

    Property Value

  • PlacementProperty
    PlacementProperty
    PlacementProperty
    PlacementProperty

    Identifies the Placement dependency property.

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

    Property Value

  • Target
    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 FrameworkElementpublic FrameworkElement Target { get; }
    <flyoutTarget="flyoutPlacementTarget" />
    

    Property Value

    Remarks

    Available starting in Windows 10, version 1607.

Methods

  • CreatePresenter()
    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 Controlprotected virtual Control CreatePresenter()

    Returns

    Remarks

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

  • GetAttachedFlyout(FrameworkElement)
    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 FlyoutBasepublic static FlyoutBase GetAttachedFlyout(FrameworkElement element)

    Parameters

    Returns

  • Hide()
    Hide()
    Hide()
    Hide()

    Closes the flyout.

    public void Hide()public void Hide()Public Function Hide() As voidpublic void Hide()
  • SetAttachedFlyout(FrameworkElement, FlyoutBase)
    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 voidpublic static void SetAttachedFlyout(FrameworkElement element, FlyoutBase value)

    Parameters

  • ShowAt(FrameworkElement)
    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 voidpublic void ShowAt(FrameworkElement placementTarget)

    Parameters

  • ShowAttachedFlyout(FrameworkElement)
    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 voidpublic static void ShowAttachedFlyout(FrameworkElement flyoutOwner)

    Parameters

Events

  • Closed
    Closed
    Closed
    Closed

    Occurs when the flyout is hidden.

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

    Occurs when the flyout starts to be hidden.

    public event TypedEventHandler Closingpublic event TypedEventHandler ClosingPublic Event Closingpublic event TypedEventHandler Closing
    <flyout Closing="eventhandler"/>
    

    Remarks

    Available starting in Windows 10, version 1607.

  • Opened
    Opened
    Opened
    Opened

    Occurs when the flyout is shown.

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

    Occurs before the flyout is shown.

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

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ComposableAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute

Details

Assembly

Windows.UI.Xaml.Controls.Primitives.dll