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 |
的可绑定属性 FlowDirection。 |
HeightProperty |
的可绑定属性 Height。 |
MaximumHeightProperty |
的可绑定属性 MaximumHeight。 |
MaximumWidthProperty |
的可绑定属性 MaximumWidth。 |
MinimumHeightProperty |
的可绑定属性 MinimumHeight。 |
MinimumWidthProperty |
的可绑定属性 MinimumWidth。 |
PageProperty |
的可绑定属性 Page。 |
TitleProperty |
的可绑定属性 Title。 |
WidthProperty |
的可绑定属性 Width。 |
XProperty |
的可绑定属性 X。 |
YProperty |
的可绑定属性 Y。 |
属性
方法
事件
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) |
基于给定点获取可视化树元素的子元素的列表。 |
GetVisualTreeElements(IVisualTreeElement, Rect) |
获取基于矩形的可视化树元素子项的列表。 |
GetVisualTreeElements(IVisualTreeElement, Double, Double) |
获取基于给定 x、y 点的可视化树元素子项的列表。 |
GetVisualTreeElements(IVisualTreeElement, Double, Double, Double, Double) |
基于由其坐标定义的矩形(而不是像素)定义的矩形的可视化树元素子项的列表,这些坐标在平台单位中指定。 |
CaptureAsync(IWindow) |
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈