UIElement.Visibility Property
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
'Declaration <LocalizabilityAttribute(LocalizationCategory.None, Readability:=Readability.Unreadable)> _ Public Property Visibility As Visibility 'Usage Dim instance As UIElement Dim value As Visibility value = instance.Visibility instance.Visibility = value
/** @property */ public Visibility get_Visibility () /** @property */ public void set_Visibility (Visibility value)
public function get Visibility () : Visibility public function set Visibility (value : Visibility)
<object Visibility="Visibility" .../>
Property Value
A value of the enumeration. The default value is Visible.Setting this property affects the value of IsVisible, which in turn may raise the IsVisibleChanged event. However, IsVisible has other factors that influence it, for instance the visibility settings of parents that contain it.
Elements where Visibility is not Visible do not participate in input events (or commands), do not influence either the Measure or Arrange passes of layout, are not in a tab sequence, and will not be reported in hit testing.
The following example implements a handler that references two different named buttons that are intended to be a mutually exclusive pair in the user interface. Prior to running the actual program logic associated with the button, the button itself is set to be Visibility.Hidden, and the other button in the pair is set to Visibility.Visible.
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.