Flyout class

Applies to Windows and Windows Phone

Represents a control that displays lightweight UI that is either information, or requires user interaction. Unlike a dialog, a Flyout can be light dismissed by clicking or tapping off of it.

Inheritance

Object
  DependencyObject
    FlyoutBase
      Flyout

Syntax


public class Flyout : FlyoutBase



<Flyout>
    singleUIElement
</Flyout>


XAML Values

singleUIElement

A single object element that declares the content. This must be an object that has UIElement in its hierarchy (plain strings don't work). This can be a container, such as a Panel derived class, so that multiple content items within the Flyout can be arranged in layout.

Attributes

[ContentProperty("Name=Content")]
[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06030000)]
[WebHostHidden()]

Members

The Flyout class has these types of members:

Constructors

The Flyout class has these constructors.

ConstructorDescription
Flyout Initializes a new instance of the Flyout class.

 

Events

The Flyout class has these events.

EventDescription
Closed Occurs when the flyout is hidden. (Inherited from FlyoutBase)
Opened Occurs when the flyout is shown. (Inherited from FlyoutBase)
Opening Occurs before the flyout is shown. (Inherited from FlyoutBase)

 

Methods

The Flyout class has these methods. It also inherits methods from the Object class.

MethodDescription
ClearValue Clears the local value of a dependency property. (Inherited from DependencyObject)
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. (Inherited from FlyoutBase)
GetAnimationBaseValue Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject)
GetValue Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject)
Hide Closes the flyout. (Inherited from FlyoutBase)
ReadLocalValue Returns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject)
SetValue Sets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject)
ShowAt Shows the flyout placed in relation to the specified element. (Inherited from FlyoutBase)

 

Properties

The Flyout class has these properties.

PropertyAccess typeDescription

Content

Read/writeGets or sets the content of the Flyout.

ContentProperty

Read-onlyGets the identifier for the Content dependency property.

Dispatcher

Read-onlyGets the CoreDispatcher that this object is associated with. (Inherited from DependencyObject)

FlyoutPresenterStyle

Read/writeGets or sets an instance Style applied to the Flyout content.

FlyoutPresenterStyleProperty

Read-onlyGets the identifier for the FlyoutPresenterStyle dependency property.

Placement

Read/writeGets or sets the default placement to be used for the flyout, in relation to its placement target. (Inherited from FlyoutBase)

 

Remarks

A Flyout displays a message that requires user interaction.

Flyout control

Use a Flyout control for collecting information, for displaying more info, or for warnings and confirmations. Unlike a dialog, a Flyout does not create a separate window, and does not block other user interaction. To show a menu of items, use a MenuFlyout instead. For more info, including XAML and code examples, see Quickstart: Adding a Flyout.

A Flyout control (or MenuFlyout) is used as the value of the Button.Flyout property. This is usually set in XAML as part of a UI definition of the page. Button is the only control that has a dedicated Flyout property. To associate a Flyout with other controls, use the FlyoutBase.AttachedFlyout attached property. When set as Button.Flyout, the Flyout displays when the button is tapped or otherwise invoked. When a Flyout is assigned to other UI elements using FlyoutBase.AttachedFlyout, you must call either the ShowAt method or the static ShowAttachedFlyout method to display the flyout.

In addition to the members listed in this reference topic, there are other members of the base class FlyoutBase that are often used in typical Flyout scenarios:

Requirements

Minimum supported client

Windows 8.1 [Windows Store apps only]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

FlyoutBase
FlyoutPresenter
Quickstart: Adding a Flyout
Attached properties overview
XAML Flyout and MenuFlyout sample
Related controls
Button.Flyout
FlyoutBase.AttachedFlyout
MenuFlyout
Controls list
Controls by function

 

 

Show:
© 2014 Microsoft