Latest News

  • Super Tower Defense Game
    Mar 10, 2010

    New to the games section is the new Super Tower Defense game. Defend your base from the ever advancing army of tanks, buggies...

  • New Rich Text Editor User Control
    Feb 19, 2010

    By popular request, here we present a re-usable User Control containing the Liquid RichTextBox along with the most common formatting functions included.

  • Silverlight 3 Controls V5.2.7 Released
    Feb 19, 2010

    This release includes several fixes for issues raised in the forum. The main improvement is to the RichTextBox which now provides access and methods to the document elements allowing...

  • Super Shoot Em Up Game
    Feb 04, 2010

    Added to the games section is the new Super Shoot 'Em Up game. Take control of a tank with your aim being to blow up your opposing tanks and collect all the powerups.

  • Silverlight 3 Controls V5.2.6 Released
    Feb 04, 2010

    This release includes some minor fixes for several forum posts. Please see the notes on the download page for full details on what has changed.

drVeljko
drVeljko
How to insert formatted text in run Posted: Feb 08, 2010
 

Hello Dan, thanks for great control!

Is there a way to insert formated text in the run?

I have some saved html source code(simple paragraph) that I want to insert in the position of the carret in richtextbox.


Thanks!

Veljko

 
 
dan
dan
RE: How to insert formatted text in run Posted: Feb 17, 2010
 

Hi Veljko,


You can certainly insert formatted text.  The text must firstly be RichText XML and not HTML.  To insert RichText simply call:


myRichTextBox.Insert(richTextXML);


Hope this helps!

 
 
karanjainitbhu
karanjainitbhu
RE: How to insert formatted text in run Posted: Mar 03, 2010
 

Hi,


I just tried doing this:


Inserted a Rich Text Box named 'blogText' and simply wrote the text "My name is ajay kumar Gautam." in it. Then I exported the XAML code using


string xaml_code = blogText.XAML;


I also tried : string xaml_code = blogText.save(Format.XAML,RichTextSaveOptions.InlineStyles);


Both gave me the same result. Then I used the exported XAML code to insert it back in the text box using the following:


blogText.Insert("<Paragraph TextAlignment=\"Left\"><Run FontFamily=\"Portable User Interface\" FontSize=\"11\" Foreground=\"#FF000000\" >My name is ajay kumar Gautam.</Run></Paragraph>");


But it didn't display anything. However, I also tried:

blogText.Insert("<Xaml><Image Source="my_image_src" /></Xaml>


and it displayed the image in the text box. Why is it not displaying the above text back again?

 
 
karanjainitbhu
karanjainitbhu
RE: How to insert formatted text in run Posted: Mar 03, 2010
 

Hi,


I just figured out my problem. It works when I export and import using XML. But still do not understand, why it doesn't work with XAML format.

 
 
dan
dan
RE: How to insert formatted text in run Posted: Mar 06, 2010
 

Hi,


Thats correct, the XAML format is for Save only, you cannot load XAML.


Thanks!