|
2 | 2 | <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" |
3 | 3 | xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" |
4 | 4 | xmlns:thickness ="clr-namespace:Microsoft.Maui;assembly=Microsoft.Maui" |
5 | | - xmlns:dataForm="http://schemas.syncfusion.com/maui" |
| 5 | + xmlns:dataForm="clr-namespace:Syncfusion.Maui.DataForm;assembly=Syncfusion.Maui.DataForm" |
6 | 6 | xmlns:local="clr-namespace:LoginForm" |
7 | 7 | xmlns:system="clr-namespace:System;assembly=netstandard" |
8 | 8 | x:Class="LoginForm.MainPage"> |
|
18 | 18 | </Border.StrokeShape> |
19 | 19 | <Image Source="login.png" Grid.Row="0" Grid.Column="0" HorizontalOptions="Center" Aspect="AspectFit" |
20 | 20 | /> |
21 | | - </Border> |
| 21 | + </Border> |
22 | 22 | <Frame CornerRadius="10" Grid.Column="{OnIdiom Default=0, Desktop=1}" BorderColor="White" HeightRequest="420" Background="White" |
23 | 23 | Grid.Row="{OnIdiom Default=1, Desktop=0}" |
24 | 24 | WidthRequest="380" VerticalOptions="{OnIdiom Default=Start, Desktop=Center}" |
25 | 25 | Grid.ColumnSpan="{OnIdiom Default=2, Desktop=1}" |
26 | 26 | Grid.RowSpan="{OnIdiom Default=1, Desktop=2}" > |
27 | 27 | <Grid IsClippedToBounds="True" HeightRequest="420" > |
28 | | - <Grid.RowDefinitions> |
29 | | - <RowDefinition Height="90"/> |
30 | | - <RowDefinition Height="{OnIdiom Default=180, Desktop=155}"/> |
31 | | - <RowDefinition Height="50"/> |
32 | | - <RowDefinition Height="40"/> |
33 | | - <RowDefinition Height="40"/> |
34 | | - </Grid.RowDefinitions> |
35 | | - <Grid.BindingContext> |
36 | | - <local:DataFormViewModel/> |
37 | | - </Grid.BindingContext> |
38 | | - <Label Padding="0,10,0,0" |
| 28 | + <Grid.RowDefinitions> |
| 29 | + <RowDefinition Height="90"/> |
| 30 | + <RowDefinition Height="{OnIdiom Default=180, Desktop=155}"/> |
| 31 | + <RowDefinition Height="50"/> |
| 32 | + <RowDefinition Height="40"/> |
| 33 | + <RowDefinition Height="40"/> |
| 34 | + </Grid.RowDefinitions> |
| 35 | + <Grid.BindingContext> |
| 36 | + <local:DataFormViewModel/> |
| 37 | + </Grid.BindingContext> |
| 38 | + <Label Padding="0,10,0,0" |
39 | 39 | HorizontalOptions="Center" HorizontalTextAlignment="Center" VerticalTextAlignment="Start"> |
40 | | - <Label.FormattedText> |
41 | | - <FormattedString> |
42 | | - <Span Text="Welcome back" FontSize="32" FontAttributes="Bold"/> |
43 | | - <Span Text="{x:Static system:Environment.NewLine}"/> |
44 | | - <Span Text="Login to your account" FontSize="14"/> |
45 | | - </FormattedString> |
46 | | - </Label.FormattedText> |
47 | | - </Label> |
| 40 | + <Label.FormattedText> |
| 41 | + <FormattedString> |
| 42 | + <Span Text="Welcome back" FontSize="32" FontAttributes="Bold"/> |
| 43 | + <Span Text="{x:Static system:Environment.NewLine}"/> |
| 44 | + <Span Text="Login to your account" FontSize="14"/> |
| 45 | + </FormattedString> |
| 46 | + </Label.FormattedText> |
| 47 | + </Label> |
48 | 48 |
|
49 | | - <dataForm:SfDataForm x:Name="signInForm" Grid.Row="1" DataObject="{Binding SignInFormModel}" |
50 | | - LayoutType="TextInputLayout" |
| 49 | + <dataForm:SfDataForm x:Name="loginForm" LayoutType="TextInputLayout" |
| 50 | + Grid.Row="1" DataObject="{Binding LoginFormModel}" |
51 | 51 | ValidationMode="PropertyChanged" > |
52 | | - <dataForm:SfDataForm.TextInputLayoutSettings> |
53 | | - <dataForm:TextInputLayoutSettings ShowHelperText="True"/> |
54 | | - </dataForm:SfDataForm.TextInputLayoutSettings> |
55 | | - </dataForm:SfDataForm> |
| 52 | + </dataForm:SfDataForm> |
56 | 53 |
|
57 | | - <Grid ColumnDefinitions="0.5*,0.5*" Grid.Row="2" Padding="12,0,0,0" VerticalOptions="Start"> |
58 | | - <HorizontalStackLayout VerticalOptions="Center" Padding="10,0,0,0" > |
59 | | - <CheckBox Color="{StaticResource Primary}"/> |
60 | | - <Label Text="Remember me" FontSize="12" VerticalOptions="Center" /> |
61 | | - </HorizontalStackLayout> |
62 | | - <Label Text="Forgot password?" Grid.Column="1" TextColor="{StaticResource Primary}" HorizontalTextAlignment="Center" Padding="10,0,0,0" FontSize="12" VerticalOptions="Center" /> |
63 | | - </Grid> |
| 54 | + <Grid ColumnDefinitions="0.5*,0.5*" Grid.Row="2" Padding="12,0,0,0" VerticalOptions="Start"> |
| 55 | + <HorizontalStackLayout VerticalOptions="Center" Padding="10,0,0,0" > |
| 56 | + <CheckBox Color="{StaticResource Primary}"/> |
| 57 | + <Label Text="Remember me" FontSize="12" VerticalOptions="Center" /> |
| 58 | + </HorizontalStackLayout> |
| 59 | + <Label Text="Forgot password?" Grid.Column="1" TextColor="{StaticResource Primary}" HorizontalTextAlignment="Center" Padding="10,0,0,0" FontSize="12" VerticalOptions="Center" /> |
| 60 | + </Grid> |
64 | 61 |
|
65 | | - <Button Text="LOGIN" x:Name="signInButton" HeightRequest="40" VerticalOptions="End" |
| 62 | + <Button Text="LOGIN" x:Name="loginButton" HeightRequest="40" VerticalOptions="End" |
66 | 63 | HorizontalOptions="Fill" Margin="20,0,20,0" CornerRadius="10" |
67 | 64 | Padding="0" FontAttributes="Bold" |
68 | 65 | Grid.Row="3" Background="{StaticResource Primary}"/> |
69 | 66 |
|
70 | 67 |
|
71 | | - <Label Grid.Row="4" Padding="0,12,0,0" |
| 68 | + <Label Grid.Row="4" Padding="0,12,0,0" |
72 | 69 | HorizontalOptions="Center" |
73 | 70 | HorizontalTextAlignment="Center" |
74 | 71 | FontSize="14"> |
75 | | - <Label.FormattedText> |
76 | | - <FormattedString> |
77 | | - <Span Text="Don't have an account? " /> |
78 | | - <Span Text="Sign Up" TextDecorations="Underline" TextColor="{StaticResource Primary}"/> |
79 | | - </FormattedString> |
80 | | - </Label.FormattedText> |
81 | | - </Label> |
82 | | - </Grid> |
| 72 | + <Label.FormattedText> |
| 73 | + <FormattedString> |
| 74 | + <Span Text="Don't have an account? " /> |
| 75 | + <Span Text="Sign Up" TextDecorations="Underline" TextColor="{StaticResource Primary}"/> |
| 76 | + </FormattedString> |
| 77 | + </Label.FormattedText> |
| 78 | + </Label> |
| 79 | + </Grid> |
83 | 80 | </Frame> |
84 | 81 | </Grid> |
85 | 82 | </Border> |
86 | 83 | <ContentPage.Behaviors> |
87 | | - <local:SignInFormBehavior/> |
| 84 | + <local:LoginFormBehavior/> |
88 | 85 | </ContentPage.Behaviors> |
89 | 86 | </ContentPage> |
0 commit comments