I want to bind BOTH ways a textbox (textBox1) to rc1.RichText...

When I first execute, textBox1 shows "richtext" as expected, but pressing
button1 does not change textBox1 to "reset...". The bind only supports
changing rc1.RichText whenever textBox1 changes, but not the other way.
Am I missing something?

Code:
namespace WindowsApplication1
{
// simple form with one textbox and one button
    public partial class Form1 : Form
    {
        RichClass rc1 = new RichClass();
        public Form1()
        {
            InitializeComponent();
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            textBox1.DataBindings.Add("Text", rc1, "RichText");
        }
        private void button1_Click(object sender, EventArgs e)
        {
            rc1.RichText = "reset richtext proprty";
        }
    }
    public class RichClass
    {
        private string richText;
        public RichClass()
        {
            richText = "richText";
        }
        public string RichText
        {
            get { return richText; }
            set { richText = value; }
        }

    }
}

Last edited by shabbir; 3Feb2008 at 19:37.. Reason: Code block