Forum Cross Platform with Xamarin

Custom Background Image for Text Field

I have a Xamarin.ios storyboard application. From designer I selected UIViewImage and I set the background image, and a TextField, I'm trying to set a background image for the text field too, but for text field it doesn't work, this is my code :

    public override void ViewDidLoad()
        bkgImage.Image = UIImage.FromBundle("/Photos/Hierarchical-Gradient-Background.jpg"); 
        userNameField.Background = UIImage.FromBundle("/Photos/username-txtBox.png"); <-- this is not showing the  image


I am doing something wrong?

Thank you,

Sign In or Register to comment.