Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xamarin表单android返回工具栏消失_Xamarin_Xamarin.android_Android Toolbar_Xamarin Forms - Fatal编程技术网

Xamarin表单android返回工具栏消失

Xamarin表单android返回工具栏消失,xamarin,xamarin.android,android-toolbar,xamarin-forms,Xamarin,Xamarin.android,Android Toolbar,Xamarin Forms,有问题。如果我在android设备上按back键,它会返回到预览端,但它会删除选项卡的工具栏,有人知道这是什么吗 这是我导航到页面的方式。哪一个工作, this.Navigation.PushAsync(new ProfilPage()) .ContinueWith(t => { this.Navigation.RemovePage(this); }); 然后,当我按下后退按钮时,它会返回,但会删除站点工具栏 有人知道这件事吗?感谢

有问题。如果我在android设备上按back键,它会返回到预览端,但它会删除选项卡的工具栏,有人知道这是什么吗

这是我导航到页面的方式。哪一个工作,

            this.Navigation.PushAsync(new ProfilPage())
                .ContinueWith(t => { this.Navigation.RemovePage(this); });
然后,当我按下后退按钮时,它会返回,但会删除站点工具栏


有人知道这件事吗?感谢您抽出时间

这就是您的导航方式,请尝试使用
导航页面

this.Navigation.PushAsync(new NavigationPage(ProfilPage()) )
.ContinueWith(t => { this.Navigation.RemovePage(this); });

这就是您的导航方式,请尝试使用
NavigationPage

this.Navigation.PushAsync(new NavigationPage(ProfilPage()) )
.ContinueWith(t => { this.Navigation.RemovePage(this); });

ProfilePage
是否在
选项卡页面中?正在消失的工具栏是
选项卡页的工具栏吗?或者您所指的工具栏是导航栏吗?profilepage是导航页面中的内容页面。我所说的工具栏是contentpage的ToolbarItems,您是否尝试过不使用
ContinueWith()
?通常,当我想在弹出/推送页面后执行某些操作时,我要么简单地将代码放在
PushAsync()
之后,要么使用
MessagingCenter
将消息发送到我要推送或弹出的页面。这有意义吗?是的。我试过了。但是没有任何区别您确定
ProfilePage()
没有删除工具栏的代码吗?例如
NavigationPage.SetHasNavigationBar(this,false)是否在
选项卡页
中?正在消失的工具栏是
选项卡页的工具栏吗?或者您所指的工具栏是导航栏吗?profilepage是导航页面中的内容页面。我所说的工具栏是contentpage的ToolbarItems,您是否尝试过不使用
ContinueWith()
?通常,当我想在弹出/推送页面后执行某些操作时,我要么简单地将代码放在
PushAsync()
之后,要么使用
MessagingCenter
将消息发送到我要推送或弹出的页面。这有意义吗?是的。我试过了。但是没有任何区别您确定
ProfilePage()
没有删除工具栏的代码吗?例如
NavigationPage.SetHasNavigationBar(this,false)