How to Use Rich text Format in Nodetemplate

Hi All,

I want to use rich text format in node template .

Currently i am using N woods Library with silver light .

Kindly help me on same , If possible please provide source code .

Thanks

udaiveer

First, you need to be using Silverlight 4, since that introduces the RichTextBox control.

Second, here's how you could define a node using a RichTextBox:
[code]<DataTemplate x:Key="NodeTemplate5">
<Border BorderBrush="Blue" BorderThickness="1" CornerRadius="4" Background="LightGray" Padding="3"
go:Node.Location="{Binding Path=Data.Location, Mode=TwoWay}">
<RichTextBox IsReadOnly="True" IsTabStop="False" Width="100" Height="100">
<Paragraph>
Some <Bold>Node</Bold> <Span FontSize="14">data</Span> in <Span Foreground="Red">red</Span>.
</Paragraph>
<Paragraph>
Visit the
<Hyperlink NavigateUri="http://www.nwoods.com/forum/forum_topics.asp?FID=7">GoXam Forum</Hyperlink>.
</Paragraph>
</RichTextBox>
</Border>
</DataTemplate>[/code]
This works fine, except when the user tries clicking on the Hyperlink. Then there's an exception, which appears to be a bug in Silverlight: http://silverlight.codeplex.com/workitem/7696.
I think you can implement a work-around by overriding Diagram.OnGotFocus to just call the base method wrapped in a try/catch to muffle the exception. We'll implement this ourselves in the next bug-fix release.