FlyoutBase 類別

定義

表示飛出視窗控制項的基類,例如 飛出視窗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
繼承
Object Platform::Object IInspectable DependencyObject FlyoutBase
衍生
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

FlyoutBase 衍生類別

FlyoutBase 是 FlyoutMenuFlyout的父類別。

XAML 附加屬性

FlyoutBase 是 XAML 附加屬性的主機服務類別。

為了支援 XAML 處理器對附加屬性的存取,以及公開對等 的 getset 作業給程式碼,每個 XAML 附加屬性都有一對 Get 和 Set 存取子方法。 在程式碼中取得或設定值的另一種方式是使用相依性屬性系統,呼叫 GetValueSetValue 並將識別碼欄位傳遞為相依性屬性識別碼。

附加屬性 Description
AttachedFlyout 取得或設定附加至 FrameworkElement的飛出視窗。

版本歷程記錄

Windows 版本 SDK 版本 新增值
1607 14393 AllowFocusOnInteraction
1607 14393 AllowFocusWhenDisabled
1607 14393 關閉
1607 14393 ElementSoundMode
1607 14393 LightDismissOverlayMode
1607 14393 目標
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

建構函式

FlyoutBase()

提供 FlyoutBase 衍生類別的基類初始化行為。

屬性

AllowFocusOnInteraction

取得或設定值,這個值表示當使用者與其互動時,專案是否會自動取得焦點。

AllowFocusOnInteractionProperty

識別 AllowFocusOnInteraction 相依性屬性。

AllowFocusWhenDisabled

取得或設定值,指定控制項在停用時是否可以接收焦點。

AllowFocusWhenDisabledProperty

識別 AllowFocusWhenDisabled 相依性屬性。

AreOpenCloseAnimationsEnabled

取得或設定值,這個值表示當飛出視窗開啟或關閉時,是否播放動畫。

AreOpenCloseAnimationsEnabledProperty

識別 AreOpenCloseAnimationsEnabled 相依性屬性。

AttachedFlyoutProperty

識別 FlyoutBase.AttachedFlyout XAML 附加屬性。

Dispatcher

取得這個 物件相關聯的 CoreDispatcherCoreDispatcher代表可在 UI 執行緒上存取DependencyObject的功能,即使程式碼是由非 UI 執行緒起始也一樣。

(繼承來源 DependencyObject)
ElementSoundMode

取得或設定值,指定控制項是否播放音效的喜好設定。

ElementSoundModeProperty

識別 ElementSoundMode 相依性屬性。

InputDevicePrefersPrimaryCommands

取得值,指出用來開啟飛出視窗的輸入裝置是否不容易開啟次要命令。

InputDevicePrefersPrimaryCommandsProperty

識別 InputDevicePrefersPrimaryCommands 相依性屬性。

IsConstrainedToRootBounds

取得值,這個值表示飛出視窗是否顯示在 XAML 根目錄的界限內。

IsOpen

取得值,這個值表示飛出視窗是否開啟。

IsOpenProperty

識別 IsOpen 相依性屬性。

LightDismissOverlayMode

取得或設定值,這個值會指定 淺色關閉 UI 外部的區域是否變深。

LightDismissOverlayModeProperty

識別 LightDismissOverlayMode 相依性屬性。

OverlayInputPassThroughElement

取得或設定即使飛出視窗重迭下方的指標輸入事件,也應該接收指標輸入事件的專案。

OverlayInputPassThroughElementProperty

識別 OverlayInputPassThroughElement 相依性屬性。

Placement

取得或設定要用於飛出視窗的預設放置位置,相對於其放置目標。

PlacementProperty

識別 Placement 相依性屬性。

ShouldConstrainToRootBounds

取得或設定值,這個值表示是否應該在 XAML 根目錄的界限內顯示飛出視窗。

ShouldConstrainToRootBoundsProperty

識別 ShouldConstrainToRootBounds 相依性屬性。

ShowMode

取得或設定值,這個值表示顯示飛出視窗的行為。

ShowModeProperty

識別 ShowMode 相依性屬性。

Target

取得要當做飛出視窗放置目標的 元素。

TargetProperty

識別 目標 相依性屬性。

XamlRoot

取得或設定檢視這個飛出視窗的 XamlRoot。

附加屬性

AttachedFlyout

取得或設定附加至 FrameworkElement的飛出視窗。

方法

ClearValue(DependencyProperty)

清除相依性屬性的本機值。

(繼承來源 DependencyObject)
CreatePresenter()

在衍生類別中覆寫時,初始化 控制項,以針對衍生控制項顯示飛出視窗內容。 注意:這個方法沒有基類實作,而且必須在衍生類別中覆寫。

GetAnimationBaseValue(DependencyProperty)

傳回為相依性屬性建立的任何基底值,如果動畫未使用中,則適用此屬性。

(繼承來源 DependencyObject)
GetAttachedFlyout(FrameworkElement)

取得與指定專案相關聯的飛出視窗。

GetValue(DependencyProperty)

DependencyObject傳回相依性屬性的目前有效值。

(繼承來源 DependencyObject)
Hide()

關閉飛出視窗。

OnProcessKeyboardAccelerators(ProcessKeyboardAcceleratorEventArgs)

在應用程式中處理快速鍵 (快速鍵) 之前呼叫。 每當應用程式程式碼或內部進程呼叫 ProcessKeyboardAccelerators時叫用。 覆寫此方法以影響預設加速器處理。

ReadLocalValue(DependencyProperty)

如果已設定本機值,則傳回相依性屬性的本機值。

(繼承來源 DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

註冊通知函式,以接聽此DependencyObject實例上特定DependencyProperty的變更。

(繼承來源 DependencyObject)
SetAttachedFlyout(FrameworkElement, FlyoutBase)

將指定的飛出視窗與指定的 FrameworkElement 產生關聯。

SetValue(DependencyProperty, Object)

設定 DependencyObject上相依性屬性的本機值。

(繼承來源 DependencyObject)
ShowAt(DependencyObject, FlyoutShowOptions)

使用指定的選項顯示相對於指定專案放置的飛出視窗。

ShowAt(FrameworkElement)

顯示相對於指定專案放置的飛出視窗。

ShowAttachedFlyout(FrameworkElement)

顯示與指定專案相關聯的飛出視窗,如果有的話。

TryInvokeKeyboardAccelerator(ProcessKeyboardAcceleratorEventArgs)

嘗試叫用快速鍵 (快速鍵) 。

UnregisterPropertyChangedCallback(DependencyProperty, Int64)

取消先前透過呼叫 RegisterPropertyChangedCallback註冊的變更通知。

(繼承來源 DependencyObject)

事件

Closed

發生于隱藏飛出視窗時。

Closing

發生于飛出視窗開始隱藏時。

Opened

發生于顯示飛出視窗時。

Opening

發生于顯示飛出視窗之前。

適用於

另請參閱