Improve shared MAUI controls and tests
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user