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.

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!