Ahad Siddiqui
Ahad Siddiqui

Reputation: 341

hiding application bar in windows phone

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

Answers (4)

pranavjayadev
pranavjayadev

Reputation: 929

ApplicationBarIconButton btn = (ApplicationBarIconButton)ApplicationBar.Buttons[0];
                    btnResend.IsEnabled = false;

Upvotes: 0

Arpan.exe
Arpan.exe

Reputation: 61

Hi you can try this code.

ApplicationBar _Appbar= ((ApplicationBar)this.Resources["appbar1"]);  _Appbar.IsVisible = false;

Upvotes: 0

Jagath Murali
Jagath Murali

Reputation: 515

You can try

ApplicationBar = ((ApplicationBar)this.Resources["appbar1"])
ApplicationBar.IsVisible = false;

This will solve your issue

Upvotes: 2

Ku6opr
Ku6opr

Reputation: 8126

Try ApplicationBar.IsVisible = false;

Upvotes: 4

Related Questions