简体   繁体   English

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

[英]I want to use Resource !! (Xamarin.Forms 's custom renderer)

I'm trying to making a Table with Xamarin.Forms for Android. 我正在尝试使用Android的Xamarin.Forms制作表。

First, there is no border on Table. 首先,表格上没有边框。 So! 所以!

I made a border.xml file and make shape 我做了一个border.xml文件并制作了形状

but when I do build this, an error occurred 但是当我建立这个时, 发生了一个错误

在此处输入图片说明

'Invalid start tag shape' “无效的开始标签形状”

I want to know how to fix it. 我想知道如何解决它。

And ! 还有! , Sorry for more question, ,很抱歉有更多问题,

after make resource .xml file I want to put in SetBackgroundResource(int resid) 在生成资源.xml文件之后,我想放入SetBackgroundResource(int resid)

using resid in Resource.Designer.cs. 在Resource.Designer.cs中使用resid。

How I make resid(resource id) for border.xml 's shape and use it? 我如何为border.xml的形状制作resid(资源ID)并使用它?

Thank you Soooooooooooooo much! 非常感谢Soooooooooooooo!

在此处输入图片说明

在此处输入图片说明

When I had a similar problem, I had created a Converter . 当我遇到类似的问题时,我创建了一个Converter You can find more example on Xamarin site https://developer.xamarin.com/guides/xamarin-forms/advanced/localization/ 您可以在Xamarin网站https://developer.xamarin.com/guides/xamarin-forms/advanced/localization/中找到更多示例。

暂无
暂无

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

相关问题 Xamarin.Forms中的条目自定义渲染器(为Android添加所有边框) - Entry Custom Renderer(add all borders for Android) in Xamarin.Forms xamarin.forms从自定义渲染器访问viewmodel属性 - xamarin.forms access viewmodel property from custom renderer Xamarin.Forms Timepicker IsVisible 属性与自定义呈现器 - Xamarin.Forms Timepicker IsVisible property vs. Custom Renderer 使用自定义渲染器强制重绘Xamarin.Forms视图 - Force redraw of Xamarin.Forms View with custom renderer 为什么在Xamarin.forms的自定义渲染器中将ImeOptions设置为Next不能将我带到Android中的next字段 - Why is Setting ImeOptions to Next in custom renderer of Xamarin.forms not taking me to next field in Android 指定文字重力时,Android中的Xamarin.Forms自定义渲染器将停止工作 - Xamarin.Forms Custom Renderer in Android stops working when text gravity is specified 如何获得对从Xamarin.Forms中的自定义渲染器渲染的控件的引用? - How to get a reference to the control being rendered from a custom renderer in Xamarin.Forms? 如何使用自定义渲染器更改TableSection文本颜色 - Xamarin.Forms C# - How to change the TableSection text color with a custom renderer - Xamarin.Forms C# android [Xamarin.Forms] 中用于唯一角半径值的自定义帧渲染器 - Custom Frame renderer for unique corner radius values in android [Xamarin.Forms] Xamarin.Forms Android 的自定义渲染器(条目)中的 OnElementChanged 仅被调用一次 - OnElementChanged in custom renderer (Entry) for Xamarin.Forms Android is only being called once
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM