c# - Shell标题未在xamarin表单android中显示
问题描述
我的 shell xaml 页面上的标题没有显示,这是我的代码:
<Shell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:LoanApp2.Views"
xmlns:bindingVM="clr-namespace:LoanApp2.ViewModel"
xmlns:contentView="clr-namespace:LoanApp2.ContentViews"
mc:Ignorable="d"
Title="Hehehe"
x:Class="LoanApp2.MainPage" BackgroundColor="#62bef0" >
如您所见,标题已声明但未显示。我也试过:
<Shell.TitleView>
<Label Text="Hehe"/>
</Shell.TitleView>
但它仍然不起作用。shell 页面由前一个屏幕调用,代码如下Application.Current.MainPage = new MainPage();
解决方案
推荐阅读
- firebase - Firebase 电话身份验证功能能否轻松迁移到 Amazon Cognito?
- python - C# WPF + Python
- java - 如何在枚举构造函数中 @Autowire @Component`s?
- css - 在 React 中使用 CSS Peek
- java - Spring Boot:Swagger-UI 白标错误
- python - 依赖于另一个循环的 Tk 事件循环
- python - .py 到 exe 不产生 matplotlib 图
- performance - 多个时间序列的超参数调整
- sqlite - 如何对额外列中的两列行元素求和?
- git - .gitignore .gitattributes 声明的所有二进制文件