Visual studio feeds

All Visual Studio blogs in one place

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Google+

Contact

Email:
Subject:
Message:
Anti-spam: How many eyes has a typical person?

Follow us on FB

Search

Silverlight for Windows Phone Programming Tip #3

AddThis Social Bookmark Button
Application bars play an important role in the UI of many phone applications. An application bar can contain up to four buttons (and five menu items) giving the user quick and easy access to the app’s most commonly used features: Each button is an instance of ApplicationBarIconButton, and the ApplicationBarIconButton class exposes a property named IsEnabled that allows buttons to be enabled and disabled. Let’s say that you want to disable one of these buttons in response to something the user does in your application. For example, maybe you want to disable the Save button
after the user clicks it to save whatever he or she is working on. If you try doing it this way, you’re in for a rude surprise:   // MainPage.xaml           // MainPage.xaml.cs private void OnSaveButtonClicked(object sender, EventArgs e) {     SaveButton.IsEnabled = false; }   The code compiles just fine, but it throws a NullReferenceException at run-time because SaveButton...(Read whole news on source site)

Home : Blog List : Jeff Prosise's Blog : Silverlight for Windows Phone Programming Tip #3