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

落爺英雄遲暮 提交于 2020-01-01 14:07:04

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/28097153/workaround-for-visibilty-hidden-state-windows-phone-8-1-app-development

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!