UIElement.IsVisible UIElement.IsVisible UIElement.IsVisible UIElement.IsVisible Property

定義

取得值,表示這個項目在 使用者介面 (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.

項目所在IsVisiblefalse參與輸入的事件 (或命令),請執行不影響量值或排列傳遞的版面配置、 不是可設定焦點、 不是在索引標籤順序中,和將不會報告在點擊測試。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. 相較之下,項目所在IsEnabledfalse仍要參與的事件和命令,以及點擊測試,但也不是可設定焦點。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
若要設定的中繼資料屬性 trueMetadata properties set to true None

適用於