OK, so I wanted to bind a property of my object (one of the report pages) to the Rtf property of a rich text box.
.Net didn't provided the data binding to the Rtf property so, after some web research, I created a little MyRichTextBox class that set the DefaultBindingProperty to "Rtf".
It works like a champ but seems WAY to easy. Is that all that I need to do? Or is there something that I am missing?
The whole new class is about 17 lines longs. So there must be something else that I need to do.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NoneYa
{
[System.ComponentModel.DefaultBindingProperty("Rtf")]
class MyRichTextBox : System.Windows.Forms.RichTextBox
{
new public string Rtf
{
get { return base.Rtf; }
set { base.Rtf = value; }
}
}
}