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
尝试ApplicationBar.IsVisible = false;
You can try
ApplicationBar = ((ApplicationBar)this.Resources["appbar1"])
ApplicationBar.IsVisible = false;
This will solve your issue
您好,你可以试试这个代码。
ApplicationBar _Appbar= ((ApplicationBar)this.Resources["appbar1"]); _Appbar.IsVisible = false;
ApplicationBarIconButton btn = (ApplicationBarIconButton)ApplicationBar.Buttons[0];
btnResend.IsEnabled = false;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.