【发布时间】:2016-04-28 18:04:25
【问题描述】:
在我的应用程序中,使用 steps here 创建的 AppCompat 主题运行良好。我想在 Xamarin.Forms 按钮中应用 RaisedButton 颜色。为此,我尝试了以下方法:
-
在
MyApplication.Droid > Resources > Values> style.xmlrefering 中添加样式为:<style name="MyRaisedButton" parent="Widget.AppCompat.Button.Colored"></style> -
在视图 MyView.xaml 中的 MyApplication.Shared Portable 表单库中添加了一个按钮:
<Button Style="{StaticResource MyRaisedButton}" Text="Raised Button" />
但它不起作用。由于这两个文件(MyView.xaml 和 style.xml)位于不同的项目中。如何在 Xamarin.Forms 中添加 Widget.AppCompat.Button.Colored 样式的按钮?
【问题讨论】:
标签: android xamarin xamarin.android android-appcompat