【问题标题】:Xamarin.Forms style BarBackgroundColor transparentXamarin.Forms 样式 BarBackgroundColor 透明
【发布时间】:2018-06-22 06:48:00
【问题描述】:

我的目标是在 Xamarin.Forms 中为 Android 和 iOS 提供一个透明的导航栏。问题是值的六边形颜色不起作用(例如#FFFFFF00)

这是我的通用样式表代码:

<Style TargetType="NavigationPage">
    <Setter Property="BarBackgroundColor" Value="[insert value for transparent]" />
</Style>

【问题讨论】:

标签: android ios xamarin.forms transparent navigationbar


【解决方案1】:

您还可以定义颜色名称:

 <Style TargetType="NavigationPage">
       <Setter Property="BarBackgroundColor" Value="Transparent" />
 </Style>

如果仍然无法正常工作,则必须在 Android 项目 style.xml 页面中进行更改。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-27
    • 2015-11-26
    • 2020-07-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多