You don't see a RadRichTextBox because you've set the DataType
of your DataTemplate(DT) not its content. It's not a common practice go set DTs in code-behind but if you want to it is possible:
1) you could get a DT resource and set it.
2) you could create your own DT in code using the FrameworkElementFactory.
I've attached a sample project showing both approaches so you could decide which one is better for you.
Just one question - do you really need to set the ContentTemplatate ? Why don't you set the Content directly:
I hope I was able to help you and if you have more questions feel free to ask.
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>