|
using System;
using System.ComponentModel;
namespace Clifton.Tools.Data
{
public class BindableDataElement : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
public event EventHandler TextChanged;
protected string text;
public string Text
{
get { return text; }
set
{
if (text != value)
{
text = value;
OnTextChanged();
}
}
}
public BindableDataElement()
{
}
protected virtual void OnTextChanged()
{
if (TextChanged != null)
{
TextChanged(this, EventArgs.Empty);
}
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("Text"));
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.