views:

148

answers:

1

I've been following the Silverlight text editor sample with interest. It gives me a lot of functionality such as formatting, clipboard support, printing etc.

The sample also allows for DataGrids to be inserted by using an InlineUiContainer.

My problem is that the inserted DataGrid is disabled while my requirement is that the user can edit the contents of the DataGrid.

How can I make InlineUiContainers that are inserted in a RichTextBox enabled?

A: 

The RichTextBox has to be ReadOnly to make controls respond to events. I got around this by making the RichTextBox be ReadOnly by default then become editable on focus.

My problem was having RichTextBoxes in a DataGrid which also has other controls embedded in each RichTextbox. It doesn't sound like your RTB can ever be out of focus ReadOnly since there will only be one RTB.

You'll have to think of some strategy that will put the RTB into ReadOnly mode under certain conditions.

adamhathcock