Can you create a real sample of this control like you'd actually use it in the real world? Please consider the following:
- Project contains SampleDataObject1 and SampleDataObject2, which are instances of SampleDataObject, which contains the following property:
public string HtmlBody { get; set; } - Silverlight page contains a RichTextBox on it. We want the default start font of Verdana size 12 for it.
- There is a button for setting the page's DataContext to each of the two SampleDataObject instances (one button for each object).
- Binding is set up for the RichTextBox so that the Html representation of its contents (through the HtmlDataPovider) is bound to the HtmlBody property of the DataContext (the currently selected SampleDataObject instance).
- There is a button to toggle the Bold state, and another to toggle Italics, in the RichTextBox.
- And here's the big one - since we want to reuse this component all over our application, we want to put all the RichTextBox parts in a UserControl. That means the UserControl should include the formatting buttons and have a Html property that we'd use for the Binding (i.e. the creator of the Page wouldn't know anything about any HtmlDataProvider).