Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Setting Style for control (in custom renderer for Android)

$
0
0

How can I set a certain style to a control?

Even though it's a XF project, I am only interested in the Android solution.

The style of the control (lets say a Checkbox) is already defined in the Android Resources.
And I am trying to write a custom renderer, that creates a native Android Checkbox using this style.

I tried
var checkBox = new InversCheckBox(Context, null, Resource.Style.MyStyle);

but that didn't work.

Any suggestions, how to apply a style to a control from a custom renderer?

cheers!


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>