Layout.Padding 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置布局的内部填充。
public:
property Microsoft::Maui::Thickness Padding { Microsoft::Maui::Thickness get(); void set(Microsoft::Maui::Thickness value); };
public Microsoft.Maui.Thickness Padding { get; set; }
member this.Padding : Microsoft.Maui.Thickness with get, set
Public Property Padding As Thickness
属性值
布局的粗细值。 默认值为粗细,所有值都设置为 0。
注解
填充是布局边界与其子级应排列到的边界区域之间的间距。
下面的示例演示如何设置布局的填充以嵌入其子级。
var stackLayout = new StackLayout {
Padding = new Thickness (10, 10, 10, 20),
Children = {
new Label {Text = "Hello"},
new Label {Text = "World"}
}
}
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将推出:在整个 2024 年,我们将逐步取消以“GitHub 问题”作为内容的反馈机制,并将其替换为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈