Layout 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。
public ref class Layout abstract : Microsoft::Maui::Controls::View, Microsoft::Maui::Controls::IBindableLayout, Microsoft::Maui::Controls::IPaddingElement, Microsoft::Maui::ILayout, Microsoft::Maui::IVisualTreeElement, System::Collections::Generic::ICollection<Microsoft::Maui::IView ^>, System::Collections::Generic::IEnumerable<Microsoft::Maui::IView ^>, System::Collections::Generic::IList<Microsoft::Maui::IView ^>
[Microsoft.Maui.Controls.ContentProperty("Children")]
public abstract class Layout : Microsoft.Maui.Controls.View, Microsoft.Maui.Controls.IBindableLayout, Microsoft.Maui.Controls.IPaddingElement, Microsoft.Maui.ILayout, Microsoft.Maui.IVisualTreeElement, System.Collections.Generic.ICollection<Microsoft.Maui.IView>, System.Collections.Generic.IEnumerable<Microsoft.Maui.IView>, System.Collections.Generic.IList<Microsoft.Maui.IView>
[<Microsoft.Maui.Controls.ContentProperty("Children")>]
type Layout = class
inherit View
interface ILayout
interface IView
interface IElement
interface ITransform
interface IContainer
interface IList<IView>
interface ICollection<IView>
interface seq<IView>
interface IEnumerable
interface ISafeAreaView
interface IPadding
interface IBindableLayout
interface IPaddingElement
interface IVisualTreeElement
[<Microsoft.Maui.Controls.ContentProperty("Children")>]
type Layout = class
inherit View
interface ILayout
interface IView
interface IElement
interface ITransform
interface IContainer
interface IList<IView>
interface ICollection<IView>
interface seq<IView>
interface IEnumerable
interface ISafeAreaView
interface IPadding
interface ICrossPlatformLayout
interface IBindableLayout
interface IPaddingElement
interface IVisualTreeElement
Public MustInherit Class Layout
Inherits View
Implements IBindableLayout, ICollection(Of IView), IEnumerable(Of IView), ILayout, IList(Of IView), IPaddingElement, IVisualTreeElement
- 继承
- 派生
- 属性
- 实现
注解
的 Layout 子类型包括 ContentView、 ScrollView和 Layout,如下图所示。
Children的 Layout 属性包含参数化类型 的子级列表,该类型T
View必须为 。 由于 Layout 本身是 的 View子类,因此允许 Layout保存子布局、滚动区域、& 等。
构造函数
Layout() |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
字段
_layoutManager |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
CascadeInputTransparentProperty |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
ControlsLayoutMapper |
已过时.
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
IsClippedToBoundsProperty |
的 IsClippedToBounds可绑定属性。 |
PaddingProperty |
的 Padding可绑定属性。 |
propertyMapper |
表示视图的内部 PropertyMapper。 (继承自 View) |
属性
AnchorX |
获取或设置任何转换操作的中心点相对于元素边界的 X 分量。 这是一种可绑定属性。 (继承自 VisualElement) |
AnchorY |
获取或设置任何转换操作的中心点相对于元素边界的 Y 分量。 这是一种可绑定属性。 (继承自 VisualElement) |
AutomationId |
获取或设置允许自动化框架查找此元素并与其交互的值。 (继承自 Element) |
Background |
获取或设置 Brush 将用于填充元素背景的 。 这是一种可绑定属性。 (继承自 VisualElement) |
BackgroundColor |
获取或设置将 Color 填充元素背景的 。 这是一种可绑定属性。 (继承自 VisualElement) |
Batched |
获取一个值,该值指示对此元素进行了批处理更改。 (继承自 VisualElement) |
Behaviors |
获取与此元素关联的 对象的列表 Behavior 。 这是一种只读可绑定属性。 (继承自 VisualElement) |
BindingContext |
获取或设置一个 对象,该对象包含属于此 BindableObject的绑定属性的目标属性。 这是一种可绑定属性。 (继承自 BindableObject) |
Bounds |
获取元素的边界(以与设备无关的单位为单位)。 (继承自 VisualElement) |
CascadeInputTransparent |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
Children |
供 Microsoft.Maui.Controls 平台内部使用。 |
class |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 (继承自 NavigableElement) |
ClassId |
获取或设置用于标识语义相似元素集合的值。 (继承自 Element) |
Clip |
指定元素的剪辑区域。 这是一种可绑定属性。 (继承自 VisualElement) |
Count |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
DesiredSize |
获取在布局流程的度量传递过程中此元素计算所得的大小。 (继承自 VisualElement) |
DisableLayout |
获取一个值,该值指示禁用此元素的布局。 (继承自 VisualElement) |
Dispatcher |
获取创建此可绑定对象时可用的调度程序,否则尝试查找最近的可用调度程序 (可能为窗口/应用的) 。 (继承自 BindableObject) |
EffectControlProvider |
供 .NET MAUI 内部使用。 (继承自 Element) |
Effects |
获取或设置将在运行时应用于元素的样式和属性。 (继承自 Element) |
FlowDirection |
获取或设置布局流方向。 这是一种可绑定属性。 (继承自 VisualElement) |
Frame |
获取或设置此元素驻留在屏幕上的帧。 (继承自 VisualElement) |
GestureController |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 (继承自 View) |
GestureRecognizers |
与此视图关联的手势识别器的集合。 (继承自 View) |
Handler |
获取或设置 IViewHandler 与此元素关联的 。 (继承自 VisualElement) |
Height |
获取此元素的当前呈现高度。 这是一种只读可绑定属性。 (继承自 VisualElement) |
HeightRequest |
获取或设置此元素的所需高度替代。 这是一种可绑定属性。 (继承自 VisualElement) |
HorizontalOptions |
获取或设置 , LayoutOptions 它定义元素在布局周期中的布局方式。 这是一种可绑定属性。 (继承自 View) |
Id |
获取一个值,该值可用于在应用程序的整个运行过程中唯一标识元素。 (继承自 Element) |
IgnoreSafeArea |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
InputTransparent |
获取或设置一个值,该值指示此元素是否在用户交互期间响应命中测试。 这是一种可绑定属性。 (继承自 VisualElement) |
IsClippedToBounds |
获取或设置一个值,该值确定布局是否应将其子级剪裁到其边界。 |
IsEnabled |
获取或设置一个值,该值指示是否在用户界面中启用此元素。 这是一种可绑定属性。 (继承自 VisualElement) |
IsEnabledCore |
此值表示累积 IsEnabled 值。 如果值将更改,重写此属性的所有类型还需要调用 RefreshIsEnabledProperty () 方法。 (继承自 VisualElement) |
IsFocused |
获取一个值,该值指示当前是否聚焦此元素。 这是一种可绑定属性。 (继承自 VisualElement) |
IsInPlatformLayout |
获取或设置一个值,该值指示此元素当前正在经历平台布局周期。 (继承自 VisualElement) |
IsLoaded |
指示元素是否连接到main对象树。 (继承自 VisualElement) |
IsPlatformEnabled |
获取或设置一个值,该值指示是否启用此元素的平台等效元素。 (继承自 VisualElement) |
IsPlatformStateConsistent |
获取或设置一个值,该值指示此元素当前与平台等效元素状态一致。 (继承自 VisualElement) |
IsReadOnly |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
IsVisible |
获取或设置一个值,该值确定此元素是否在屏幕上可见并占用布局中的空间。 这是一种可绑定属性。 (继承自 VisualElement) |
Item[Int32] |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
LogicalChildren |
已过时.
供 Microsoft.Maui.Controls 平台内部使用。 (继承自 Element) |
Margin |
获取或设置视图的边距。 (继承自 View) |
MaximumHeightRequest |
获取或设置元素在布局期间将请求的最大高度。 这是一种可绑定属性。 (继承自 VisualElement) |
MaximumWidthRequest |
获取或设置元素在布局期间将请求的最大宽度。 这是一种可绑定属性。 (继承自 VisualElement) |
MinimumHeightRequest |
获取或设置元素在布局期间将请求的最小高度。 这是一种可绑定属性。 (继承自 VisualElement) |
MinimumWidthRequest |
获取或设置元素在布局期间将请求的最小宽度。 这是一种可绑定属性。 (继承自 VisualElement) |
Navigation |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 (继承自 NavigableElement) |
NavigationProxy |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 (继承自 NavigableElement) |
Opacity |
获取或设置呈现元素时应用于元素的不透明度值。 此值的范围是 0 到 1;超出此范围的值将设置为最接近的有效值。 这是一种可绑定属性。 (继承自 VisualElement) |
Padding |
获取或设置布局的内部填充。 |
Parent |
获取或设置此元素的父 Element 元素。 (继承自 Element) |
RealParent |
供 .NET MAUI 内部使用。 (继承自 Element) |
Resources |
获取或设置本地资源字典。 (继承自 VisualElement) |
Rotation |
获取或设置呈现元素时围绕 Z 轴(仿射旋转)的旋转角度(以度为单位)。 这是一种可绑定属性。 (继承自 VisualElement) |
RotationX |
获取或设置呈现元素时围绕 X 轴(透视旋转)的旋转角度(以度为单位)。 这是一种可绑定属性。 (继承自 VisualElement) |
RotationY |
获取或设置呈现元素时围绕 Y 轴(透视旋转)的旋转角度(以度为单位)。 这是一种可绑定属性。 (继承自 VisualElement) |
Scale |
获取或设置应用于元素的比例因子。 这是一种可绑定属性。 (继承自 VisualElement) |
ScaleX |
获取或设置要应用于 X 方向的缩放值。 这是一种可绑定属性。 (继承自 VisualElement) |
ScaleY |
获取或设置要应用于 Y 方向的缩放值。 这是一种可绑定属性。 (继承自 VisualElement) |
Shadow |
获取或设置 由 元素投射的阴影效果。 这是一种可绑定属性。 (继承自 VisualElement) |
Style |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 (继承自 NavigableElement) |
StyleClass |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 (继承自 NavigableElement) |
StyleId |
获取或设置用于唯一地标识元素的用户定义的值。 (继承自 Element) |
TranslationX |
获取或设置元素的 X 转换增量。 这是一种可绑定属性。 (继承自 VisualElement) |
TranslationY |
获取或设置元素的 Y 转换增量。 这是一种可绑定属性。 (继承自 VisualElement) |
Triggers |
获取与此元素关联的对象列表 TriggerBase 。 这是一种只读可绑定属性。 (继承自 VisualElement) |
VerticalOptions |
获取或设置 , LayoutOptions 它定义元素在布局周期中的布局方式。 这是一种可绑定属性。 (继承自 View) |
Visual |
获取或设置替代 IVisual 元素视觉外观的实现。 这是一种可绑定属性。 (继承自 VisualElement) |
Width |
获取此元素的当前宽度。 这是一种只读可绑定属性。 (继承自 VisualElement) |
WidthRequest |
获取或设置此元素的所需宽度替代。 这是一种可绑定属性。 (继承自 VisualElement) |
Window |
Window获取与元素关联的 。 这是一种只读可绑定属性。 (继承自 VisualElement) |
X |
获取此元素的当前 X 位置。 这是一种只读可绑定属性。 (继承自 VisualElement) |
Y |
获取此元素的当前 Y 位置。 这是一种只读可绑定属性。 (继承自 VisualElement) |
ZIndex |
获取或设置布局中元素的从前到后 z 索引。 这是一种可绑定属性。 (继承自 VisualElement) |
方法
Add(IView) |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
AddLogicalChild(Element) |
Element将 添加到逻辑子级。 (继承自 Element) |
ApplyBindings() |
将所有当前绑定应用于 BindingContext。 (继承自 BindableObject) |
Arrange(Rect) |
定位子对象并确定元素的大小。 (继承自 VisualElement) |
ArrangeOverride(Rect) |
允许子类重写 Arrange(Rect) ,即使必须显式实现 接口,以避免与旧 Arrange(Rect) 方法冲突。 (继承自 VisualElement) |
BatchBegin() |
表示开始对元素属性进行批更改。 如果更改了更多的属性值,这可提高性能。 (继承自 VisualElement) |
BatchCommit() |
表示元素命令批处理结束,且现在应提交命令。 (继承自 VisualElement) |
ChangeVisualState() |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 (继承自 View) |
Clear() |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
ClearLogicalChildren() |
删除所有子 Element级 。 (继承自 Element) |
ClearValue(BindableProperty) |
清除以前为可绑定属性设置的任何值。 (继承自 BindableObject) |
ClearValue(BindablePropertyKey) |
清除以前为可绑定属性设置的任何值(由其键标识)。 (继承自 BindableObject) |
CoerceValue(BindableProperty) |
强制指定可绑定属性的值。 这是通过调用 BindableProperty.CoerceValueDelegate 指定的可绑定属性来完成的。 (继承自 BindableObject) |
CoerceValue(BindablePropertyKey) |
强制指定可绑定属性的值。 这是通过调用 BindableProperty.CoerceValueDelegate 指定的可绑定属性来完成的。 (继承自 BindableObject) |
Contains(IView) |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
CopyTo(IView[], Int32) |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
CreateLayoutManager() |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
CrossPlatformArrange(Rect) |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
CrossPlatformMeasure(Double, Double) |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
EffectIsAttached(String) |
供 .NET MAUI 内部使用。 (继承自 Element) |
FindByName(String) |
返回具有指定名称的元素。 (继承自 Element) |
Focus() |
尝试将焦点设定到此元素上。 (继承自 VisualElement) |
GetChildElements(Point) |
获取在视觉上位于指定 |
GetEnumerator() |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
GetRendererOverrides<T>() |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 (继承自 View) |
GetValue(BindableProperty) |
返回给定可绑定属性中包含的值。 (继承自 BindableObject) |
IndexOf(IView) |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
Insert(Int32, IView) |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
InsertLogicalChild(Int32, Element) |
将 Element 插入到位于指定索引处的逻辑子级。 (继承自 Element) |
InvalidateMeasure() |
将元素的当前度量值标记为无效。 (继承自 VisualElement) |
InvalidateMeasureNonVirtual(InvalidationTrigger) |
使元素的度量值失效。 (继承自 VisualElement) |
InvalidateMeasureOverride() |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
IsSet(BindableProperty) |
确定可绑定属性是否存在并且是否设置了值。 (继承自 BindableObject) |
Layout(Rect) |
在布局循环中更新元素的边界。 (继承自 VisualElement) |
MapInputTransparent(ILayoutHandler, Layout) |
已过时.
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
MapInputTransparent(LayoutHandler, Layout) |
已过时.
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
Measure(Double, Double, MeasureFlags) |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
MeasureOverride(Double, Double) |
提供一种允许子类重写 Measure(Double, Double, MeasureFlags) 的方法,即使必须显式实现 接口,以避免与旧的 Measure 方法冲突。 (继承自 VisualElement) |
OnAdd(Int32, IView) |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
OnBindingContextChanged() |
每当 View 的绑定上下文发生更改时就会调用。 (继承自 View) |
OnChildAdded(Element) |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 (继承自 VisualElement) |
OnChildRemoved(Element, Int32) |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 (继承自 VisualElement) |
OnChildrenReordered() |
引发 ChildrenReordered 事件。 (继承自 VisualElement) |
OnClear() |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
OnHandlerChanged() |
在派生类中重写时, 应引发 HandlerChanged 事件。 (继承自 Element) |
OnHandlerChanging(HandlerChangingEventArgs) |
在派生类中重写时, 应引发 HandlerChanging 事件。 (继承自 Element) |
OnInsert(Int32, IView) |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
OnMeasure(Double, Double) |
进行布局测量时调用的方法。 (继承自 VisualElement) |
OnParentChanged() |
在派生类中重写时, 应引发 ParentChanged 事件。 (继承自 Element) |
OnParentChanging(ParentChangingEventArgs) |
在派生类中重写时, 应引发 ParentChanging 事件。 (继承自 Element) |
OnParentSet() |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 (继承自 NavigableElement) |
OnPropertyChanged(String) |
更改绑定属性时调用的方法。 (继承自 Element) |
OnPropertyChanging(String) |
引发 PropertyChanging 事件。 (继承自 BindableObject) |
OnRemove(Int32, IView) |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
OnSizeAllocated(Double, Double) |
在布局周期中设置元素大小时调用的方法。 实现此方法可为此事件添加类处理。 (继承自 VisualElement) |
OnUpdate(Int32, IView, IView) |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
PlatformSizeChanged() |
表示此元素大小的平台等效元素已更改,可能需要新的布局周期。 (继承自 VisualElement) |
RefreshIsEnabledProperty() |
如果发生某些事件并且属性的值将发生更改, IsEnabledCore 则必须始终调用此方法。 (继承自 VisualElement) |
Remove(IView) |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
RemoveAt(Int32) |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
RemoveBinding(BindableProperty) |
从可绑定属性中删除以前设置的绑定。 (继承自 BindableObject) |
RemoveDynamicResource(BindableProperty) |
删除以前设置的动态资源。 (继承自 Element) |
RemoveLogicalChild(Element) |
从逻辑子级中删除特定 Element 的第一个匹配项。 (继承自 Element) |
SetBinding(BindableProperty, BindingBase) |
将绑定分配给可绑定属性。 (继承自 BindableObject) |
SetDynamicResource(BindableProperty, String) |
BindableProperty使用提供的键设置要通过 DynamicResource 更新的此元素的 属性。 (继承自 Element) |
SetValue(BindableProperty, Object) |
设置指定的可绑定属性的值。 (继承自 BindableObject) |
SetValue(BindablePropertyKey, Object) |
设置指定的可绑定属性的值。 (继承自 BindableObject) |
SetValueCore(BindableProperty, Object, SetValueFlags) |
供 Microsoft.Maui.Controls 平台内部使用。 (继承自 BindableObject) |
SetValueFromRenderer(BindableProperty, Object) |
供 .NET MAUI 内部使用。 (继承自 Element) |
SetValueFromRenderer(BindablePropertyKey, Object) |
供 .NET MAUI 内部使用。 (继承自 Element) |
SizeAllocated(Double, Double) |
在布局周期期间调用的方法,以指示子树布局的开始。 (继承自 VisualElement) |
UnapplyBindings() |
从当前上下文中删除所有当前绑定。 (继承自 BindableObject) |
Unfocus() |
在此元素上取消设置键盘焦点。 (继承自 VisualElement) |
事件
BatchCommitted |
通过调用 BatchCommit()提交一批属性更改时发生。 (继承自 VisualElement) |
BindingContextChanged |
当 BindingContext 属性的值更改时发生。 (继承自 BindableObject) |
ChildAdded |
每当将子元素添加到 元素时引发。 (继承自 Element) |
ChildRemoved |
每当从元素中删除子元素时引发。 (继承自 Element) |
ChildrenReordered |
当此元素的子元素的顺序更改时发生。 (继承自 VisualElement) |
DescendantAdded |
每当将子元素添加到元素的子树时引发。 (继承自 Element) |
DescendantRemoved |
每当从元素子树中删除子元素时引发。 (继承自 Element) |
FocusChangeRequested |
已过时.
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 (继承自 VisualElement) |
Focused |
在此元素聚焦时发生。 (继承自 VisualElement) |
HandlerChanged |
每当元素的处理程序发生更改时引发。 (继承自 Element) |
HandlerChanging |
每当元素的处理程序开始更改时引发。 (继承自 Element) |
Loaded |
在构造元素并将其添加到对象树时发生。 (继承自 VisualElement) |
MeasureInvalidated |
当元素的当前度量值失效时发生。 (继承自 VisualElement) |
ParentChanged |
每当元素的父级发生更改时引发。 (继承自 Element) |
ParentChanging |
每当元素的 开始更改时引发。 (继承自 Element) |
PropertyChanged |
在属性值更改时发生。 (继承自 BindableObject) |
PropertyChanging |
在属性值更改时发生。 (继承自 BindableObject) |
SizeChanged |
在元素的大小更改时发生。 (继承自 VisualElement) |
Unfocused |
此元素未聚焦时发生。 (继承自 VisualElement) |
Unloaded |
当元素不再连接到main对象树时发生。 (继承自 VisualElement) |
显式接口实现
IBindableLayout.Children |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
IContextFlyoutElement.ContextFlyout |
ContextFlyout获取视图的 。 菜单浮出控件、菜单浮出控件子项和菜单浮出控件分隔符可以添加到上下文浮出控件。 (继承自 Element) |
IDynamicResourceHandler.SetDynamicResource(BindableProperty, String) |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 (继承自 BindableObject) |
IEffectControlProvider.RegisterEffect(Effect) |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 (继承自 Element) |
IElement.Handler |
获取或设置 Element 的视图处理程序。 (继承自 VisualElement) |
IElement.Parent |
获取元素的父级。 (继承自 Element) |
IElementController.Descendants() |
供 .NET MAUI 内部使用。 (继承自 Element) |
IElementController.LogicalChildren |
供 .NET MAUI 内部使用。 (继承自 Element) |
IElementController.SetValueFromRenderer(BindableProperty, Object) |
供 .NET MAUI 内部使用。 (继承自 Element) |
IEnumerable.GetEnumerator() |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
IGestureController.CompositeGestureRecognizers |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 (继承自 View) |
IHotReloadableView.Reload() |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 (继承自 View) |
IHotReloadableView.ReloadHandler |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 (继承自 View) |
IHotReloadableView.TransferState(IView) |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 (继承自 View) |
ILayout.ClipsToBounds |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
INameScope.RegisterName(String, Object) |
供 .NET MAUI 内部使用。 (继承自 Element) |
INameScope.UnregisterName(String) |
供 .NET MAUI 内部使用。 (继承自 Element) |
IPaddingElement.OnPaddingPropertyChanged(Thickness, Thickness) |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
IPaddingElement.PaddingDefaultValueCreator() |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
IPropertyMapperView.GetPropertyMapperOverrides() |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 (继承自 View) |
IReplaceableView.ReplacedView |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 (继承自 View) |
IToolTipElement.ToolTip |
表示一个小矩形弹出窗口,当用户将指针停留在视图上时,该窗口显示视图用途的简短说明。 (继承自 Element) |
IView.Arrange(Rect) |
定位子元素并确定元素的大小。 (继承自 VisualElement) |
IView.Background |
获取将填充视图背景的画图。 (继承自 VisualElement) |
IView.Clip |
获取用于定义视图内容的大纲的路径。 (继承自 VisualElement) |
IView.FlowDirection |
眼睛扫描 UI 元素的方向 (继承自 VisualElement) |
IView.Height |
获取 IView 的指定高度。 (继承自 VisualElement) |
IView.HorizontalLayoutAlignment |
确定容器中此元素排列的水平方面 (继承自 View) |
IView.InvalidateArrange() |
调用的方法,使此视图的布局失效。 (继承自 VisualElement) |
IView.InvalidateMeasure() |
指示此视图的当前度量值不再有效,必须在下一次度量传递期间重新计算。 (继承自 VisualElement) |
IView.IsFocused |
获取一个值,该值指示此视图当前是否聚焦。 (继承自 VisualElement) |
IView.Margin |
Margin 表示视图与其相邻视图之间的距离。 (继承自 View) |
IView.MaximumHeight |
获取 IView 的指定最大高度约束,介于零和双精度之间。正无穷大。 (继承自 VisualElement) |
IView.MaximumWidth |
获取 IView 的指定最大宽度约束(介于零和双精度之间)。正无穷大。 (继承自 VisualElement) |
IView.Measure(Double, Double) |
汇报视图的大小。 (继承自 VisualElement) |
IView.MinimumHeight |
获取 IView 的指定最小高度约束,介于零和双精度之间。正无穷大。 (继承自 VisualElement) |
IView.MinimumWidth |
获取 IView 的指定最小宽度约束(介于零和双精度之间)。正无穷大。 (继承自 VisualElement) |
IView.Semantics |
向每个视图添加语义,以便进行辅助功能 (继承自 VisualElement) |
IView.Shadow |
在目标视图周围绘制阴影。 (继承自 VisualElement) |
IView.VerticalLayoutAlignment |
确定容器中此元素排列的垂直方面 (继承自 View) |
IView.Visibility |
获取一个值,该值确定此视图是否应是可视化树的一部分。 (继承自 VisualElement) |
IView.Width |
获取 IView 的指定宽度。 (继承自 VisualElement) |
IVisualElementController.EffectiveFlowDirection |
供 .NET MAUI 内部使用。 (继承自 VisualElement) |
IVisualElementController.InvalidateMeasure(InvalidationTrigger) |
供 .NET MAUI 内部使用。 (继承自 VisualElement) |
IVisualTreeElement.GetVisualChildren() |
为所有 Layout 元素提供基类。 使用布局元素在 Microsoft.Maui.Controls 应用程序中定位子元素并调整其大小。 |
IVisualTreeElement.GetVisualChildren() |
获取元素的可视子级的只读列表。 (继承自 Element) |
IVisualTreeElement.GetVisualParent() |
获取元素的可视父级。 (继承自 Element) |
扩展方法
适用于
另请参阅
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈