我想用资源!! (Xamarin.Forms的自定义渲染器)

时间:2016-11-16 09:26:47

标签: android xamarin resources tableview

我正在尝试使用适用于Android的Xamarin.Forms创建一个表。

首先,表格上没有边框。原来如此!

我制作了一个border.xml文件并制作了形状

但是当我构建它时,发生 错误

enter image description here

'无效的开始标记形状'

我想知道如何修复它。

而且! ,对不起,更多问题,

make make .xml文件之后我想放入SetBackgroundResource(int resid)

在Resource.Designer.cs中使用残差。

我如何为border.xml的形状制作渣油(资源ID)并使用它?

非常感谢Soooooooooooooo!

enter image description here

enter image description here

1 个答案:

答案 0 :(得分:1)

当我遇到类似的问题时,我创建了一个Converter。您可以在Xamarin网站https://developer.xamarin.com/guides/xamarin-forms/advanced/localization/

上找到更多示例