File tree 6 files changed +18
-32
lines changed
ValidateOnLoad/ValidateOnLoad
6 files changed +18
-32
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,10 @@ public partial class App : Application
5
5
public App ( )
6
6
{
7
7
InitializeComponent ( ) ;
8
-
9
- MainPage = new AppShell ( ) ;
10
8
}
9
+
10
+ protected override Window CreateWindow ( IActivationState ? activationState )
11
+ {
12
+ return new Window ( new MainPage ( ) ) ;
13
+ }
11
14
}
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 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 : local =" clr-namespace:ValidateOnLoad"
5
+ x : DataType =" local:DataFormViewModel"
5
6
xmlns : dataForm =" clr-namespace:Syncfusion.Maui.DataForm;assembly=Syncfusion.Maui.DataForm"
6
7
x : Class =" ValidateOnLoad.MainPage" >
7
8
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ namespace ValidateOnLoad
4
4
{
5
5
public class DataFormBehavior : Behavior < ContentPage >
6
6
{
7
- private SfDataForm dataForm ;
7
+ private SfDataForm ? dataForm ;
8
8
protected override void OnAttachedTo ( ContentPage bindable )
9
9
{
10
10
base . OnAttachedTo ( bindable ) ;
@@ -18,9 +18,9 @@ protected override void OnAttachedTo(ContentPage bindable)
18
18
}
19
19
}
20
20
21
- private void OnLoaded ( object sender , EventArgs e )
21
+ private void OnLoaded ( object ? sender , EventArgs e )
22
22
{
23
- this . dataForm . Validate ( ) ;
23
+ this . dataForm ? . Validate ( ) ;
24
24
}
25
25
26
26
protected override void OnDetachingFrom ( ContentPage bindable )
Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
2
3
3
<PropertyGroup >
4
- <TargetFrameworks >net7 .0-android;net7 .0-ios;net7 .0-maccatalyst</TargetFrameworks >
5
- <TargetFrameworks Condition =" $([MSBuild]::IsOSPlatform('windows'))" >$(TargetFrameworks);net7 .0-windows10.0.19041.0</TargetFrameworks >
4
+ <TargetFrameworks >net9 .0-android;net9 .0-ios;net9 .0-maccatalyst</TargetFrameworks >
5
+ <TargetFrameworks Condition =" $([MSBuild]::IsOSPlatform('windows'))" >$(TargetFrameworks);net9 .0-windows10.0.19041.0</TargetFrameworks >
6
6
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
7
7
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
8
8
<OutputType >Exe</OutputType >
9
9
<RootNamespace >ValidateOnLoad</RootNamespace >
10
10
<UseMaui >true</UseMaui >
11
11
<SingleProject >true</SingleProject >
12
12
<ImplicitUsings >enable</ImplicitUsings >
13
+ <Nullable >enable</Nullable >
13
14
14
15
<!-- Display name -->
15
16
<ApplicationTitle >ValidateOnLoad</ApplicationTitle >
49
50
</ItemGroup >
50
51
51
52
<ItemGroup >
52
- <PackageReference Include =" Microsoft.Extensions.Logging.Debug" Version =" 7.0.0" />
53
- <PackageReference Include =" Syncfusion.Maui.DataForm" Version =" *" />
53
+ <PackageReference Include =" Microsoft.Extensions.Logging.Debug" Version =" *" />
54
+ </ItemGroup >
55
+
56
+ <ItemGroup >
57
+ <PackageReference Include =" Microsoft.Maui.Controls" Version =" $(MauiVersion)" />
58
+ <PackageReference Include =" Syncfusion.Maui.DataForm" Version =" *" />
54
59
</ItemGroup >
55
60
56
61
</Project >
You can’t perform that action at this time.
0 commit comments