1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <localcore : SampleView xmlns =" http://schemas.microsoft.com/dotnet/2021/maui"
3
+ xmlns : x =" http://schemas.microsoft.com/winfx/2009/xaml"
4
+ x : Class =" Syncfusion.Maui.ControlsGallery.OtpInput.OtpInput.Customization"
5
+ xmlns : otpInput =" clr-namespace:Syncfusion.Maui.Toolkit.OtpInput;assembly=Syncfusion.Maui.Toolkit"
6
+ xmlns : local =" clr-namespace:Syncfusion.Maui.ControlsGallery.OtpInput.OtpInput"
7
+ xmlns : customView =" clr-namespace:Syncfusion.Maui.ControlsGallery.CustomView"
8
+ xmlns : textInput =" clr-namespace:Syncfusion.Maui.Toolkit.TextInputLayout;assembly=Syncfusion.Maui.Toolkit"
9
+ xmlns : localcore =" clr-namespace:Syncfusion.Maui.ControlsGallery;assembly=Syncfusion.Maui.ControlsGallery"
10
+ BackgroundColor =" {AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" >
11
+ <localcore : SampleView .BindingContext>
12
+ <local : CustomizationViewModel />
13
+ </localcore : SampleView .BindingContext>
14
+
15
+ <localcore : SampleView .Content>
16
+ <VerticalStackLayout Spacing =" 20" VerticalOptions =" Center" HorizontalOptions =" Center" >
17
+ <Grid RowDefinitions =" *,*" >
18
+ <Label Text =" Default (Number) OTP Input" FontAttributes =" Bold" FontSize =" 16" Margin =" {OnPlatform Default='14,0,0,0',Android='11,0,0,0',iOS='11,0,0,0'}" />
19
+ <otpInput : SfOtpInput Grid.Row=" 1"
20
+ Value =" 1234"
21
+ Type =" Number"
22
+ Length =" {Binding Length}"
23
+ StylingMode =" {Binding StylingMode}"
24
+ Separator =" {Binding Separator}"
25
+ InputState =" {Binding InputState}" />
26
+ </Grid >
27
+ <Grid RowDefinitions =" *,*" >
28
+ <Label Text =" Text OTP Input" FontAttributes =" Bold" FontSize =" 16" Margin =" {OnPlatform Default='14,0,0,0',Android='11,0,0,0',iOS='11,0,0,0'}" />
29
+ <otpInput : SfOtpInput Grid.Row=" 1"
30
+ Type =" Text"
31
+ Value =" e3c7"
32
+ Length =" {Binding Length}"
33
+ StylingMode =" {Binding StylingMode}"
34
+ Separator =" {Binding Separator}"
35
+ InputState =" {Binding InputState}" />
36
+ </Grid >
37
+ <Grid RowDefinitions =" *,*" >
38
+ <Label Text =" Password OTP Input" FontAttributes =" Bold" FontSize =" 16" Margin =" {OnPlatform Default='14,0,0,0',Android='11,0,0,0',iOS='11,0,0,0'}" />
39
+ <otpInput : SfOtpInput Grid.Row=" 1"
40
+ Value =" 1234"
41
+ Type =" Password"
42
+ Length =" {Binding Length}"
43
+ StylingMode =" {Binding StylingMode}"
44
+ Separator =" {Binding Separator}"
45
+ InputState =" {Binding InputState}" />
46
+ </Grid >
47
+
48
+ </VerticalStackLayout >
49
+ </localcore : SampleView .Content>
50
+
51
+ <localcore : SampleView .OptionView>
52
+ <ScrollView VerticalScrollBarVisibility =" Never" >
53
+ <VerticalStackLayout Spacing =" {OnPlatform Default=10,MacCatalyst=20,iOS=20}" >
54
+ <Grid ColumnDefinitions =" .5*,.5*" >
55
+ <Label Text =" Length" Margin =" 0,-12,0,0" VerticalTextAlignment =" Center" />
56
+ <textInput : SfTextInputLayout Grid.Column=" 2" ContainerType =" Outlined" OutlineCornerRadius =" 5" ShowHelperText =" False" InputViewPadding =" 10,0" HeightRequest =" 60" Stroke =" {AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource BorderDark}}" >
57
+ <customView : SfEntry Keyboard =" Numeric" VerticalOptions =" Center" Text =" {Binding Length}" TextColor =" {AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColourDark}}" Placeholder =" Enter length" PlaceholderColor =" {AppThemeBinding Light={StaticResource PlaceholderTextColourLight}, Dark={StaticResource PlaceholderTextColourDark}}" />
58
+ </textInput : SfTextInputLayout >
59
+ </Grid >
60
+ <Grid Margin =" 0,-18,0,0" ColumnDefinitions =" .5*,.5*" >
61
+ <Label Text =" Separator" Margin =" 0,-12,0,0" VerticalTextAlignment =" Center" />
62
+ <textInput : SfTextInputLayout Grid.Column=" 2" ContainerType =" Outlined" OutlineCornerRadius =" 5" ShowHelperText =" False" InputViewPadding =" 10,0" HeightRequest =" 60" Stroke =" {AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource BorderDark}}" >
63
+ <customView : SfEntry Keyboard =" Text" VerticalOptions =" Center" Text =" {Binding Separator}" TextColor =" {AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColourDark}}" Placeholder =" Enter separator" PlaceholderColor =" {AppThemeBinding Light={StaticResource PlaceholderTextColourLight}, Dark={StaticResource PlaceholderTextColourDark}}" />
64
+ </textInput : SfTextInputLayout >
65
+ </Grid >
66
+ <Grid Margin =" 0,-18,0,0" ColumnDefinitions =" .5*,.5*" >
67
+ <Label Text =" Styling Mode" VerticalTextAlignment =" Center" />
68
+ <Picker Grid.Column=" 1" ItemsSource =" {Binding StylingModeList}" SelectedIndex =" {Binding StylingModeIndex}" />
69
+ </Grid >
70
+ <Grid ColumnDefinitions =" .5*,.5*" >
71
+ <Label Text =" InputState" VerticalTextAlignment =" Center" />
72
+ <Picker Grid.Column=" 1" ItemsSource =" {Binding InputStateList}" SelectedIndex =" {Binding InputStateIndex}" />
73
+ </Grid >
74
+
75
+ </VerticalStackLayout >
76
+ </ScrollView >
77
+ </localcore : SampleView .OptionView>
78
+
79
+ </localcore : SampleView >
0 commit comments