Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
UIElement Class
 IsVisible Property

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
UIElement..::.IsVisible Property

Gets a value indicating whether this element is visible in the user interface (UI). This is a dependency property.

Namespace:  System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)
Visual Basic (Declaration)
Public ReadOnly Property IsVisible As Boolean
Visual Basic (Usage)
Dim instance As UIElement
Dim value As Boolean

value = instance.IsVisible
C#
public bool IsVisible { get; }
Visual C++
public:
property bool IsVisible {
    bool get ();
}
JScript
public function get IsVisible () : boolean
XAML
You cannot set this property in XAML.

Property Value

Type: System..::.Boolean
true if the element is visible; otherwise, false.

Identifier field

IsVisibleProperty

Metadata properties set to true

None

Determination of the IsVisible value takes all factors of layout into account. In contrast, Visibility, which is a settable property, only indicates the intention to programmatically make an element visible or invisible.

Changes to the value of this property will typically raise the IsVisibleChanged event. There is no matching Microsoft .NET "On*" class handling override method that would allow some derived class to override that behavior and handle the event, but a class handler could still be attached directly with RegisterClassHandler.

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. In contrast, elements where IsEnabled is false will still participate in events and commands, and hit testing, but are also not focusable.

IsVisible is not intended to be used as a style trigger. Using IsVisible as a style trigger might have unpredictable results. IsVisible is intended for state checking by lower level input implementations.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker