Skip to content

Commit a6453bf

Browse files
Sample updated for .NET 8
1 parent d951888 commit a6453bf

File tree

3 files changed

+59
-59
lines changed

3 files changed

+59
-59
lines changed

LoginForm/LoginForm/LoginForm.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
5-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
5+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
66
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
7-
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
7+
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
88
<OutputType>Exe</OutputType>
99
<RootNamespace>LoginForm</RootNamespace>
1010
<UseMaui>true</UseMaui>
@@ -55,7 +55,7 @@
5555

5656

5757
<ItemGroup>
58-
<PackageReference Include="Syncfusion.Maui.DataForm" Version="21.1.35" />
58+
<PackageReference Include="Syncfusion.Maui.DataForm" Version="24.1.41" />
5959
</ItemGroup>
6060

6161

LoginForm/LoginForm/LoginForm.csproj.user

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<IsFirstTimeProjectOpen>False</IsFirstTimeProjectOpen>
5-
<ActiveDebugFramework>net6.0-windows10.0.19041.0</ActiveDebugFramework>
5+
<ActiveDebugFramework>net8.0-windows10.0.19041.0</ActiveDebugFramework>
66
<ActiveDebugProfile>Windows Machine</ActiveDebugProfile>
77
<SelectedPlatformGroup>Emulator</SelectedPlatformGroup>
88
</PropertyGroup>

LoginForm/LoginForm/MainPage.xaml

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -9,76 +9,76 @@
99
<ContentPage.BindingContext>
1010
<local:DataFormViewModel/>
1111
</ContentPage.BindingContext>
12-
<Grid ColumnDefinitions="0.5*, 0.5*" RowDefinitions="0.3*, 0.7*"
13-
Background="{OnIdiom Default=Transparent, Desktop=#83E9EE}">
14-
<Border Grid.ColumnSpan="{OnIdiom Default=2, Desktop=1}" Stroke="Transparent" Background="{OnIdiom Phone=#83E9EE,Desktop=Transparent}"
15-
Grid.RowSpan="{OnIdiom Default=1, Desktop=2}">
16-
<Border.StrokeShape>
17-
<RoundRectangle CornerRadius="0,0,100,100"/>
18-
</Border.StrokeShape>
12+
<Grid ColumnDefinitions="0.5*, 0.5*" RowDefinitions="0.3*, 0.7*"
13+
Background="{OnPlatform Default=Transparent, WinUI=#83E9EE,MacCatalyst=#83E9EE}">
14+
<Border Grid.ColumnSpan="{OnPlatform Default=2, WinUI=1, MacCatalyst=1}" Stroke="Transparent" Background="{OnPlatform Default=#83E9EE,WinUI=Transparent, MacCatalyst=Transparent}"
15+
Grid.RowSpan="{OnPlatform Default=1, WinUI=2, MacCatalyst=2}">
16+
<Border.StrokeShape>
17+
<RoundRectangle CornerRadius="0,0,100,100"/>
18+
</Border.StrokeShape>
1919
<Image Source="login.png" Grid.Row="0" Grid.Column="0" HorizontalOptions="Center" Aspect="AspectFit"/>
20-
</Border>
21-
22-
<Frame CornerRadius="10" Grid.Column="{OnIdiom Default=0, Desktop=1}" BorderColor="White" HeightRequest="420" Background="White"
23-
Grid.Row="{OnIdiom Default=1, Desktop=0}"
24-
WidthRequest="380" VerticalOptions="{OnIdiom Default=Start, Desktop=Center}"
25-
Grid.ColumnSpan="{OnIdiom Default=2, Desktop=1}"
26-
Grid.RowSpan="{OnIdiom Default=1, Desktop=2}" >
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"
20+
</Border>
21+
22+
<Frame CornerRadius="10" Grid.Column="{OnPlatform Default=0, WinUI=1, MacCatalyst=1}" BorderColor="White" HeightRequest="420" Background="White"
23+
Grid.Row="{OnPlatform Default=1, WinUI=0,MacCatalyst=0}"
24+
WidthRequest="380" VerticalOptions="{OnPlatform Default=Start, WinUI=Center , MacCatalyst=Center}"
25+
Grid.ColumnSpan="{OnPlatform Default=2, WinUI=1, MacCatalyst=1}"
26+
Grid.RowSpan="{OnPlatform Default=1, WinUI=2, MacCatalyst=2}" >
27+
<Grid IsClippedToBounds="True" HeightRequest="420" >
28+
<Grid.RowDefinitions>
29+
<RowDefinition Height="90"/>
30+
<RowDefinition Height="*"/>
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"
3939
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>
4848

49-
<dataForm:SfDataForm x:Name="loginForm" LayoutType="TextInputLayout"
49+
<dataForm:SfDataForm MinimumHeightRequest="{OnPlatform Default=160, WinUI=155, MacCatalyst=155}" x:Name="loginForm" VerticalOptions="Start" LayoutType="TextInputLayout"
5050
Grid.Row="1" DataObject="{Binding LoginFormModel}"
5151
ValidationMode="PropertyChanged" >
52-
</dataForm:SfDataForm>
52+
</dataForm:SfDataForm>
5353

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>
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>
6161

6262
<Button Text="LOGIN" x:Name="loginButton" HeightRequest="40" VerticalOptions="End"
6363
HorizontalOptions="Fill" Margin="20,0,20,0" CornerRadius="10"
6464
Padding="0" FontAttributes="Bold"
6565
Grid.Row="3" Background="{StaticResource Primary}"/>
6666

6767

68-
<Label Grid.Row="4" Padding="0,12,0,0"
68+
<Label Grid.Row="4" Padding="0,12,0,0"
6969
HorizontalOptions="Center"
7070
HorizontalTextAlignment="Center"
7171
FontSize="14">
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>
80-
</Frame>
81-
</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>
80+
</Frame>
81+
</Grid>
8282
<ContentPage.Behaviors>
8383
<local:LoginFormBehavior/>
8484
</ContentPage.Behaviors>

0 commit comments

Comments
 (0)