Dela via


FlyoutBase Class

Definition

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

public ref class FlyoutBase : DependencyObject
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class FlyoutBase : DependencyObject
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public class FlyoutBase : DependencyObject
Public Class FlyoutBase
Inherits DependencyObject
Inheritance
Object Platform::Object IInspectable DependencyObject FlyoutBase
Derived
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

FlyoutBase derived classes

FlyoutBase is the parent class for Flyout and MenuFlyout.

XAML attached properties

FlyoutBase is the host service class for a XAML attached property.

In order to support XAML processor access to the attached properties, and also to expose equivalent get and set operations to code, each XAML attached property has a pair of Get and Set accessor methods. Another way to get or set the value in code is to use the dependency property system, calling either GetValue or SetValue and passing the identifier field as the dependency property identifier.

Attached property Description
AttachedFlyout Gets or sets the flyout attached to a FrameworkElement.

Version history

Windows version SDK version Value added
1607 14393 AllowFocusOnInteraction
1607 14393 AllowFocusWhenDisabled
1607 14393 Closing
1607 14393 ElementSoundMode
1607 14393 LightDismissOverlayMode
1607 14393 Target
1703 15063 OverlayInputPassThroughElement
1709 16299 OnProcessKeyboardAccelerators
1709 16299 TryInvokeKeyboardAccelerator
1809 17763 AreOpenCloseAnimationsEnabled
1809 17763 InputDevicePrefersPrimaryCommands
1809 17763 IsOpen
1809 17763 ShowAt(DependencyObject,FlyoutShowOptions)
1809 17763 ShowMode
1903 18362 IsConstrainedToRootBounds
1903 18362 ShouldConstrainToRootBounds
1903 18362 XamlRoot

Constructors

FlyoutBase()

Provides base class initialization behavior for FlyoutBase derived classes.

Properties

AllowFocusOnInteraction

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

AllowFocusOnInteractionProperty

Identifies the AllowFocusOnInteraction dependency property.

AllowFocusWhenDisabled

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

AllowFocusWhenDisabledProperty

Identifies the AllowFocusWhenDisabled dependency property.

AreOpenCloseAnimationsEnabled

Gets or sets a value that indicates whether animations are played when the flyout is opened or closed.

AreOpenCloseAnimationsEnabledProperty

Identifies the AreOpenCloseAnimationsEnabled dependency property.

AttachedFlyoutProperty

Identifies the FlyoutBase.AttachedFlyout XAML attached property.

Dispatcher

Gets the CoreDispatcher that this object is associated with. The CoreDispatcher represents a facility that can access the DependencyObject on the UI thread even if the code is initiated by a non-UI thread.

(Inherited from DependencyObject)
ElementSoundMode

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

ElementSoundModeProperty

Identifies the ElementSoundMode dependency property.

InputDevicePrefersPrimaryCommands

Gets a value that indicates whether the input device used to open the flyout does not easily open the secondary commands.

InputDevicePrefersPrimaryCommandsProperty

Identifies the InputDevicePrefersPrimaryCommands dependency property.

IsConstrainedToRootBounds

Gets a value that indicates whether the flyout is shown within the bounds of the XAML root.

IsOpen

Gets a value that indicates whether the flyout is open.

IsOpenProperty

Identifies the IsOpen dependency property.

LightDismissOverlayMode

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

LightDismissOverlayModeProperty

Identifies the LightDismissOverlayMode dependency property.

OverlayInputPassThroughElement

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

OverlayInputPassThroughElementProperty

Identifies the OverlayInputPassThroughElement dependency property.

Placement

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

PlacementProperty

Identifies the Placement dependency property.

ShouldConstrainToRootBounds

Gets or sets a value that indicates whether the flyout should be shown within the bounds of the XAML root.

ShouldConstrainToRootBoundsProperty

Identifies the ShouldConstrainToRootBounds dependency property.

ShowMode

Gets or sets a value that indicates how a flyout behaves when shown.

ShowModeProperty

Identifies the ShowMode dependency property.

Target

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

TargetProperty

Identifies the Target dependency property.

XamlRoot

Gets or sets the XamlRoot in which this flyout is being viewed.

Attached Properties

AttachedFlyout

Gets or sets the flyout attached to a FrameworkElement.

Methods

ClearValue(DependencyProperty)

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.

GetAnimationBaseValue(DependencyProperty)

Returns any base value established for a dependency property, which would apply in cases where an animation is not active.

(Inherited from DependencyObject)
GetAttachedFlyout(FrameworkElement)

Gets the flyout associated with the specified element.

GetValue(DependencyProperty)

Returns the current effective value of a dependency property from a DependencyObject.

(Inherited from DependencyObject)
Hide()

Closes the flyout.

OnProcessKeyboardAccelerators(ProcessKeyboardAcceleratorEventArgs)

Called just before a keyboard shortcut (accelerator) is processed in your app. Invoked whenever application code or internal processes call ProcessKeyboardAccelerators. Override this method to influence the default accelerator handling.

ReadLocalValue(DependencyProperty)

Returns the local value of a dependency property, if a local value is set.

(Inherited from DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

Registers a notification function for listening to changes to a specific DependencyProperty on this DependencyObject instance.

(Inherited from DependencyObject)
SetAttachedFlyout(FrameworkElement, FlyoutBase)

Associates the specified flyout with the specified FrameworkElement.

SetValue(DependencyProperty, Object)

Sets the local value of a dependency property on a DependencyObject.

(Inherited from DependencyObject)
ShowAt(DependencyObject, FlyoutShowOptions)

Shows the flyout placed in relation to the specified element using the specified options.

ShowAt(FrameworkElement)

Shows the flyout placed in relation to the specified element.

ShowAttachedFlyout(FrameworkElement)

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

TryInvokeKeyboardAccelerator(ProcessKeyboardAcceleratorEventArgs)

Attempts to invoke a keyboard shortcut (accelerator).

UnregisterPropertyChangedCallback(DependencyProperty, Int64)

Cancels a change notification that was previously registered by calling RegisterPropertyChangedCallback.

(Inherited from DependencyObject)

Events

Closed

Occurs when the flyout is hidden.

Closing

Occurs when the flyout starts to be hidden.

Opened

Occurs when the flyout is shown.

Opening

Occurs before the flyout is shown.

Applies to

See also