how to set applicationbar opacity from code behind

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?


Try this:

 ApplicationBar = new ApplicationBar();
 ApplicationBar.IsMenuEnabled = true;
 ApplicationBarIconButton button1 = new ApplicationBarIconButton(new Uri("/Images/", UriKind.Relative));
 button1.Text = "Search";
 ApplicationBarMenuItem menuItem1 = new ApplicationBarMenuItem("MenuItem 1");

To change the opacity value of a currently existing ApplicationBar, use the following

(ApplicationBar as ApplicationBar).Opacity = num;

where num is your opacity of preference!

Need Your Help

Need my program to crash if audio file is missing


Pretty straightforward question. My program uses some wav files, and I'd like for it to crash if any of the files is missing. Here's the particular section of my code:

MVVM Light how to determinte which records changed

.net wpf wcf mvvm mvvm-light

in MVVM Light, if I have a datagrid binded(2 way) to an obersvable collection, and when I finally hit update after editing couple records and adding new ones, how do I determine which ones have been

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.