70 lines
2.1 KiB
C#
70 lines
2.1 KiB
C#
using Sarand.Net.Standard.Base.Core;
|
|
using Sarand.Net.Standard.Base.Utils;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Text;
|
|
|
|
using Xamarin.Forms;
|
|
|
|
namespace Sarand.Net.Mobile.Xamarin.Forms.Views
|
|
{
|
|
//=======================================================================
|
|
public class SaxContentView : ContentView
|
|
{
|
|
//-------------------------------------------------------------------
|
|
// Definitions.
|
|
|
|
//-------------------------------------------------------------------
|
|
// Data members.
|
|
private bool readOnly = false;
|
|
|
|
//-------------------------------------------------------------------
|
|
// Construction.
|
|
public SaxContentView ()
|
|
{
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Properties.
|
|
public bool ReadOnly
|
|
{
|
|
get { return readOnly; }
|
|
set { if (readOnly == value) return; readOnly = value; SetControlActivity(); }
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// C o n f i g u r e C o m p o n e n t s
|
|
//-------------------------------------------------------------------
|
|
protected virtual void ConfigureComponents ()
|
|
{
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// C o n t r o l A c t i v i t y
|
|
//-------------------------------------------------------------------
|
|
protected virtual void SetControlActivity ()
|
|
{
|
|
SetControlsReadOnly();
|
|
}
|
|
protected virtual void SetControlsReadOnly ()
|
|
{
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// V i e w E v e n t s
|
|
//-------------------------------------------------------------------
|
|
protected override void OnPropertyChanged ([CallerMemberName] string propertyName = null)
|
|
{
|
|
base.OnPropertyChanged(propertyName);
|
|
if (propertyName.EqualsCI(IsEnabledProperty.PropertyName))
|
|
{
|
|
SetControlActivity();
|
|
}
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
} |