如何设置从代码中不透明度应用程序任务背后 [英] how to set applicationbar opacity from code behind

查看:169
本文介绍了如何设置从代码中不透明度应用程序任务背后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图设置应用程序任务栏上的我的背后基于一个滑动条,用户可以随意控制上的代码的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!

这篇关于如何设置从代码中不透明度应用程序任务背后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆