This is a migrated thread and some comments may be shown as answers.

Multicolor text on RadTreeView nodes

1 Answer 23 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Kin
Top achievements
Rank 1
Kin asked on 01 Dec 2009, 04:14 PM
I have a need for short paragraphs on the nodes/leaves of a RadTreeView.  I was readily able to bind a (wrapping) TextBlock's Text to in-memory objects, and all works fine.

The next step was to get multicolor text, instead of plain text, on these nodes.  Now I have hit a snag ... can't figure out how to use that TextBlock (or what to replace it with) to get bindable multicolor text.  Searching on this a bit, evidently "bindable Run" is a bit of an issue, and won't be resolved until WPF 4.0.

I'd really appreciate any suggestions that would work, prior to WPF 4.0.  Is there something in the Telerik suite that works around this? 

Thanks in advance for any help!

1 Answer, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 03 Dec 2009, 11:23 AM
Hi Kin,

Unfortunately we do not offer a RichText to help you in this case.

I can only suggest things that you have probably though of already:
- Bind to several TextBlocks instead of one, this is not very maintainable though.
- Bind the Content property of a ContentPresenter and use a Converter for the binding (IValueConverter) that will take the required property and generate a TextBlock with the required colored runs.

Greetings,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
TreeView
Asked by
Kin
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Share this question
or