Latest News

  • Silverlight Online Chat
    Jul 24, 2010

    Today we launch the new Silverlight Live Chat application demonstrating the Liquid RichTextBox and Emoticon replacements.

  • New Super Shoot Em Up 2 Game
    Jun 29, 2010

    Added to the Games section is the new Super Shoot 'Em Up 2 game. Take control of your tank with the aim to defeat the computer controlled opponents. Features all new weapons, levels and Battle Mode!

  • Silverlight 4 Controls V5.3.2 Released
    Jun 28, 2010

    This release contains several fixes raised in the forums.

  • New Sandmania Puzzle Game
    Jun 18, 2010

    Sandmania is the latest game from vectorlight, the aim of this game is to guide sand from the top of the screen to the various colored containers below.

  • New Moon Tower Defense Game
    May 29, 2010

    Added to the Games section is the new Moon Tower Defense game. Defend the Moon from the circling Aliens and Humans.

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!

 
 

Rate this page: 

1 Star 2 Star 3 Star 4 Star 5 Star
4 Ratings / 2.5 Average