AbsoluteLayout.SetLayoutFlags 方法

定义

重载

SetLayoutFlags(BindableObject, AbsoluteLayoutFlags)

设置视图的布局标志,该标志将用于解释添加到布局时其上设置的布局边界。

SetLayoutFlags(IView, AbsoluteLayoutFlags)

SetLayoutFlags(BindableObject, AbsoluteLayoutFlags)

Source:
AbsoluteLayout.cs
Source:
AbsoluteLayout.cs

设置视图的布局标志,该标志将用于解释添加到布局时其上设置的布局边界。

public:
 static void SetLayoutFlags(Microsoft::Maui::Controls::BindableObject ^ bindable, Microsoft::Maui::Layouts::AbsoluteLayoutFlags flags);
public static void SetLayoutFlags (Microsoft.Maui.Controls.BindableObject bindable, Microsoft.Maui.Layouts.AbsoluteLayoutFlags flags);
static member SetLayoutFlags : Microsoft.Maui.Controls.BindableObject * Microsoft.Maui.Layouts.AbsoluteLayoutFlags -> unit
Public Shared Sub SetLayoutFlags (bindable As BindableObject, flags As AbsoluteLayoutFlags)

参数

bindable
BindableObject

要在其上设置布局标志的视图。

flags
AbsoluteLayoutFlags

说明如何解释 bindable 的布局边界的 AbsoluteLayoutFlags

注解

此方法支持 AbsoluteLayout.LayoutFlags XAML 附加属性。 在 XAML 中,应用程序开发人员可以在 的子级AbsoluteLayout上为此属性的值指定以下AbsoluteLayoutFlags枚举值名称:

  • All :
  • None :
  • HeightProportional :
  • WidthProportional :
  • SizeProportional :
  • XProportional :
  • YProportional :
  • PositionProportional :

应用程序开发人员可以通过提供逗号分隔列表来组合上述任何值。 应用程序开发人员可以在添加视图后调用此方法来更新视图的布局标志。

适用于

SetLayoutFlags(IView, AbsoluteLayoutFlags)

Source:
AbsoluteLayout.cs
Source:
AbsoluteLayout.cs
public:
 void SetLayoutFlags(Microsoft::Maui::IView ^ view, Microsoft::Maui::Layouts::AbsoluteLayoutFlags flags);
public void SetLayoutFlags (Microsoft.Maui.IView view, Microsoft.Maui.Layouts.AbsoluteLayoutFlags flags);
member this.SetLayoutFlags : Microsoft.Maui.IView * Microsoft.Maui.Layouts.AbsoluteLayoutFlags -> unit
Public Sub SetLayoutFlags (view As IView, flags As AbsoluteLayoutFlags)

参数

view
IView

适用于