Improve shared MAUI controls and tests

This commit is contained in:
Andy Howard
2026-10-06 14:13:28 +01:00
parent 0406adfc99
commit 5daf7ce97f
106 changed files with 2299 additions and 805 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -18,7 +18,7 @@ namespace Sarand.Net.Mobile.Maui.Views
/// </summary>
void ConfigureComponents();
void SetControlActivity();
void SetControlActivity(bool enabled);
void SetControlsReadOnly();
+4 -3
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace Sarand.Net.Mobile.Maui.Views
{
//=======================================================================
public class SamBorder : Border
public class SamBorder : Border, ISamView
{
//-------------------------------------------------------------------
// Definitions.
@@ -32,8 +32,9 @@ namespace Sarand.Net.Mobile.Maui.Views
//-------------------------------------------------------------------
// Control activity.
public virtual void SetControlActivity()
public virtual void SetControlActivity(bool enabled)
{
if (IsEnabled != enabled) IsEnabled = enabled;
SetControlsReadOnly();
}
public virtual void SetControlsReadOnly()
+3 -2
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -32,8 +32,9 @@ namespace Sarand.Net.Mobile.Maui.Views
//-------------------------------------------------------------------
// Control activity.
public virtual void SetControlActivity()
public virtual void SetControlActivity(bool enabled)
{
if (IsEnabled != enabled) IsEnabled = enabled;
SetControlsReadOnly();
}
public virtual void SetControlsReadOnly()
+5 -4
View File
@@ -1,4 +1,4 @@
using Sarand.Net.Mobile.Maui.Utils;
using Sarand.Net.Mobile.Maui.Utils;
using Sarand.Net.Standard.Base.Utils;
using System;
using System.Collections.Generic;
@@ -33,7 +33,7 @@ namespace Sarand.Net.Mobile.Maui.Views
public bool ReadOnly
{
get { return readOnly; }
set { if (readOnly == value) return; readOnly = value; SetControlActivity(); }
set { if (readOnly == value) return; readOnly = value; SetControlActivity(IsEnabled); }
}
//-------------------------------------------------------------------
@@ -44,8 +44,9 @@ namespace Sarand.Net.Mobile.Maui.Views
//-------------------------------------------------------------------
// Control activity.
public virtual void SetControlActivity()
public virtual void SetControlActivity(bool enabled)
{
if (IsEnabled != enabled) IsEnabled = enabled;
SetControlsReadOnly();
}
public virtual void SetControlsReadOnly()
@@ -60,7 +61,7 @@ namespace Sarand.Net.Mobile.Maui.Views
base.OnPropertyChanged(propertyName);
if (propertyName.EqualsCI(IsEnabledProperty.PropertyName))
{
SetControlActivity();
SetControlActivity(IsEnabled);
}
}
+3 -2
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -32,8 +32,9 @@ namespace Sarand.Net.Mobile.Maui.Views
//-------------------------------------------------------------------
// Control activity.
public virtual void SetControlActivity()
public virtual void SetControlActivity(bool enabled)
{
if (IsEnabled != enabled) IsEnabled = enabled;
SetControlsReadOnly();
}
public virtual void SetControlsReadOnly()
+3 -2
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -32,8 +32,9 @@ namespace Sarand.Net.Mobile.Maui.Views
//-------------------------------------------------------------------
// Control activity.
public virtual void SetControlActivity()
public virtual void SetControlActivity(bool enabled)
{
if (IsEnabled != enabled) IsEnabled = enabled;
SetControlsReadOnly();
}
public virtual void SetControlsReadOnly()