【发布时间】:2014-06-26 08:26:48
【问题描述】:
我在带有 XAML 页面的 PCL 中使用 Xamarin.Forms。我发现设置控件样式的唯一方法是使用内联语法。
<Button Text="Inquiry" TextColor="Blue" />
我更喜欢使用这样的结构:
<Page.Resources>
<Style TargetType="Button">
<Setter Property="BorderThickness" Value="5" />
<Setter Property="Foreground" Value="Blue" />
</Style>
</Page.Resources>
(http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh465381.aspx)
但是,尚不支持 Style 元素。 有没有人成功地将布局与内容分开?
仅供参考:我还在 Xamarin 论坛中发布了这个问题,所以任何通过 google 访问这里的人可能还想查看此页面:http://forums.xamarin.com/discussion/19287/styling-of-xamarin-xaml#latest
【问题讨论】:
标签: c# xaml xamarin xamarin.forms