The Visibility of the Element.

Used to determine if the Element is displayed on screen, and can also affect its layout.

Possible values:

  • Visible - The element is displayed on-screen as usual.
  • Hidden - The element will not be displayed on-screen, but will still participate in and affect layout normally.
  • Collapsed - The element will not be displayed on-screen or participate in layout.

Example

In the following example, only two of the rectangles are visible. The second Rectangle is collapsed, so it's not taking up any space at all. The third Rectangle is hidden, so it takes up space, but is not visible. The last Rectangle has no Visibility set, so it defaults to being visible as usual.

<StackPanel>
    <Rectangle Visibility="Visible" Color="Red" Height="50"/>
    <Rectangle Visibility="Collapsed" Color="Green" Height="50"/>
    <Rectangle Visibility="Hidden" Color="Blue" Height="50"/>
    <Rectangle Color="Yellow" Height="50"/>
</StackPanel>

Location

Namespace
Fuse.Elements
Package
Fuse.Elements 2.9.1

Returns

Visibility

Possible Values

Visible

The element is visible and part of the layout

Collapsed

The element is invisible and takes up no space in layout

Hidden

The element is invisible but nonetheless occupies space in the layout (the layout of it and its children are calculated normally). Hidden elemenets nonetheless do not participate in hit testing.