SL4 now contains a Microsoft implementation of a RichTextBox. This is awesome but doesn't support bullets, numbering, super script or subscript.
There are also a bunch of other RichTextBox implementations out there from the control providers.
When is the best time to use the Microsoft one and when should I go to the market? What is the best control for the different use cases for a Rich Text control?
BTW, I'm not looking for subjective stuff. I'm interested in functionality, performance, extensibility, download size etc
performance? Forget about Microsoft`s RichTextBox. The WPF RichTextBox is a speed mess because its a FlowDocument. Silverlight is not different.
Related
Is there any editor control in Silverlight 4?
I just want the basic functionality; much what Stackoverflow has while posting question. The basic stuff like making it bold, italic, etc. I saw Telerik's editor control. However, I'd rather not use it because it is a very large assembly of 1 MB. After already adding a few of Telerik's assemblies, my XAP size is above 2 MB.
Have you considered just using code around the built in RichTextBox?
Download sample from the MSDN documentation at http://msdn.microsoft.com/en-us/library/ff426926(v=VS.95).aspx.
Something to consider though is what ultimately you want to do this this Rich text? The built in control use Xaml to describe the rich text which isn't much use to you if ultimately you need to expose it in an email.
In a WinForms project there are a number of controls such as MenuStrip, OpenFileDialog, SaveFileDialog.
After a quick look, I can't seem to see the equivalents for these controls in the WPF toolbox.
Is there any way to gain access to these or do they exist in another form?
There are a number of different resources you can use for finding the type of control you need.
Have you looked in the WPF Toolkit?
Have you investigated any third party control vendors?
(Telerik, DevExpress, ComponentOne, Infragistics)
Here's an excellent link comparing the WinForms and WPF control equivalents.
You'd probably recieve a more detailed answer if you gave specifics as to which control you're looking for.
you can add a winforms host into the project but which controls are you after as the wpf does have a decent amount of controls and generally does more in the ui department (but pays in speed usually)
Is there a way to download more controls or anything, because I have seen a few things in other programs I don't think I've seen in the toolbox. Can you download new ones, or did the company somehow custom make a control? If it was custom made, are there any tutorials I can take a look at that tell how to make your own?
Some companies make third party controls for Winforms - Telerik is one I know of.
Personally, I prefer to make my own controls based on the existing WinForms ones, as I have more control over them - this prevents my products from having bugs which just can't be fixed. I can also tweak the controls to do exactly what I need, rather than choosing a closest match. Building custom controls is relatively easy if you have the experience.
There is a basic tutorial on CodeProject which shows how to create a fancy Button. After that you should be able to figure out how to customize more complex controls.
Side-note:
While it's reasonably easy to develop custom controls in WinForms if you have the time to practice, WPF is a much better framework for building custom controls. WPF controls are designed specifically for customization, so there is a lot more flexibility.
I am writing a text editor and had planned on using the richtextbox control however, the richtextbox's performance is abysmal. On even small documents the wpf richtextbox lags if you hold a key down. I do not need all of the features of the wpf richtextbox, but I do need rtf support.
How can I implement this?
If you need RTF support, you're best off just using RichTextBox. RichTextBox's slower performance mainly comes from supporting RTF, which is not trivial.
The wpf richtextbox understand FlowDocuments Winforms richtextbox not.
Maybe this helps you in general using wpf`s richtextbox:
http://www.codeproject.com/KB/WPF/BindableWPFRichTextBox.aspx
http://michaelsync.net/2009/06/09/bindable-wpf-richtext-editor-with-xamlhtml-convertor
Our team decided that we need our own custom Rich text box control for Silverlight app we are developing. We looked at existing controls mentioned at A good rich text control for Silverlight
but decided to build our own,due to varios reasons. We are planning to build it in stages, with elementary functionality in 1st stage which mainly includes text formatting. There are very big differences in our team on its estimate, as we don't have prior experience on wpf or silverlight technology.
Can you please help with guesstimates on how long it might take to build such a control, e.g. with the functionality provided by vectorlight or ComponentOne's rich text controls?
EDIT: To make question less vague:)- in 1st stage we plan to mainly add - text editing, styling, formatting, text flow, undo-redo, columns, lists.
A really long time. Building a fully-featured text edit control is one of those things like writing your own build system, that might look simple but is in fact extremely difficult, when you get into internationalization.
It may be quicker to wait and use Silverlight 4 and its Rich Text Control, it supports most of the common Rich Text functions - and supports control hosting so would allow some custom additions it if needed.