VisualElement.IsVisible 属性

定义

获取或设置一个值,该值确定此元素是否在屏幕上可见并占用布局中的空间。 这是一种可绑定属性。

public:
 property bool IsVisible { bool get(); void set(bool value); };
[System.ComponentModel.TypeConverter(typeof(Microsoft.Maui.Controls.VisualElement+VisibilityConverter))]
public bool IsVisible { get; set; }
[<System.ComponentModel.TypeConverter(typeof(Microsoft.Maui.Controls.VisualElement+VisibilityConverter))>]
member this.IsVisible : bool with get, set
Public Property IsVisible As Boolean

属性值

true 如果应呈现元素,则为 ;否则为 false。 默认值为 true

属性

注解

当元素已 IsVisible 设置为 false 时,它将不再占用布局中的空间或有资格接收任何类型的输入事件。

适用于