views:

44

answers:

2

I'm building an application with Silverlight 3.0 and I need a Text control that can provide the following features:

  • Copy and paste
  • Formating (either bold or color)
  • Scrollable progamatically (either natively or through a ScrollViewer)
  • Any ideas?

    +1  A: 

    There's a number of RichTextBoxes out there:

    Free:

    RichTextEdit on Codeplex

    @Cost:

    You'll have to dumb these down to meet your requirements, but you can get the source control if you need too.

    I would also suggest that you can create a custom control for the requirements you've listed above.

    • Copy and Paste - In WPF you can bind Keyboard or UI events/commands to ApplicationCommands. I'm not sure if this is supported in SL 4.0, but I'm pretty sure it isn't in 3.0. TextBoxes do have that functionality already, so you could have your control derive from a TextBox.
    • Formatting - You can also easily recreate this functionality with Silverlight, just have buttons that change the "FontWeight" and "Foreground" properties on your control
    • Again with WPF you could create your own logic for the scrolling you want to achieve, there are many examples out there.

    HTH

    Chris Nicol
    A: 

    Silverlight 4 has native support for rich text, but that is still in beta. Here is some info on that: http://tinyurl.com/y9fjsht

    Henrik Söderlund