xamarin.forms - 删除标题视图 xamarin 表单中的左侧空格
解决方案
Toolbar.xml
在您的 Android 部分中设置下面的 xml 。
app:contentInsetLeft="0dp"
app:contentInsetStart="0dp"
app:contentInsetStartWithNavigation="0dp"
不要忘记在你的Toolbar.xaml
.
xmlns:app="http://schemas.android.com/apk/res-auto"
并检查下面的代码,它需要添加到MainActivity.cs
.
ToolbarResource = Resource.Layout.Toolbar;
用法:
<NavigationPage.TitleView>
<Label Text="Repositories" />
</NavigationPage.TitleView>
推荐阅读
- javascript - 如何绕过浏览器每个域的 6 个并发连接限制?
- visual-studio-code - VSCode 扩展 LICENSE 文本编码
- python - Google BigQuery:在 Python 中,列添加使所有其他列都为 Nullable
- mysql - MySQL 选择内连接匹配的行数少于预期
- html - 导航栏和网站内容的 CSS 选择器性能
- php - 如何使用 GET 方法的功能通过 PHP 中的链接(在标签中)将包含值的变量传递到另一个页面
- angular - Angular 在 option 属性中的逻辑 OR 有什么问题?当 [(ngModel)] 用于选择时,[selected] 属性不会影响选择
- python - 如何使 PyCharm 的自动完成功能在 django 上工作?
- c# - 如何通过服务帐户从 .NET 授权调用 GCP 数据目录 API?
- php - 在 PHP OOP 中调用类(对象)