-
Apr 26th, 2013, 01:12 AM
#1
[RESOLVED] Displaying RTF in list, what control can I use?
I need to be able to display a list but the items are in RTF and I want to be able to display the formatted text, what are my options to be able to do this?
-
Apr 26th, 2013, 01:18 AM
#2
Re: Displaying RTF in list, what control can I use?
RichTextBox. One of the aims of WPF was to make controls composable, meaning that one control can appear inside another. You can put a RichTextBox inside other controls, e.g. ListView, no problem. Here's an example of a TextBox inside a ListView:
http://social.msdn.microsoft.com/For...0-da5ee6330da6
A RichTextBox would be similar. You can do similar things with other controls, e.g. ListBox.
-
Apr 26th, 2013, 01:21 AM
#3
Re: Displaying RTF in list, what control can I use?
Yes, I was hoping it was easy like that but Richtextbox has no immediate property that I can bind into to make it work just like in TextBlock. Will try searching on how to make such property.
-
Apr 26th, 2013, 01:39 AM
#4
Re: Displaying RTF in list, what control can I use?
Originally Posted by dee-u
Yes, I was hoping it was easy like that but Richtextbox has no immediate property that I can bind into to make it work just like in TextBlock. Will try searching on how to make such property.
If that is the case then you could probably inherit the RichTextBox class and add a property yourself. Internally, that property can access the Document and use a TextRange or whatever's required.
-
Apr 27th, 2013, 12:25 AM
#5
Re: [RESOLVED] Displaying RTF in list, what control can I use?
The Richtextbox in WPF Toolkit has a Text property I can bind into. =)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|