Over a million developers have joined DZone.

Game Changing Features in Silverlight 5 (Part 3)

·

In the second part of my “Game-changing Features” series, I investigated how to create multiple windows in a trusted Silverlight 5 application. Now, it is time to explore another set of features: SoundEffect Class for Low-Latency, Supporting Double- and Triple-Mouse Clicks and Linked Text Containers.  If you followed my previous tutorial, then you should be ready to get started. The full source code for all three of the projects will be available as a separate download with this article.

The full article is hosted on SSWUG and you can access it by clicking here. Don’t forget to rate it and leave comments if you have any problems.


Linked Text Containers

The Linked Text Containers feature enables the text of a RichTextBox control to overflow from one into the next. Multiple RichTextBoxOverflows can be chained together to spread text across a layout.

Go ahead and create a new Silverlight 5 Beta Project called, “SSWUGLinkedTextContainers”.

Once you do this, you are ready to create the user interface. Double-click on the MainPage.xaml. Then, copy and paste the following code snippet while replacing the included Grid.

 

<StackPanel Width="400">

        <RichTextBox x:Name="rtb1" Margin="0,0,5,3" Height="200" Width="300" OverflowContentTarget="{Binding ElementName=rtb2}" VerticalScrollBarVisibility="Disabled"

                     HorizontalScrollBarVisibility="Disabled">

            <Paragraph>

                <Run Text="Type a bunch of text to make it overflow into the next RichTextBoxOverflow field"/>

            </Paragraph>

        </RichTextBox>

        <RichTextBoxOverflow x:Name="rtb2" VerticalScrollBarVisibility="Disabled"

                     HorizontalScrollBarVisibility="Disabled"/>

    </StackPanel>

 

Other Resources by Me:

My webinar on “Getting started with the Silverlight 5 Beta”.

Getting Started with the Silverlight 5 Beta!
Game Changing Features in the Silverlight 5 Beta (Part 1)
Game Changing Features in the Silverlight 5 Beta (Part 2)
Game Changing Features in the Silverlight 5 Beta (Part 3)
Topics:

Published at DZone with permission of Michael Crump. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}