Nikhil Gupta
Nikhil Gupta

Reputation: 172

Workaround for Visibilty.Hidden state- Windows Phone 8.1 App Development

I cannot assign the Visibility State to Hidden for a ProgressBar. I've read that in the WPF model, Hidden denotes a visibility state where the object should not render, but should still occupy space in a WPF layout. Silverlight does not support Hidden. Is there a workaround to get the same effect as Hidden in my app?

Upvotes: 4

Views: 1361

Answers (1)

Rob Caplan - MSFT
Rob Caplan - MSFT

Reputation: 21919

Visibility.Hidden is WPF only. Both Silverlight and Windows.UI.Xaml use only Visibility.Visible or Collapsed.

You can set the UIElement's Opacity property to zero to prevent it from rendering. This value is also readily animatiable so you can fade the element in and out smoothly.

Upvotes: 5

Related Questions