File tree Expand file tree Collapse file tree 7 files changed +22
-36
lines changed Expand file tree Collapse file tree 7 files changed +22
-36
lines changed Original file line number Diff line number Diff line change 1- namespace MinMaxDateEditors ;
1+ using MinMaxDateEditor ;
2+
3+ namespace MinMaxDateEditors ;
24
35public partial class App : Application
46{
57 public App ( )
68 {
79 InitializeComponent ( ) ;
8-
9- MainPage = new AppShell ( ) ;
1010 }
11+
12+ protected override Window CreateWindow ( IActivationState ? activationState )
13+ {
14+ return new Window ( new MainPage ( ) ) ;
15+ }
1116}
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 33 xmlns : x =" http://schemas.microsoft.com/winfx/2009/xaml"
44 xmlns : dataForm =" clr-namespace:Syncfusion.Maui.DataForm;assembly=Syncfusion.Maui.DataForm"
55 xmlns : local =" clr-namespace:MinMaxDateEditor"
6+ x : DataType =" local:DataFormViewModel"
67 x : Class =" MinMaxDateEditor.MainPage" >
78 <dataForm : SfDataForm x : Name =" dataForm"
89 DataObject =" {Binding DataFormModel}" >
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ protected override void OnAttachedTo(SfDataForm dataForm)
1111 dataForm . RegisterEditor ( "AppointmentTime" , DataFormEditorType . Time ) ;
1212 dataForm . GenerateDataFormItem += OnGenerateDataItem ;
1313 }
14- private void OnGenerateDataItem ( object sender , GenerateDataFormItemEventArgs e )
14+ private void OnGenerateDataItem ( object ? sender , GenerateDataFormItemEventArgs e )
1515 {
1616 if ( e . DataFormItem != null && e . DataFormItem is DataFormDateItem dateItem )
1717 {
@@ -26,7 +26,5 @@ protected override void OnDetachingFrom(SfDataForm dataForm)
2626 {
2727 dataForm . GenerateDataFormItem -= this . OnGenerateDataItem ;
2828 }
29-
30- dataForm = null ;
3129 }
3230}
Original file line number Diff line number Diff line change 22
33public class DataFormModel
44{
5- public string FirstName { get ; set ; }
6- public string LastName { get ; set ; }
7- public string AppointmentDate { get ; set ; }
8- public string AppointmentTime { get ; set ; }
5+ public string FirstName { get ; set ; } = string . Empty ;
6+ public string LastName { get ; set ; } = string . Empty ;
7+ public string AppointmentDate { get ; set ; } = string . Empty ;
8+ public string AppointmentTime { get ; set ; } = string . Empty ;
99}
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <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 >
66 <!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
77 <!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
88 <OutputType >Exe</OutputType >
99 <RootNamespace >MinMaxDateEditors</RootNamespace >
1010 <UseMaui >true</UseMaui >
1111 <SingleProject >true</SingleProject >
1212 <ImplicitUsings >enable</ImplicitUsings >
13+ <Nullable >enable</Nullable >
1314
1415 <!-- Display name -->
1516 <ApplicationTitle >MinMaxDateEditors</ApplicationTitle >
4950 </ItemGroup >
5051
5152 <ItemGroup >
52- <PackageReference Include =" Microsoft.Extensions.Logging.Debug" Version =" 7.0.0 " />
53+ <PackageReference Include =" Microsoft.Extensions.Logging.Debug" Version =" * " />
5354 <PackageReference Include =" Syncfusion.Maui.DataForm" Version =" *" />
5455 </ItemGroup >
5556
57+ <ItemGroup >
58+ <PackageReference Include =" Microsoft.Maui.Controls" Version =" $(MauiVersion)" />
59+ </ItemGroup >
60+
5661</Project >
You can’t perform that action at this time.
0 commit comments