Window 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
public ref class Window : Microsoft::Maui::Controls::NavigableElement, Microsoft::Maui::IMenuBarElement, Microsoft::Maui::IToolbarElement, Microsoft::Maui::IWindow
[Microsoft.Maui.Controls.ContentProperty("Page")]
public class Window : Microsoft.Maui.Controls.NavigableElement, Microsoft.Maui.IMenuBarElement, Microsoft.Maui.IToolbarElement, Microsoft.Maui.IWindow
[<Microsoft.Maui.Controls.ContentProperty("Page")>]
type Window = class
inherit NavigableElement
interface IWindow
interface ITitledElement
interface IElement
interface IToolbarElement
interface IMenuBarElement
Public Class Window
Inherits NavigableElement
Implements IMenuBarElement, IToolbarElement, IWindow
- 繼承
- 屬性
- 實作
建構函式
Window() | |
Window(Page) |
欄位
ControlsWindowMapper | |
FlowDirectionProperty |
的 FlowDirectionBindable 屬性。 |
HeightProperty |
的 HeightBindable 屬性。 |
MaximumHeightProperty |
的 MaximumHeightBindable 屬性。 |
MaximumWidthProperty |
的 MaximumWidthBindable 屬性。 |
MinimumHeightProperty |
的 MinimumHeightBindable 屬性。 |
MinimumWidthProperty |
的 MinimumWidthBindable 屬性。 |
PageProperty |
的 PageBindable 屬性。 |
TitleProperty |
的 TitleBindable 屬性。 |
WidthProperty |
的 WidthBindable 屬性。 |
XProperty |
的 XBindable 屬性。 |
YProperty |
的 YBindable 屬性。 |
屬性
方法
事件
Activated | |
Backgrounding | |
BindingContextChanged |
發生於 BindingContext 屬性的值變更時。 (繼承來源 BindableObject) |
ChildAdded |
每當子專案加入至 項目時引發。 (繼承來源 Element) |
ChildRemoved |
每當從專案中移除子項目時引發。 (繼承來源 Element) |
Created | |
Deactivated | |
DescendantAdded |
每當子專案加入至專案的子樹時引發。 (繼承來源 Element) |
DescendantRemoved |
每當從專案子樹中移除子項目時引發。 (繼承來源 Element) |
Destroying | |
DisplayDensityChanged | |
HandlerChanged |
每當元素的處理程式變更時引發。 (繼承來源 Element) |
HandlerChanging |
每當元素的處理程序開始變更時引發。 (繼承來源 Element) |
ModalPopped | |
ModalPopping | |
ModalPushed | |
ModalPushing | |
ParentChanged |
每當專案的父代變更時引發。 (繼承來源 Element) |
ParentChanging |
每當元素開始變更時引發。 (繼承來源 Element) |
PopCanceled | |
PropertyChanged |
當屬性值變更時發生。 (繼承來源 BindableObject) |
PropertyChanging |
屬性值正在變更時發生。 (繼承來源 BindableObject) |
Resumed | |
SizeChanged | |
Stopped |
明確介面實作
擴充方法
GetPropertyIfSet<T>(BindableObject, BindableProperty, T) | |
SetAppTheme<T>(BindableObject, BindableProperty, T, T) | |
SetAppThemeColor(BindableObject, BindableProperty, Color, Color) | |
SetBinding(BindableObject, BindableProperty, String, BindingMode, IValueConverter, String) |
建立並將繫結套用至屬性。 |
FindByName<T>(Element, String) | |
ToHandler(IElement, IMauiContext) | |
ToPlatform(IElement, IMauiContext) | |
GetVisualElementWindow(IVisualTreeElement) |
如果元素包含在其中,則取得包含可視化樹狀結構的視窗。 |
GetVisualTreeDescendants(IVisualTreeElement) |
取得子系的整個階層,做為指定可視化樹狀結構專案的子系列表。 |
GetVisualTreeElements(IVisualTreeElement, Point) |
根據指定的Point取得視覺化樹狀結構專案的子系列表。 |
GetVisualTreeElements(IVisualTreeElement, Rect) |
根據矩形取得可視化樹狀結構專案子系的清單。 |
GetVisualTreeElements(IVisualTreeElement, Double, Double) |
根據指定的 x、y 點,取得可視化樹狀結構專案子系的清單。 |
GetVisualTreeElements(IVisualTreeElement, Double, Double, Double, Double) |
根據以平台單位而非圖元指定之座標所定義的矩形,取得可視化樹狀專案子系的清單。 |
CaptureAsync(IWindow) |
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應