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.

thorsten
thorsten
Issue in RichTextBox by Using a Stackpanel Posted: Jan 28, 2010
 

Hello,


i think i found an issue while using the RichTextBox in an Stackpanel with Orientation Horizontal. When i add the RichTextBoxes to my Stackpanel and use Orientation Vertical, i can see the full RichText in my App, but when i use the Horizontal Orientation the RichtextBox shrink to a width of 20px. I can't give a fixed Width to my RichTextBoxes, because i create it at the runtime.


<Source>

stackcontent.Orientation = Orientation.Horizontal;

            foreach (var news in allnews)

            {

                stackcontent.Children.Add(GetRichTextBox(news.ToString()));

                stackcontent.UpdateLayout();

            }


private RichTextBox GetRichTextBox(string richtext)

        {

            var border = new Thickness(0, 0, 0, _newsseperator);

            var mytextbox = new RichTextBox

                                  {

                                      BorderThickness = border,

                                      SelectMode = SelectMode.ReadOnly,

                                  };

            mytextbox.RichText = richtext;

            mytextbox.RefreshStyles();

            mytextbox.RefreshElement(mytextbox);

            return mytextbox;

        }

</Source>


I hope you can help me

thanks

Thorsten

 
 
dan
dan
RE: Issue in RichTextBox by Using a Stackpanel Posted: Jan 30, 2010
 

Hi Thorsten,


The RichTextBox needs to have a fixed width, otherwise like you have found it will default to 20px.


Thanks!

 
 

Rate this page: 

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