如何设置从代码中不透明度应用程序任务背后
问题描述:
我一直在试图设置应用程序任务栏上的我的背后基于一个滑动条,用户可以随意控制上的代码的MainPage。我有很多的信息在我的应用程序任务栏,所以我在XAML创建它,除了这应该取决于滑块的值更改不透明度。我不确定但如何从代码隐藏访问的MainPage应用程序任务栏透明度?
I have been attempting to set the applicationbar on my MainPage in the code behind based on a slider bar that the user may control at will. I have a lot of information in my applicationbar so I created it in xaml, except for the opacity which should change depending on the values of the slider. I am unsure though of how to access the MainPage applicationbar opacity from the codebehind?
答
要改变现有的不透明度值应用程序任务栏,请使用以下
To change the opacity value of a currently existing ApplicationBar, use the following
(ApplicationBar as ApplicationBar).Opacity = num;
其中num是您首选的透明度!
where num is your opacity of preference!