From f9846cd5e2d147246f9cceb6432a17b8efccf70e Mon Sep 17 00:00:00 2001 From: Hemalatha-SF4675 Date: Thu, 26 Dec 2024 12:29:16 +0530 Subject: [PATCH 1/7] Update numericEntry UG source code --- maui-toolkit/NumericEntry/Basic-Features.md | 31 +++++++++++++------- maui-toolkit/NumericEntry/Events.md | 8 +++-- maui-toolkit/NumericEntry/Getting-Started.md | 22 +++++++++----- maui-toolkit/NumericEntry/Restriction.md | 12 ++++++-- 4 files changed, 50 insertions(+), 23 deletions(-) diff --git a/maui-toolkit/NumericEntry/Basic-Features.md b/maui-toolkit/NumericEntry/Basic-Features.md index 6bfb5491..1c6c8ca1 100644 --- a/maui-toolkit/NumericEntry/Basic-Features.md +++ b/maui-toolkit/NumericEntry/Basic-Features.md @@ -16,17 +16,19 @@ You can prompt the user with any information using the [Placeholder](https://hel {% tabs %} {% highlight xaml %} - + {% endhighlight %} {% highlight C# %} -SfNumberBox SfNumberBox= new SfNumberBox(); -SfNumberBox.Placeholder = "Enter input here..."; -sfNumberBox.HorizontalOptions = LayoutOptions.Center; -sfNumberBox.VerticalOptions = LayoutOptions.Center; +SfNumericEntry sfNumericEntry= new SfNumericEntry(); +sfNumericEntry.WidthRequest=200; +sfNumericEntry.Placeholder = "Enter input here..."; +sfNumericEntry.HorizontalOptions = LayoutOptions.Center; +sfNumericEntry.VerticalOptions = LayoutOptions.Center; {% endhighlight %} {% endtabs %} @@ -41,7 +43,8 @@ N> The clear button appears only when the text box is focused and the `IsEditabl {% tabs %} {% highlight xaml %} - @@ -49,7 +52,8 @@ N> The clear button appears only when the text box is focused and the `IsEditabl {% endhighlight %} {% highlight C# %} -SfNumericEntry sfNumericEntry = new SfNumericEntry(); +SfNumericEntry sfNumericEntry= new SfNumericEntry(); +sfNumericEntry.WidthRequest=200; sfNumricEntry.Value=10; sfNumericEntry.ShowClearButton = true; sfNumericEntry.IsEditable = true; @@ -157,7 +161,8 @@ The NumericEntry border color can be changed by using the [Stroke]() property. T {% tabs %} {% highlight xaml %} - @@ -165,6 +170,7 @@ The NumericEntry border color can be changed by using the [Stroke]() property. T {% highlight C# %} SfNumericEntry sfNumericEntry = new SfNumericEntry(); +sfNumericEntry.WidthRequest=200; sfNumericEntry.HorizontalOptions = LayoutOptions.Center; sfNumericEntry.VerticalOptions = LayoutOptions.Center; sfNumericEntry.Stroke = Colors.Red; @@ -249,6 +255,7 @@ N> Default value of ReturnType is `Default`. {% highlight C# %} SfNumericEntry sfNumericEntry = new SfNumericEntry(); +sfNumericEntry.WidthRequest=200; sfNumericEntry.ReturnType = ReturnType.Next; {% endhighlight %} @@ -264,6 +271,7 @@ The [ClearButtonPath](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Mau {% highlight xaml %} @@ -288,6 +296,7 @@ var path = new Path() }; SfNumericEntry numericEntry = new SfNumericEntry(); +numericEntry.WidthRequest=200; numricEntry.Value=10; numericEntry.ShowClearButton = true; numericEntry.IsEditable = true; @@ -313,6 +322,7 @@ The following image illustrates the result of the above code: @@ -322,6 +332,7 @@ The following image illustrates the result of the above code: var viewModel = new CommandDemoViewModel(); SfNumericEntry numericEntry = new SfNumericEntry(); +numericEntry.WidthRequest=200; numericEntry.ReturnCommand = viewModel.AlertCommand; numericEntry.ReturnCommandParameter = "Return key is pressed"; diff --git a/maui-toolkit/NumericEntry/Events.md b/maui-toolkit/NumericEntry/Events.md index c5b2ac41..d4eec6d2 100644 --- a/maui-toolkit/NumericEntry/Events.md +++ b/maui-toolkit/NumericEntry/Events.md @@ -21,7 +21,8 @@ The [ValueChanged](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.T {% tabs %} {% highlight xaml %} - @@ -29,6 +30,7 @@ The [ValueChanged](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.T {% highlight C# %} SfNumericEntry sfNumericEntry = new SfNumericEntry(); +sfNumericEntry.WidthRequest=200; sfNumericEntry.HorizontalOptions = LayoutOptions.Center; sfNumericEntry.VerticalOptions = LayoutOptions.Center; sfNumericEntry.ValueChanged += sfNumericEntry_ValueChanged; @@ -57,7 +59,8 @@ The `NumericEntry` control includes a [Completed](https://help.syncfusion.com/cr {% tabs %} {% highlight xaml %} - @@ -65,6 +68,7 @@ The `NumericEntry` control includes a [Completed](https://help.syncfusion.com/cr {% highlight C# %} SfNumericEntry sfNumericEntry = new SfNumericEntry(); +sfNumericEntry.WidthRequest=200; sfNumericEntry.HorizontalOptions = LayoutOptions.Center; sfNumericEntry.VerticalOptions = LayoutOptions.Center; sfNumericEntry.Completed += sfNumericEntry_Completed; diff --git a/maui-toolkit/NumericEntry/Getting-Started.md b/maui-toolkit/NumericEntry/Getting-Started.md index 3a86e217..e024857d 100644 --- a/maui-toolkit/NumericEntry/Getting-Started.md +++ b/maui-toolkit/NumericEntry/Getting-Started.md @@ -121,7 +121,8 @@ This ensures that only valid numeric input is accepted and displayed according t {% tabs %} {% highlight xaml %} - @@ -129,6 +130,7 @@ This ensures that only valid numeric input is accepted and displayed according t {% highlight C# %} SfNumericEntry sfNumericEntry = new SfNumericEntry(); +sfNumericEntry.WidthRequest=200; sfNumericEntry.HorizontalOptions = LayoutOptions.Center; sfNumericEntry.VerticalOptions = LayoutOptions.Center; sfNumericEntry.CustomFormat = "0.000"; @@ -145,7 +147,8 @@ You can change the format in which the value should be displayed using the [Cust {% tabs %} {% highlight xaml %} - @@ -153,11 +156,12 @@ You can change the format in which the value should be displayed using the [Cust {% endhighlight %} {% highlight C# %} -SfNumberBox sfNumberBox = new SfNumberBox(); -sfNumberBox.HorizontalOptions = LayoutOptions.Center; -sfNumberBox.VerticalOptions = LayoutOptions.Center; -sfNumberBox.Value = 12.5; -sfNumberBox.CustomFormat = "C2"; +SfNumericEntry sfNumericEntry = new SfNumericEntry(); +sfNumericEntry.WidthRequest=200; +sfNumericEntry.HorizontalOptions = LayoutOptions.Center; +sfNumericEntry.VerticalOptions = LayoutOptions.Center; +sfNumericEntry.Value = 12.5; +sfNumericEntry.CustomFormat = "C2"; {% endhighlight %} {% endtabs %} @@ -171,7 +175,8 @@ By default, the [NumericEntry](https://help.syncfusion.com/cr/maui-toolkit/Syncf {% tabs %} {% highlight xaml %} - @@ -180,6 +185,7 @@ By default, the [NumericEntry](https://help.syncfusion.com/cr/maui-toolkit/Syncf {% highlight C# %} SfNumericEntry sfNumericEntry = new SfNumericEntry(); +sfNumericEntry.WidthRequest=200; sfNumericEntry.Value=12315; sfNumericEntry.HorizontalOptions = LayoutOptions.Center; sfNumericEntry.VerticalOptions = LayoutOptions.Center; diff --git a/maui-toolkit/NumericEntry/Restriction.md b/maui-toolkit/NumericEntry/Restriction.md index 9f352e5a..d0439e17 100644 --- a/maui-toolkit/NumericEntry/Restriction.md +++ b/maui-toolkit/NumericEntry/Restriction.md @@ -22,7 +22,8 @@ N> When the value of the Minimum property is **15**, and the `AllowNull` propert {% tabs %} {% highlight xaml %} - @@ -31,6 +32,7 @@ N> When the value of the Minimum property is **15**, and the `AllowNull` propert {% highlight C# %} SfNumericEntry sfNumericEntry = new SfNumericEntry(); +sfNumericEntry.WidthRequest=200; sfNumeriCEntry.HorizontalOptions = LayoutOptions.Center; sfNumericEntry.VerticalOptions = LayoutOptions.Center; sfNumericEntry.Value = 10; @@ -48,7 +50,8 @@ You can restrict the users to enter input within a minimum and maximum range in {% tabs %} {% highlight xaml %} - @@ -87,6 +92,7 @@ You can prevent users from editing the numerical value in the editor using the [ {% highlight C# %} SfNumericEntry sfNumericEntry = new SfNumericEntry(); +sfNumericEntry.WidthRequest=200; sfNumericEntry.HorizontalOptions = LayoutOptions.Center; sfNumericEntry.VerticalOptions = LayoutOptions.Center; sfNumericEntry.IsEditable = true; From ca1f08130a68da87529072f9a52c3d5e2e674a1a Mon Sep 17 00:00:00 2001 From: Hemalatha-SF4675 Date: Thu, 26 Dec 2024 14:05:45 +0530 Subject: [PATCH 2/7] Update numericupdown UG --- maui-toolkit/NumericEntry/Formatting.md | 109 +++++++++++++----- maui-toolkit/NumericUpDown/Basic-Features.md | 26 +++-- maui-toolkit/NumericUpDown/Events.md | 8 +- maui-toolkit/NumericUpDown/Formatting.md | 108 +++++++++++++---- maui-toolkit/NumericUpDown/Getting-Started.md | 16 ++- maui-toolkit/NumericUpDown/Restriction.md | 12 +- maui-toolkit/NumericUpDown/UpDown-Button.md | 20 +++- 7 files changed, 226 insertions(+), 73 deletions(-) diff --git a/maui-toolkit/NumericEntry/Formatting.md b/maui-toolkit/NumericEntry/Formatting.md index ae6644a8..71019791 100644 --- a/maui-toolkit/NumericEntry/Formatting.md +++ b/maui-toolkit/NumericEntry/Formatting.md @@ -25,25 +25,37 @@ N> You can apply various custom formats available in [this page](), which are s {% highlight xaml %} // Format stock price in currency. - + // Format product discount in percent. - + // Format worked hours in decimal. - + {% endhighlight %} {% highlight c# %} // Format stock price in currency. -stockPrice.CustomFormat = "C2"; +SfNumericEntry stockPrice = new SfNumericEntry +{ + CustomFormat = "C2", + WidthRequest = 200 +}; // Format product discount in percent. -productDiscount.CustomFormat = "P2"; +SfNumericEntry productDiscount = new SfNumericEntry +{ + CustomFormat = "P2", + WidthRequest = 200 +}; // Format worked hours in decimal. -hoursWorked.CustomFormat = "N2"; +SfNumericEntry hoursWorked = new SfNumericEntry +{ + CustomFormat = "N2", + WidthRequest = 200 +}; {% endhighlight %} {% endtabs %} @@ -62,25 +74,37 @@ N> **0** (Zero placeholder) replaces the zero with the corresponding digit prese {% highlight xaml %} // Format stock price in currency. - + // Format product discount in percentage. - + // Format worked hours in decimal. - + {% endhighlight %} {% highlight c# %} // Format stock price in currency. -stockPrice.CustomFormat = "$00000.00"; +SfNumericEntry stockPrice = new SfNumericEntry +{ + CustomFormat = "$00000.00", + WidthRequest = 200 +}; // Format product discount in percentage. -productDiscount.CustomFormat = "00000.00%"; +SfNumericEntry productDiscount = new SfNumericEntry +{ + CustomFormat = "00000.00%", + WidthRequest = 200 +}; // Format worked hours in decimal. -hoursWorked.CustomFormat = "00000.00"; +SfNumericEntry hoursWorked = new SfNumericEntry +{ + CustomFormat = "00000.00", + WidthRequest = 200 +}; {% endhighlight %} {% endtabs %} @@ -98,16 +122,30 @@ N> **0** (Zero placeholder) replaces the zero with the corresponding digit in th {% tabs %} {% highlight xaml %} - - - + + + {% endhighlight %} {% highlight c# %} -stockPrice.CustomFormat = "$000.000"; -productDiscount.CustomFormat = "00.000%"; -hoursWorked.CustomFormat = "00.000"; +SfNumericEntry stockPrice = new SfNumericEntry +{ + CustomFormat = "$000.000", + WidthRequest = 200 +}; + +SfNumericEntry productDiscount = new SfNumericEntry +{ + CustomFormat = "00.000%", + WidthRequest = 200 +}; + +SfNumericEntry hoursWorked = new SfNumericEntry +{ + CustomFormat = "00.000", + WidthRequest = 200 +}; {% endhighlight %} {% endtabs %} @@ -127,16 +165,30 @@ In the following example, the value of the `CustomFormat` property is **#.00##** {% tabs %} {% highlight xaml %} - - - + + + {% endhighlight %} {% highlight c# %} -stockPrice.CustomFormat = "$00.00##"; -productDiscount.CustomFormat = "00.00##%"; -hoursWorked.CustomFormat = "00.00##"; +SfNumericEntry stockPrice = new SfNumericEntry +{ + CustomFormat = "$00.00##", + WidthRequest = 200 +}; + +SfNumericEntry productDiscount = new SfNumericEntry +{ + CustomFormat = "00.00##%", + WidthRequest = 200 +}; + +SfNumericEntry hoursWorked = new SfNumericEntry +{ + CustomFormat = "00.00##", + WidthRequest = 200 +}; {% endhighlight %} {% endtabs %} @@ -169,6 +221,7 @@ When the [SfNumericEntry](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion {% highlight xaml %} @@ -178,7 +231,7 @@ When the [SfNumericEntry](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion {% highlight C# %} SfNumericEntry sfNumericEntry= new SfNumericEntry(); -SfNumericEntry sfNumericEntry = new SfNumericEntry(); +sfNumericUpDown.WidthRequest = 200; sfNumericEntry.Value = 1000; sfNumericEntry.CustomFormat = "p"; sfNumericEntry.PercentDisplayMode = PercentDisplayMode.Value; @@ -193,7 +246,8 @@ sfNumericEntry.PercentDisplayMode = PercentDisplayMode.Value; {% tabs %} {% highlight xaml %} - @@ -203,6 +257,7 @@ sfNumericEntry.PercentDisplayMode = PercentDisplayMode.Value; {% highlight C# %} SfNumericEntry sfNumericEntry= new SfNumericEntry(); +sfNumericUpDown.WidthRequest = 200; sfNumericEntry.Value = 1000; sfNumericEntry.CustomFormat = "p"; sfNumericEntry.PercentDisplayMode = PercentDisplayMode.Compute; @@ -224,6 +279,7 @@ N> The `MaximumNumberDecimalDigits` property can only be set to a positive value {% highlight xaml %} @@ -232,6 +288,7 @@ N> The `MaximumNumberDecimalDigits` property can only be set to a positive value {% highlight C# %} SfNumericEntry sfNumericEntry= new SfNumericEntry(); +sfNumericUpDown.WidthRequest = 200; sfNumericEntry.Value = 1000.23232; sfNumericEntry.MaximumNumberDecimalDigits = 3; diff --git a/maui-toolkit/NumericUpDown/Basic-Features.md b/maui-toolkit/NumericUpDown/Basic-Features.md index 6fd0f192..6ddae8c1 100644 --- a/maui-toolkit/NumericUpDown/Basic-Features.md +++ b/maui-toolkit/NumericUpDown/Basic-Features.md @@ -16,7 +16,8 @@ You can prompt the user with any information using the [Placeholder](https://hel {% tabs %} {% highlight xaml %} - @@ -24,6 +25,7 @@ You can prompt the user with any information using the [Placeholder](https://hel {% highlight C# %} SfNumericUpDown numericUpDown= new SfNumericUpDown(); +numericUpDown.WidthRequest = 200; numericUpDown.Placeholder = "Enter input here..."; numericUpDown.HorizontalOptions = LayoutOptions.Center; numericUpDown.VerticalOptions = LayoutOptions.Center; @@ -41,7 +43,8 @@ N> The clear button appears only when the text box is focused and the `IsEditabl {% tabs %} {% highlight xaml %} - @@ -50,6 +53,7 @@ N> The clear button appears only when the text box is focused and the `IsEditabl {% highlight C# %} SfNumericUpDown sfNumericUpDown = new SfNumericUpDown(); +sfNumericUpDown.WidthRequest = 200; sfNumericUpDown.Value=10; sfNumericUpDown.ShowClearButton = true; sfNumericUpDown.IsEditable = true; @@ -108,7 +112,7 @@ public partial class MainPage : ContentPage Spacing = 10, VerticalOptions = LayoutOptions.Center }; - var NumericUpDown = new SfNumericUpDown + var numericEntry = new SfNumericUpDown { WidthRequest = 200, HeightRequest = 40, @@ -131,20 +135,21 @@ public partial class MainPage : ContentPage Text="$50", TextColor = Colors.Green }; - NumericUpDown.ValueChanged += NumericUpDown_ValueChanged; + numericEntry.ValueChanged += NumericEntry_ValueChanged; horizontalStackLayout.Children.Add(labelDollar); horizontalStackLayout.Children.Add(valueDisplay); - verticalStackLayout.Children.Add(NumericUpDown); + verticalStackLayout.Children.Add(numericEntry); verticalStackLayout.Children.Add(horizontalStackLayout); Content = verticalStackLayout; } - private void NumericUpDown_ValueChanged(object sender, NumericUpDownValueChangedEventArgs e) + private void NumericEntry_ValueChanged(object sender, NumericEntryValueChangedEventArgs e) { valueDisplay.Text="$"+e.NewValue.ToString(); } } + {% endhighlight %} {% endtabs %} @@ -157,7 +162,8 @@ The NumericUpDown border color can be changed by using the [Stroke](https://help {% tabs %} {% highlight xaml %} - @@ -165,6 +171,7 @@ The NumericUpDown border color can be changed by using the [Stroke](https://help {% highlight C# %} SfNumericUpDown sfNumericUpDown = new SfNumericUpDown(); +sfNumericUpDown.WidthRequest = 200; sfNumericUpDown.HorizontalOptions = LayoutOptions.Center; sfNumericUpDown.VerticalOptions = LayoutOptions.Center; sfNumericUpDown.Stroke = Colors.Red; @@ -247,6 +254,7 @@ N> Default value of ReturnType is `Default`. {% highlight C# %} SfNumericUpDown sfNumericUpDown = new SfNumericUpDown(); +sfNumericUpDown.WidthRequest = 200; sfNumericUpDown.ReturnType = ReturnType.Next; {% endhighlight %} @@ -262,6 +270,7 @@ The `ClearButtonPath` property allows users to set the path for customizing the {% highlight xaml %} @@ -286,6 +295,7 @@ var path = new Path() }; SfNumericUpDown numericUpDown = new SfNumericUpDown(); +numericUpDown.WidthRequest = 200; numericUpDown.Value=10; numericUpDown.ShowClearButton = true; numericUpDown.IsEditable = true; @@ -311,6 +321,7 @@ The following image illustrates the result of the above code: @@ -320,6 +331,7 @@ The following image illustrates the result of the above code: var viewModel = new CommandDemoViewModel(); SfNumericUpDown NumericUpDown = new SfNumericUpDown(); +NumericUpDown.WidthRequest = 200; NumericUpDown.ReturnCommand = viewModel.AlertCommand; NumericUpDown.ReturnCommandParameter = "Return key is pressed"; diff --git a/maui-toolkit/NumericUpDown/Events.md b/maui-toolkit/NumericUpDown/Events.md index ae10d1d1..5733c93b 100644 --- a/maui-toolkit/NumericUpDown/Events.md +++ b/maui-toolkit/NumericUpDown/Events.md @@ -21,7 +21,8 @@ The [ValueChanged](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.T {% tabs %} {% highlight xaml %} - @@ -29,6 +30,7 @@ The [ValueChanged](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.T {% highlight C# %} SfNumericUpDown sfNumericUpDown = new SfNumericUpDown(); +sfNumericUpDown.WidthRequest = 200; sfNumericUpDown.HorizontalOptions = LayoutOptions.Center; sfNumericUpDown.VerticalOptions = LayoutOptions.Center; sfNumericUpDown.ValueChanged += sfNumericUpDown_ValueChanged; @@ -57,7 +59,8 @@ The `NumericUpDown` control includes a [Completed](https://help.syncfusion.com/c {% tabs %} {% highlight xaml %} - @@ -65,6 +68,7 @@ The `NumericUpDown` control includes a [Completed](https://help.syncfusion.com/c {% highlight C# %} SfNumericUpDown sfNumericUpDown = new SfNumericUpDown(); +sfNumericUpDown.WidthRequest = 200; sfNumericUpDown.HorizontalOptions = LayoutOptions.Center; sfNumericUpDown.VerticalOptions = LayoutOptions.Center; sfNumericUpDown.Completed += sfNumericUpDown_Completed; diff --git a/maui-toolkit/NumericUpDown/Formatting.md b/maui-toolkit/NumericUpDown/Formatting.md index 82a2e0ec..e264e632 100644 --- a/maui-toolkit/NumericUpDown/Formatting.md +++ b/maui-toolkit/NumericUpDown/Formatting.md @@ -25,25 +25,37 @@ N> You can apply various custom formats available in [this page](https://docs.m {% highlight xaml %} // Format stock price in currency. - + // Format product discount in percent. - + // Format worked hours in decimal. - + {% endhighlight %} {% highlight c# %} // Format stock price in currency. -stockPrice.CustomFormat = "C2"; +SfNumericUpDown stockPrice = new SfNumericUpDown +{ + CustomFormat = "C2", + WidthRequest = 200 +}; // Format product discount in percent. -productDiscount.CustomFormat = "P2"; +SfNumericUpDown productDiscount = new SfNumericUpDown +{ + CustomFormat = "P2", + WidthRequest = 200 +}; // Format worked hours in decimal. -hoursWorked.CustomFormat = "N2"; +SfNumericUpDown hoursWorked = new SfNumericUpDown +{ + CustomFormat = "N2", + WidthRequest = 200 +}; {% endhighlight %} {% endtabs %} @@ -62,25 +74,37 @@ N> **0** (Zero placeholder) replaces the zero with the corresponding digit prese {% highlight xaml %} // Format stock price in currency. - + // Format product discount in percentage. - + // Format worked hours in decimal. - + {% endhighlight %} {% highlight c# %} // Format stock price in currency. -stockPrice.CustomFormat = "$00000.00"; +SfNumericUpDown stockPrice = new SfNumericUpDown +{ + CustomFormat = "$00000.00", + WidthRequest = 200 +}; // Format product discount in percentage. -productDiscount.CustomFormat = "00000.00%"; +SfNumericUpDown productDiscount = new SfNumericUpDown +{ + CustomFormat = "00000.00%", + WidthRequest = 200 +}; // Format worked hours in decimal. -hoursWorked.CustomFormat = "00000.00"; +SfNumericUpDown hoursWorked = new SfNumericUpDown +{ + CustomFormat = "00000.00", + WidthRequest = 200 +}; {% endhighlight %} {% endtabs %} @@ -98,16 +122,30 @@ N> **0** (Zero placeholder) replaces the zero with the corresponding digit in th {% tabs %} {% highlight xaml %} - - - + + + {% endhighlight %} {% highlight c# %} -stockPrice.CustomFormat = "$000.000"; -productDiscount.CustomFormat = "00.000%"; -hoursWorked.CustomFormat = "00.000"; +SfNumericUpDown stockPrice = new SfNumericUpDown +{ + CustomFormat = "$000.000", + WidthRequest = 200 +}; + +SfNumericUpDown productDiscount = new SfNumericUpDown +{ + CustomFormat = "00.000%", + WidthRequest = 200 +}; + +SfNumericUpDown hoursWorked = new SfNumericUpDown +{ + CustomFormat = "00.000", + WidthRequest = 200 +}; {% endhighlight %} {% endtabs %} @@ -127,16 +165,30 @@ In the following example, the value of the `CustomFormat` property is **#.00##** {% tabs %} {% highlight xaml %} - - - + + + {% endhighlight %} {% highlight c# %} -stockPrice.CustomFormat = "$00.00##"; -productDiscount.CustomFormat = "00.00##%"; -hoursWorked.CustomFormat = "00.00##"; +SfNumericUpDown stockPrice = new SfNumericUpDown +{ + CustomFormat = "$00.00##", + WidthRequest = 200 +}; + +SfNumericUpDown productDiscount = new SfNumericUpDown +{ + CustomFormat = "00.00##%", + WidthRequest = 200 +}; + +SfNumericUpDown hoursWorked = new SfNumericUpDown +{ + CustomFormat = "00.00##", + WidthRequest = 200 +}; {% endhighlight %} {% endtabs %} @@ -168,7 +220,8 @@ When the [SfNumericUpDown](https://help.syncfusion.com/cr/maui-toolkit/Syncfusio {% tabs %} {% highlight xaml %} - @@ -179,6 +232,7 @@ When the [SfNumericUpDown](https://help.syncfusion.com/cr/maui-toolkit/Syncfusio SfNumericUpDown sfNumericUpDown= new SfNumericUpDown(); SfNumericUpDown sfNumericUpDown = new SfNumericUpDown(); +sfNumericUpDown.WidthRequest = 200; sfNumericUpDown.Value = 1000; sfNumericUpDown.CustomFormat = "p"; sfNumericUpDown.PercentDisplayMode = PercentDisplayMode.Value; @@ -194,6 +248,7 @@ sfNumericUpDown.PercentDisplayMode = PercentDisplayMode.Value; {% highlight xaml %} @@ -203,6 +258,7 @@ sfNumericUpDown.PercentDisplayMode = PercentDisplayMode.Value; {% highlight C# %} SfNumericUpDown sfNumericUpDown= new SfNumericUpDown(); +sfNumericUpDown.WidthRequest = 200; sfNumericUpDown.Value = 1000; sfNumericUpDown.CustomFormat = "p"; sfNumericUpDown.PercentDisplayMode = PercentDisplayMode.Compute; @@ -224,6 +280,7 @@ N> The `MaximumNumberDecimalDigits` property can only be set to a positive value {% highlight xaml %} @@ -232,6 +289,7 @@ N> The `MaximumNumberDecimalDigits` property can only be set to a positive value {% highlight C# %} SfNumericUpDown sfNumericUpDown= new SfNumericUpDown(); +sfNumericUpDown.WidthRequest = 200; sfNumericUpDown.Value = 1000.23232; sfNumericUpDown.MaximumNumberDecimalDigits = 3; diff --git a/maui-toolkit/NumericUpDown/Getting-Started.md b/maui-toolkit/NumericUpDown/Getting-Started.md index 5c4c0a94..67cd536b 100644 --- a/maui-toolkit/NumericUpDown/Getting-Started.md +++ b/maui-toolkit/NumericUpDown/Getting-Started.md @@ -120,7 +120,8 @@ This ensures that only valid numeric input is accepted and displayed according t {% tabs %} {% highlight xaml %} - @@ -128,6 +129,7 @@ This ensures that only valid numeric input is accepted and displayed according t {% highlight C# %} SfNumericUpDown sfNumericUpDown = new SfNumericUpDown(); +sfNumericUpDown.WidthRequest = 200; sfNumericUpDown.HorizontalOptions = LayoutOptions.Center; sfNumericUpDown.VerticalOptions = LayoutOptions.Center; sfNumericUpDown.CustomFormat = "0.000"; @@ -150,7 +152,8 @@ N> Clicking the up or down button increases or decreases the value based on the {% tabs %} {% highlight xaml %} - @@ -159,6 +162,7 @@ N> Clicking the up or down button increases or decreases the value based on the {% highlight C# %} SfNumericUpDown sfNumericUpDown = new SfNumericUpDown(); +sfNumericUpDown.WidthRequest = 200; sfNumericUpDown.HorizontalOptions = LayoutOptions.Center; sfNumericUpDown.VerticalOptions = LayoutOptions.Center; sfNumericUpDown.CustomFormat = "0.000"; @@ -176,7 +180,8 @@ You can change the format in which the value should be displayed using the [Cust {% tabs %} {% highlight xaml %} - @@ -185,6 +190,7 @@ You can change the format in which the value should be displayed using the [Cust {% highlight C# %} SfNumericUpDown sfNumericUpDown = new SfNumericUpDown(); +sfNumericUpDown.WidthRequest = 200; sfNumericUpDown.HorizontalOptions = LayoutOptions.Center; sfNumericUpDown.VerticalOptions = LayoutOptions.Center; sfNumericUpDown.Value = 12.5; @@ -202,7 +208,8 @@ By default, the [NumericUpDown](https://help.syncfusion.com/cr/maui-toolkit/Sync {% tabs %} {% highlight xaml %} - @@ -211,6 +218,7 @@ By default, the [NumericUpDown](https://help.syncfusion.com/cr/maui-toolkit/Sync {% highlight C# %} SfNumericUpDown sfNumericUpDown = new SfNumericUpDown(); +sfNumericUpDown.WidthRequest = 200; sfNumericUpDown.Value=12315; sfNumericUpDown.HorizontalOptions = LayoutOptions.Center; sfNumericUpDown.VerticalOptions = LayoutOptions.Center; diff --git a/maui-toolkit/NumericUpDown/Restriction.md b/maui-toolkit/NumericUpDown/Restriction.md index 970cb0a0..f3618ae1 100644 --- a/maui-toolkit/NumericUpDown/Restriction.md +++ b/maui-toolkit/NumericUpDown/Restriction.md @@ -22,7 +22,8 @@ N> When the value of the Minimum property is **15**, and the `AllowNull` propert {% tabs %} {% highlight xaml %} - @@ -31,6 +32,7 @@ N> When the value of the Minimum property is **15**, and the `AllowNull` propert {% highlight C# %} SfNumericUpDown sfNumericUpDown = new SfNumericUpDown(); +sfNumericUpDown.WidthRequest = 200; sfNumericUpDown.HorizontalOptions = LayoutOptions.Center; sfNumericUpDown.VerticalOptions = LayoutOptions.Center; sfNumericUpDown.Value = 10; @@ -48,7 +50,8 @@ You can restrict the users to enter input within a minimum and maximum range in {% tabs %} {% highlight xaml %} - @@ -87,6 +92,7 @@ You can prevent users from editing the numerical value in the editor using the [ {% highlight C# %} SfNumericUpDown sfNumericUpDown = new SfNumericUpDown(); +sfNumericUpDown.WidthRequest = 200; sfNumericUpDown.HorizontalOptions = LayoutOptions.Center; sfNumericUpDown.VerticalOptions = LayoutOptions.Center; sfNumericUpDown.IsEditable = true; diff --git a/maui-toolkit/NumericUpDown/UpDown-Button.md b/maui-toolkit/NumericUpDown/UpDown-Button.md index 6be15add..060f4956 100644 --- a/maui-toolkit/NumericUpDown/UpDown-Button.md +++ b/maui-toolkit/NumericUpDown/UpDown-Button.md @@ -20,7 +20,8 @@ N> The value in the `NumericUpDown` can also be changed by mouse scrolling. The {% tabs %} {% highlight xaml %} - The value in the `NumericUpDown` can also be changed by mouse scrolling. The {% highlight C# %} SfNumericUpDown sfNumericUpDown= new SfNumericUpDown(); +sfNumericUpDown.WidthRequest = 200; sfNumericUpDown.Value=10; sfNumericUpDown.SmallChange=5; sfNumericUpDown.LargeChange=10; @@ -50,7 +52,8 @@ N> When using the up-down button, the `NumericUpDown` control value changes base {% tabs %} {% highlight XAML %} - @@ -59,6 +62,7 @@ N> When using the up-down button, the `NumericUpDown` control value changes base {% highlight c# %} SfNumericUpDown sfNumericUpDown = new SfNumericUpDown(); +sfNumericUpDown.WidthRequest = 200; sfNumericUpDown.HorizontalOptions = LayoutOptions.Center; sfNumericUpDown.VerticalOptions = LayoutOptions.Center; sfNumericUpDown.Value=360; @@ -82,7 +86,8 @@ The default updown button alignment is **Right**. {% tabs %} {% highlight XAML %} - @@ -91,6 +96,7 @@ The default updown button alignment is **Right**. {% highlight c# %} SfNumericUpDown sfNumericUpDown = new SfNumericUpDown(); +sfNumericUpDown.WidthRequest = 200; sfNumericUpDown.HorizontalOptions = LayoutOptions.Center; sfNumericUpDown.VerticalOptions = LayoutOptions.Center; sfNumericUpDown.Value=360; @@ -152,7 +158,7 @@ N> The UpDownButton template only supports Inline Placement mode. -