diff options
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla42000.cs')
-rw-r--r-- | Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla42000.cs | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla42000.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla42000.cs new file mode 100644 index 00000000..77436bcd --- /dev/null +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla42000.cs @@ -0,0 +1,65 @@ +using Xamarin.Forms.CustomAttributes; +using Xamarin.Forms.Internals; + +namespace Xamarin.Forms.Controls.Issues +{ + [Preserve(AllMembers = true)] + [Issue(IssueTracker.Bugzilla, 42000, "Unable to use comma (\", \") as decimal point", PlatformAffected.Android)] + public class Bugzilla42000 : ContentPage + { + public Bugzilla42000() + { + var instructions = new Label + { + Text = + @"Change your system language settings and verify that you can type the correct decimal separator into the Entry and Editor controls below. +If your language is set to English (United States), you should be able to type '2.5', but not '2.5.3' or '2,5'. +If your language is set to Deutsch (Deutschland), you should be able to type '2,5', but not '2,5,3' or '2.5'. +" + }; + + var entrylabel = new Label { Text = "Entry:" }; + var entry = new Entry { Keyboard = Keyboard.Numeric }; + + var editorlabel = new Label { Text = "Editor:" }; + var editor = new Editor { Keyboard = Keyboard.Numeric }; + + var customRendererInstructions = new Label + { + Margin = new Thickness(0, 40, 0, 0), + Text = @"The two entries below demonstrate disabling decimal separators and negative numbers, respectively. +In the first one, neither '.' nor ',' should be typeable. +In the second, the '-' should not be typeable." + }; + + var entryNoDecimal = new _42000NumericEntryNoDecimal { Keyboard = Keyboard.Numeric }; + var entryNoNegative = new _42000NumericEntryNoNegative { Keyboard = Keyboard.Numeric }; + + Content = new StackLayout + { + VerticalOptions = LayoutOptions.Center, + Children = + { + instructions, + entrylabel, + entry, + editorlabel, + editor, + customRendererInstructions, + entryNoDecimal, + entryNoNegative + } + }; + } + + [Preserve(AllMembers = true)] + public class _42000NumericEntryNoDecimal : Entry + { + } + + [Preserve(AllMembers = true)] + public class _42000NumericEntryNoNegative : Entry + { + } + } +}
\ No newline at end of file |