UIElement.IsVisible 屬性

定義

取得值,表示這個項目在 使用者介面 (UI)user interface (UI) 中是否可見。Gets a value indicating whether this element is visible in the 使用者介面 (UI)user interface (UI). 這是相依性屬性。This is a dependency property.

public:
 property bool IsVisible { bool get(); };
public bool IsVisible { get; }
member this.IsVisible : bool
Public ReadOnly Property IsVisible As Boolean

屬性值

如果項目可見,則為 true;否則為 falsetrue if the element is visible; otherwise, false.

備註

判斷 IsVisible 值會將版面配置的所有因素納入考慮。Determination of the IsVisible value takes all factors of layout into account. 相反地,Visibility是可設定的屬性,只表示以程式設計方式讓元素成為可見或隱藏的意圖。In contrast, Visibility, which is a settable property, only indicates the intention to programmatically make an element visible or invisible.

false IsVisible 的專案不會參與輸入事件(或命令),也不會影響配置的量值或排列行程、無法做為可設定焦點、不在定位順序中,而且不會在點擊測試中回報。Elements where IsVisible is false do not participate in input events (or commands), do not influence either the measure or arrange passes of layout, are not focusable, are not in a tab sequence, and will not be reported in hit testing. 相反地,IsEnabled false 的元素仍然會參與事件和命令,並進行點擊測試,但也無法獲得可設定的目標。In contrast, elements where IsEnabled is false will still participate in events and commands, and hit testing, but are also not focusable.

相依性屬性資訊Dependency Property Information

識別碼欄位Identifier field IsVisibleProperty
設定為 true 的中繼資料屬性Metadata properties set to true None

適用於