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.
Syncfusion Feedback

FormatString Dynamic Resource binding

Thread ID:

Created:

Updated:

Platform:

Replies:

131780 Jul 26,2017 11:12 PM UTC Jul 27,2017 03:58 PM UTC Xamarin.Forms 1
loading
Tags: SfNumericUpDown
Emil
Asked On July 26, 2017 11:12 PM UTC

I want to have format string dynamicly bound in a listview datatemplate based on settings like below, kg or lbs but binding doesnt work

     if (User.UnitSystem== "Metric")
                    WeightFormat = " kg";
                else
                    WeightFormat = " lbs";

 //var WeightStyle = new Style(typeof(SfNumericUpDown))
            //{
            //    Setters = {
            //    new Setter { Property = SfNumericUpDown.HorizontalOptionsProperty, Value = LayoutOptions.FillAndExpand},
            //    new Setter { Property = SfNumericUpDown.VerticalOptionsProperty, Value = LayoutOptions.FillAndExpand},
            //    new Setter { Property = SfNumericUpDown.TextAlignmentProperty, Value = LayoutOptions.Center},
            //new Setter { Property = SfNumericUpDown.TextColorProperty, Value = Color.Black},
            //    new Setter { Property = SfNumericUpDown.ParsingModeProperty,  Value=ParsingMode.Decimal},
            //     new Setter { Property = SfNumericUpDown.FormatStringProperty,  Value= WeightFormat},
            //   new Setter { Property = SfNumericUpDown.CultureProperty,  Value=Helpers.Settings.CurrentCultureInfo},
            //    }
            //};

            //this.Resources["NumericStyle"] = NumericStyle;

          <numeric:SfNumericUpDown MaximumDecimalDigits="2"   Style="{DynamicResource NumericStyle}" 
                                                             x:Name="weightNumericUpDown"  Maximum="100000"  
                             Value="0"   >   

Vanaja  Annasamy [Syncfusion]
Replied On July 27, 2017 03:58 PM UTC

Hi Emil,

Thank you for contacting Syncfusion support.

We were unable to reproduce the reported issue "FormatString is not changing dynamically when binding" in SfNumericUpDown. We have provided the sample for your reference. Please download the same from below link.

Link:  http://www.syncfusion.com/downloads/support/forum/131780/ze/NumericUp-797769829 

Please run the sample and check whether issue reproduces at your end. If not please modify the changes in the given sample and revert the error reproducing sample and this will help us replicate the issue at our end.

Regards,
Vanaja R.A.
 


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.

Warning Icon 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.Close Icon

;