Forum Xamarin.Forms

[Xamarin forms picker] is it possible to define a color on a picker item ?

Good morning, everyone,

I would like to know if it is possible to assign a color to an element of a picker in relation to the id of the element.

I tried and searched on the web, but I couldn't color the text that is in the picker selection. I only managed to color the picker text with the property [TextColor = "myColor"].

for information know that I program on visualstudio 2017 business with xamarin.Forms with as operating system android.

is that possible?
thank you in advance for your answers

cordially Camille

Posts

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Are you saying you want to display the word "green" or you want to render soemthing in the color green?

    You can display the word. But you can't colorize the picker: That's coming from the OS that app is running on at the time.

    Well... You could colorize it... If you want to write your own renders for each platform as well as the property sharing from the agnostic layer and the model down to the renderer.

  • camillecamille Member ✭✭

    I want to make something green and not display the word green!
    and if I understand correctly, it's not possible?

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    @camille said:
    and if I understand correctly, it's not possible?

    Not easily possible out of the box. Not a default capability.
    As I said, you can write your own customer renders if you want.

  • camillecamille Member ✭✭

    All right, so there are no methods done at the moment for my request, so I'll have to create my own methods then!

    Thank you as well as for your help

Sign In or Register to comment.