Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How do I change the text colour of an Entry Element from Black to White

$
0
0

Hi, I have a custom entry element class but Id like to change the text field colour from default Back to White. Please note that this is NOT the TextLabel text colour, but rather the text that is entered by the user into the EntryElement. This is what I have so far...

public class StandardEntryElement : EntryElement
    {
        public StandardEntryElement (string caption, string placeholder, string value): base(caption,placeholder,value)
        {
        }

        public StandardEntryElement (string caption, string placeholder, string value, bool isPassword) : base(caption,placeholder,value,isPassword){
        }

        public override UITableViewCell GetCell (UITableView tv)
        {
            var theCell =  base.GetCell (tv);
            theCell.BackgroundColor = Resources.CellBackground;
            theCell.TextLabel.TextColor = Resources.LabelTextColor;
            theCell.TextLabel.Text = Caption;
            return theCell;

        }
    }

Viewing all articles
Browse latest Browse all 204402

Trending Articles



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