Visibility

Visibility (defined on UIElement) might sound like a strange property to talk about in the context of layout, but it is indeed relevant in the case of WPF. In WPF, an element’s Visibility property actually isn’t Boolean but rather a three-state Visibility enumeration. Its values and meanings are as follows:

Image Visible—The element is rendered and participates in layout.

Image Collapsed—The element is invisible and does not participate in layout.

Hidden—The element is invisible yet still participates in layout.

A Collapsed element effectively ...

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.