We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Border of NumericTextBox

Thread ID:

Created:

Updated:

Platform:

Replies:

124624 Jun 18,2016 11:44 PM Jun 21,2016 08:12 AM Xamarin.Forms 4
loading
Tags: SfNumericTextBox
Atif
Asked On June 18, 2016 11:44 PM

Hi please guide me is there anyway to change the border color same as like Entry Control.

Thanks

Hemalatha Marikumar [Syncfusion]
Replied On June 20, 2016 08:07 AM

Hi Atif,

Thanks for contacting Syncfusion Support.

Currently we do not have direct support to change the border color of SfNumericTextBox. We have created a workaround sample to achieve your requirement. Please download the same from the following link


Link: http://www.syncfusion.com/downloads/support/forum/124624/ze/NumericTextBox-1998783776 



 
protected override void OnElementChanged(ElementChangedEventArgs<SfNumericTextBox> e)
{
 

base.OnElementChanged(e);

if (Control != null)
 

GradientDrawable gd = new GradientDrawable();
gd.SetShape(ShapeType.Rectangle);
gd.SetColor(Android.Graphics.Color.White); 
 

//By passing the color to stroke we can change the border color of NumericTextBox
 

gd.SetStroke(4, Android.Graphics.Color.DarkRed);
Control.SetBackgroundDrawable(gd);
}
 



Regards,
Hemalatha M.R 
 


Atif
Replied On June 20, 2016 04:52 PM

Thanks but please iam looking for iOS.

Thanks

Atif
Replied On June 20, 2016 04:55 PM

I have done it, Actually in iOS it is straight forward.

  protected override void OnElementPropertyChanged (object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            base.OnElementPropertyChanged (sender, e);

            if (Control != null) {
                Control.BorderStyle = UIKit.UITextBorderStyle.RoundedRect;
 
            }
        }

Hemalatha Marikumar [Syncfusion]
Replied On June 21, 2016 08:12 AM

Hi Atif,

Thanks for your update .

We are glad to hear that you have achieved your requirement.

Regards,
Hemalatha M.R


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;