The Visibility of the
Used to determine if the
Element is displayed on screen, and can also affect its layout.
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.
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>
- Fuse.Elements 1.11.2
The element is visible and part of the layout
The element is invisible and takes up no space in layout
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.