Reputation: 10865
Is it just me or the property Visibility.Hidden on buttons are not included in Windows Phone 7?
Because as far as I know there are three types of Visibility properties for a control, either Visible, Collapsed or Hidden.
I need the hidden value, why it only shows Visible or Collapsed?
Upvotes: 5
Views: 3026
Reputation: 125
See , There are only two properties available Button.visibility=visibility.collapsed
or Visibility.Visible
. If you want to hide it turn the opacity feature to minimum value or you can always disable the button
Upvotes: 4
Reputation: 1521
Like you said, Visible and Collapsed are the only options you have for the Visibility of the control.
The hidden functionality you want can be achieved by setting the visibilty to Visible and the Opacity to 0. Take care, your button will be hidden, but still clickable, and the layout of the UI will not be affected.
If you want to hide the button and adjust the UI accordingly, set the visibility to Collapsed. This will re-order the UI.
Upvotes: 8
Reputation: 30830
Visibility.Hidden is not included in Silverlight. It is only available in WPF as of now. And since WP7 is Silverlight, you don't get it in there, too.
Related question on Silverlight.
Upvotes: 4