When an entry is disabled the text colour automatically changes to a greyish colour, and there seems to be no bindable property to override it. Ideally I'd like a fix that let's me set the text colour and doesn't rely on having to maintain a custom renderer.
My use case for this is - the entry is really acting as a label to hide a large amount of text truncated with an ellipsis, to save screen space. The full text will only be shown when the the user clicks an edit icon - the entry will be is hidden, and the entire text will be shown editable in a multi-line entry.
I would use a normal label but I need a placeholder to be displayed which labels don't support.
Setting the text colour doesn't help. Here's roughly my code now - IsVisible and IsEnabled and Text are all bound to viewmodel properties that I'm not showing here for clarity's sake.
<Entry IsEnabled="False"
IsVisible="True"
Text="The disabled text..."
TextColor="White">
</Entry>
<Editor TextColor="White" IsVisible="False" Text="The disabled text in its full glory">
</Editor>
A nice simple solution for this one: Instead of using IsEnabled use IsReadOnly - which doesn't affect the text colour.
<Entry IsReadOnly="True"
Text="The disabled text..."
TextColor="White">
</Entry>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With