Xamarin.Forms 中编辑器的边框颜色 [英] Border Color for Editor in Xamarin.Forms
问题描述
如何在 Xamarin.Forms 中为编辑器设置边框颜色?
我使用了这个链接,但它仅适用于 Android.我希望它适用于所有平台!
我对这个有点新手.请帮帮我.
有什么想法吗?
你也可以通过用 BackgroundColor="your color"
用 StackLayout
包裹你的编辑器来实现这个和 Padding="1"
并将编辑器的 BackgroundColor
设置为与表单相同的颜色.
像这样:
<块引用><StackLayout BackgroundColor="Black" Padding="1"><Editor BackgroundColor="White"/></StackLayout>...</StackLayout>
没那么花哨,但这至少会给你一个边框!
How can i make a border color for Editor in Xamarin.Forms?
I used this link, but it works only for Android. I want it to work in all platforms!
I'm a little bit newbie to this. Please help me.
Any idea?
You may also archieve this by wrapping your Editor with a StackLayout
with BackgroundColor="your color"
and Padding="1"
and set the BackgroundColor
of your Editor to the same color of the form.
Something like this:
<StackLayout BackgroundColor="White"> <StackLayout BackgroundColor="Black" Padding="1"> <Editor BackgroundColor="White" /> </StackLayout> ... </StackLayout>
Not that fancy, but this will at least get you a border!
这篇关于Xamarin.Forms 中编辑器的边框颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!