tags:

views:

9

answers:

1

Greetings, We would like to create some text editor for our clients in our software. We would like to have a simple options like: bold, underline, italic, hyperlink. Then i would like this message to be saved in db as xaml and then just bind the xaml string to my Content Control. The xaml can be as follows:

<TextBlock>
<TextBlock.Text>
<Hyperlink NavigateUri="http://somesite.com"/&gt;
Click here to go to somesite.com
</TextBlock.Text>
</TextBlock>

Is there any free editor for this purspose? How can I parse the string to be saved in appropriate, correct XAML.

A: 

In order to parse the XAML, use the XamlReader class. The load method is overloaded to give you several options on parsing XAML. There are several projects that you can look at if you don't want to reinvent the wheel (although the XamlReader is quite powerful).

David in Dakota
and how for instance save something like that to xaml:Please click [a href='http://www.somesite.com']here[/a] to see the page. This page has <bold>lots of useful information</bold>
niao