Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm looking for a rich text box for a winform application. C#, .net 4.0
I need support for Bold, Underline, bullets and numbering in the text box.
In the future, to add language support with spelling correction is a wish.
I need this to work with ITextSharp for report generation.
I'd appreciate input on which choise of controls that would best suit my needs.
I've previously used on various projects RadControls, Infragistics and iTextSharp but not DevExpress so I can't speak to DevExpress. That being said, for the kinds of rich text editing you are describing, I think you can safely go with any of the 3. If it were up to me, I would go with Infragistics though.
I guess it's a matter of personal preference in this case but I've always found Infragistics to be easier to use than RadControls. I've also found Infragistics' documentation to be better (from the standpoint of ease of locating what I was looking for) than that of RadControls. Both Infragistics and Telerik (RadControls) support teams/communities were very active and helpful whenever I needed help.
Like I said, I can't speak to DevExpress but I would imagine it'll be very comparable to the other two in this context. If you have any specific questions about Infragistics and RadTools, feel free to ask. I'd be happy to answer them.
From your question i was not able to deduce which form of Windows Application are you talking about. Because as you know we can develop windows based application on .NET using Windows Presentation Foundation or traditionally known WinForms development. I cant speak for others but certianly can point you to 2 flavours available from Telerik for Windows Application Development. They are:
RadControls for WinForms - RadRichTextBox:
Features:
Rich Text Formatting - Telerik RadRichTextBox control allows you to
edit text and apply rich formatting options, like:
Bold
Italic
Underline
Strike Through
Text color and background
Bullet and numbered lists
Paragraph alignment and indentation
Show/Hide formatting symbols
Clear Formatting
Superscript and Subscript
Inserting pictures/symbol
SpellChecker - extensible spell checking for different languages,
using built-in or custom dictionaries.
Multi-level Undo/Redo Support - Telerik RadRichTextBox provides
desktop-like usability and control thanks to its multilevel
Undo/Redo feature. It allows past actions to be reviewed and
reversed, just like in Microsoft Word.
Two types of layout – Paged and Flow (as text in an HTML page viewed
in a browser).
Multi-region selection - the built-in multi-region support enables
you to perform various operations for more than one selection
simultaneously.
Import/export - with Telerik RadRichTextBox control you can load
XAML, HTML, RTF, DocX (rich-text) or TXT (plain text) into the
control, you can format and edit it and then export it back to any
of the above formats or PDF.
More information on this can be found at: http://www.telerik.com/products/winforms.aspx
Documentation for RichTextBox for WinForms can be found at: http://www.telerik.com/help/winforms/richtextbox-overview.html
RadControls for WPF - RadRichTextBox:
Features:
Rich Text Formatting - Telerik RadRichTextBox control allows you to
edit text and apply rich formatting options, like:
Bold,
Italic
Underline,
Strike Through, Superscript and Subscript
Usage of all available system fonts
Text color and background
Bullet and numbered lists
Paragraph alignment and indentation
Show/Hide formatting symbols
Clear Formatting
Inserting pictures/symbols/hyperlinks/custom UI elements
Table support – including nested tables, merging cells, setting
different RowSpan and ColumnSpan, tables with auto width and more.
ContextMenu - a standard one is provided out of the box, but it can
be easily customized or substituted for a user-defined one.
SelectionMiniToolbar - very similar to the one in MS Word, but can
also be replaced with another.
SpellChecker - extensible spell checking for different languages,
using built-in or custom dictionaries.
Printing – Using the native printing implementation of WPF.
Multi-level Undo/Redo Support - Telerik RadRichTextBox provides
desktop-like usability and control thanks to its multilevel
Undo/Redo feature. It allows past actions to be reviewed and
reversed, just like in Microsoft Word.
Two types of layout – Paged and Flow (as text in an HTML page viewed
in a browser).
Multi-region selection - the built-in multi-region support enables
you to perform various operations for more than one selection
simultaneously.
Rich-text clipboard – allows rich text copy/paste from Word,
OpenOffice etc.; Import/export - with Telerik RadRichTextBox
control you can load XAML, HTML, RTF, DocX (rich-text) or TXT
(plain text) into the control, you can format and edit it and then
export it back to any of the above formats or PDF.
More information can be read at : http://www.telerik.com/products/wpf/overview.aspx
Here is the documentation of RichTextBox : http://www.telerik.com/help/wpf/radrichtextbox-overview.html
Hope with above information you are able to visualize the gamut of options our control provides.
Lohith (Tech Evangelist, Telerik India)
Related
Are there any good guides on making WPF applications 508 compliant? For example, does every text input box need to be associated with a label via some tag type like with webpages?
There is this white paper at WindowsClient.net that appears to contain guidelines.
There is also this pdf about accesibility in Infragistics' WPF controls. It may contain some clues, but it is in the context of custom controls rather than entire UIs.
I find Engineering Software for Accessibility portal page very useful, as it covers all aspects of the accessible application development - with a handful of links to MSDN pages.
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.
I'm looking for something like a pdf or anything else that would show a chart of available controls in SL and/or WPF.
Ideally, the chart should have a drawing of the control, some succinct description and the hierarchy if possible.
Has anyone seen such a thing? Freeware or Payware, can even be from a book I could buy.
The following MSDN link lists the controls within the Silverlight SDK:
http://msdn.microsoft.com/en-us/library/cc189048(VS.95).aspx
You can try the sdk controls live following this link:
http://samples.msdn.microsoft.com/Silverlight/SampleBrowser/#/?sref=HomePage
The controls within the Silverlight Toolkit can be found here:
http://silverlight.codeplex.com/
Also, there are plenty of third party controls for Silverlight. The following link contains a list to some of them (free or not):
http://timheuer.com/blog/archive/2009/01/28/comprehensive-list-of-silverlight-controls.aspx
The controls that are shipped with the platform are fairly straightforward, so I'm not sure that would even make sense - i.e. the basic buttons, input box, text block, etc.
As for the controls that are shipped with the Toolkit, which is the richer feature set released out of band in relation to the Silverlight trunk, you can preview everything you asked for here:
http://www.silverlight.net/content/samples/sl4/toolkitcontrolsamples/run/default.html
What's more, the source code for the preview is included with the tool kit so it's very easy to see how any of those controls were used.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm mostly a C# programmer, I stopped writing Java about 10 years ago, but I try to keep up with the technology in Java by reading articles, talking with friends, etc.
I've heard about the new rich GUI framework called JavaFX, but couldn't find any resource comparing it with non-Java parallels.
Since I'm very familiar with C# and WPF, I'd like to get a feel about how similar or different the two technologies are.
EDIT: Seeing as there's no answers coming, I'll try to be more specific:
WPF uses XAML to create the visual tree, does JavaFX have something similar?
WPF is best used with binding to a view model in an MVVM pattern, does JavaFX also make extensive use of binding?
WPF utilizes the GPU for rendering, does JavaFX do the same?
How does Silverlight compare to JavaFX when run through a browser on a net pc?
... More to come...
I'm changing this to community wiki so that the comparisons can keep getting updated (hopefully).
I have been learning JavaFX for the last couple of weeks. Here is a high level overview of how it compares to WPF in my eyes:
All of my comments are related to JavaFX 2.0. This information will probably be subject to change as the platform is still fairly immature and is being actively developed.
Graphics
Like WPF, JavaFX uses a retained graphics rendering system. The user interface comprises a scene graph which is composed of 'nodes' which can be thought of as conceptually similar to WPF's UIElement.
JavaFX will offload the graphics rendering to the GPU if available. The graphics system uses DirectX on Windows and OpenGL on other platforms.
Markup
JavaFX user interfaces can be created both in code and via FXML markup which is similar to XAML in that the object graph can be created by nesting elements.
FXML has some similar features to XAML such as property binding (simple expressions only) and binding to event handlers (any onEvent method). Event handlers can be declared in-line but typically you would bind to an event in the associated controller.
FXML files can have an associated controller which allows you to declare complex event handlers and to set up bindings between properties. This is a controller in the MVC sense and is not the same as a viewModel in the WPF world (typically a controller will have references to nodes and controls).
One difference to WPF is that it appears that the FXML is not compiled into an intermediate binary representation like BAML. I haven't noticed any performance issues yet but have not used the system extensively. I have noticed though, that FXML usually tends to be shorter than any XAML as the platform still encourages you to write code and styles are declared separately.
An introduction to FXML can be found here.
A scene builder is provided free (as in beer), so if you don't like hand coding the UI you can drag and drop elements, set properties and bind to code in your controller and the FXML will be generated automatically. Obviously the scene builder is nowhere near as powerful as Expression Blend but it is still better than the 'designer' provided by Visual Studio.
Binding
JavaFX has a very powerful property and binding system. The Java Bean pattern has been extended to include classes that encapsulate a property (similar to the way WPF dependency properties represent properties). These classes implement interfaces that provide invalidation and change notification.
There is a distinction between invalidation notifications and change notifications. Invalidations just tell you that the binding expression is now invalid and needs to be recalculated; the recalculation does not actually occur until you request the property value via its get() or getValue() methods. If you have registered a change listener, however, then the expression will be re-evaluated immediately and anything that is bound to that property will reflect the changes.
JavaFX exposes these properties in a similar way to WPF with a get and set property and a method that returns an instance of the property wrapper (which are not static like WPF properties).
Complex bindings can be created between multiple properties. Want an integer property to be the sum of two others (a = b + c)? No problem, JavaFX provides a Fluent API to express these kind of relationships E.G.
A.Add(B, C);
If the value of either B or C changes then the appropriate notifications will be raised so that the system knows that A needs to be re-evaluated. Note that in this case, an exception will be thrown if you try and set the value of A as it is bound to the other properties so it does not make sense in this context.
These expressions can be fairly complex E.G. a = (b + c) * (d - e) and can include any number of properties. The fluent API is fairly easy to read and use but is not as nice as some of the Fluent API's provided by some of the Microsoft libraries but this is more down to the Java language limitations rather than JavaFX itself.
Simple bi-directional bindings can be created between properties of the same type so that if one is updated the other automatically reflects the change.
JavaFX also provides a low level API to customise bindings yourself if you want to create a custom binding expression that is not provided by the API or if you are concerned about performance.
One of the biggest differences between JavaFX and WPF is that bindings are primarily carried out in code in JavaFX vs. the WPF way of establishing bindings in mark-up.
An introduction to properties and bindings can be found here.
Styles
JavaFX uses CSS to change the looks of the nodes contained in the scene graph. There is a full specification available which explains the types and the properties that can be set on each node type.
JavaFX also provides some additions that help to improve CSS such as variables that can be defined and used elsewhere E.G.
.button {
my-custom-color: RGB(234, 44, 78);
}
.my-control {
-fx-background-color: my-custom-color
}
It also provides a couple of functions that allow you to derive colours from other previously defined colours which is useful for creating things like gradients. This means a base palette of colours can be defined and the rest can be generated from these values (this is what the default JavaFX CSS file does).
JavaFX CSS does not allow you to define the type of layout used by a node (as of writing this all layout needs to be performed in code). This works really well for me as this was the one aspect of CSS that really caused me pain when using it with HTML.
Personally I prefer CSS to XAML styles which tend to be too verbose for my liking.
A guide to JavaFX CSS can be found here.
Layout
JavaFX provides a number of layout panes that are similar to those provided by WPF. One difference I have noticed is that the measure and layout contract is defined further up the inheritance chain in the Region class.
As previously mentioned, Layout cannot be carried out using CSS but can be expressed using the code, FXML or created using the scene builder (which is ultimately converted to FXML).
Controls
JavaFX provides an ever growing library of controls that we have come to expect. One major difference between JavaFX and WPF is that the controls are essentially black boxes and cannot be re-templated in the way that WPF controls can. They also seem to expose far less properties than the WPF controls.
The controls do expose some of the implementation specific regions to CSS allowing specific areas of a control to be targetted by your styles. This is known as the substructure of the control. E.G. a CheckBox exposes two substructures; the box and the check mark allowing each part of the control to be styled independently. Note that as described earlier only the look of a control can be altered using CSS but the feel cannot. E.G. you cannot dramatically alter the way a TabPane lays out its content by altering its internal layout panel in the way you can with the WPF TabControl.
Whilst this sounds fairly limiting, the preferred way of creating custom controls in JavaFX seems to be using composition along the lines of deriving from a layout panel to position standard controls and re-styling them using CSS.
Conclusion
Overall I am very impressed with what JavaFX has to offer at the moment. Whilst it is no where near as mature as WPF it is being actively developed and Oracle certainly seem to be backing this. Time will tell if it's successful or not.
I would recommend giving JavaFX a try. Read the documentation and try putting together a small application and see what you think.
You should also check out FXExperience.com which is updated regularly with information from the development team.
I think the best way to to get a feel for JavaFX is to just try it out. There are some good tutorials on the JavaFX website. Here's a couple:
The JavaFX language
Creating a UI in JavaFX
They are pretty quick and give you a good feel for the language. There are many others on the JavaFX site if you are interested in more tutorials and articles.
For specific answers to your questions:
JavaFX has it's own declarative language for creating the "visual tree" which is not an xml derivative. The UI is based on a scene graph so you can apply various effects and animation to any node in the graph. See the tutorials for more information. There is also a designer tool for JavaFX (which I have not yet tried).
JavaFX has binding built into the language.
JavaFX on the desktop uses Java AWT/Swing which does use GPU rendering. Every version of Java seems to offload more of its graphics to the GPU. Chris Campbell from Sun has blogged some about GPU acceleration. I'm not sure if the mobile version of JavaFX has GPU acceleration. I found that earlier versions of JavaFX weren't performant enough for what I needed, but I know the latest version does have significant performance improvements over previous versions and they are still working on making it faster.
JavaFx uses Java Applets to run in the browser. As of Java 6 update 10, the Java applet framework has been reworked and though it is not as seamless as Adobe flash, it is much improved. I'm not sure how it compares to Silverlight other than I've had trouble getting Silverlight to work on Linux, but did get JavaFX working on Linux.
Here's another related question.
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.