Maui .NET 10 migration.

This commit is contained in:
Andy Howard
2026-09-11 16:44:12 +01:00
parent 18157a1f40
commit 004f6233d8
7 changed files with 22 additions and 20 deletions
@@ -1,4 +1,4 @@
using Sarand.Net.Mobile.Maui.Layouts;
using Sarand.Net.Mobile.Maui.Layouts;
using Sarand.Net.Mobile.Maui.Views;
using Sarand.Net.Standard.Base.Utils;
using System;
@@ -83,12 +83,12 @@ namespace Sarand.Net.Mobile.Maui.Controls
}
public DateTime MinimumDate
{
get { return pickerDate.MinimumDate; }
get { return pickerDate.MinimumDate ?? DateTime.MinValue; }
set { pickerDate.MinimumDate = value; }
}
public DateTime MaximumDate
{
get { return pickerDate.MaximumDate; }
get { return pickerDate.MaximumDate ?? DateTime.MaxValue; }
set { pickerDate.MaximumDate = value; }
}
//-------------------------------------------------------------------
@@ -98,7 +98,7 @@ namespace Sarand.Net.Mobile.Maui.Controls
get
{
if (invalidDate) return DateTime.MinValue;
return pickerDate.Date;
return pickerDate.Date ?? DateTime.MinValue;
}
set
{
@@ -1,4 +1,4 @@
using Sarand.Net.Mobile.Maui.Layouts;
using Sarand.Net.Mobile.Maui.Layouts;
using Sarand.Net.Mobile.Maui.Views;
using Sarand.Net.Standard.Base.Utils;
using System;
@@ -72,7 +72,7 @@ namespace Sarand.Net.Mobile.Maui.Controls
// Control value.
public DateTime DateTime
{
get { return pickerDate.Date.Date + pickerTime.Time; }
get { return pickerDate.Date.Date + (pickerTime.Time ?? TimeSpan.Zero); }
set
{
if (DateTime.CompareTo(value) == 0) return;
@@ -1,4 +1,4 @@
using Sarand.Net.Standard.Base.Utils;
using Sarand.Net.Standard.Base.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -27,7 +27,7 @@ namespace Sarand.Net.Mobile.Maui.Controls
//-------------------------------------------------------------------
// Properties.
public String FormattedTime { get { return DateUtil.Format(DateTime.Today + Time, Format); } }
public String FormattedTime { get { return DateUtil.Format(DateTime.Today + (Time ?? TimeSpan.Zero), Format); } }
// Styling.
public double DefaultFontSize { get; }