Reputation: 341
I am trying to hide application bar in windows phone application like this : appbar1.IsVisible=false;
but when i debug the code , an error occurs NullReferenceException
at the same line . why ? need help
Upvotes: 5
Views: 72
Reputation: 929
ApplicationBarIconButton btn = (ApplicationBarIconButton)ApplicationBar.Buttons[0];
btnResend.IsEnabled = false;
Upvotes: 0
Reputation: 61
Hi you can try this code.
ApplicationBar _Appbar= ((ApplicationBar)this.Resources["appbar1"]); _Appbar.IsVisible = false;
Upvotes: 0
Reputation: 515
You can try
ApplicationBar = ((ApplicationBar)this.Resources["appbar1"])
ApplicationBar.IsVisible = false;
This will solve your issue
Upvotes: 2