简体   繁体   English

如何在 xamarin 表单中以 Android 样式使用 App.xaml 中定义的颜色

[英]How to use defined color from App.xaml in Android style in xamarin forms

I have color defined in app.xaml我在 app.xaml 中定义了颜色

 <Color x:Key="AppPrimaryColor">#FF9515</Color>

Is where way to use this color in android/Resources/style.xml For example:是在 android/Resources/style.xml 中使用这种颜色的方法例如:

<style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">

<item name="colorPrimary">AppPrimaryColor</item>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM