RichTextEditor for silverlight 4 - silverlight

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.

Related

Which Silverlight Rich Text Box to use

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.

Can we use CSS in a Silverlight project

I have a problem. I want to make a web application using silver light. I just want to know that can I use a css in this, because I read the the designing of silver light is in the xaml or we use css with html tag.
Is anybody clear my confusion?
Thanks
Silverlight XAML ≠ HTML+CSS
These are all different technologies. You probably better know Adobe Flash. Well Silverlight is very similar. It (may) run in the context of a browser, but it has nothing to do with HTML and/or CSS. It uses XAML files (as you pronounce them zammel). So if you decide to write a Silverlight application you will have to use XAML files and use Expression Blend to design your UI. Doing so would be faster than hand editing XAML files.
xaml is like html + css but its not the same , they have some things in common but nothing much important .
Better find yourself good video tutorials or a book and learn it from there :)
No you can't really use CSS in a silverlight project.
If it's worth the effort, what you could do is manually load the required CSS files with the WebClient class and parse them to style your controls accordingly.
Someone did something similar with the Sharepoint theme files, which are yet another format. Using SharePoint thmx files to style Silverlight describes how to do it. Maybe you can find some inspiration from that.

Is anyone really using ThumbnailAttribute for Toolbox icons?

I was putting finishing touches on a new WPF/Silverlight custom control and decided that this time I would go with .NET 3.5 SP1 requirement (for WPF version). So, I decided to go with recommended new way of setting toolbox icon/image with ThumbnailAttribute. After spending some time on it I couldn't make it work and turned for help to Google.
Surprisingly a search for ThumbnailAttribute produces basically no results on Google. There's MSDN documentation of the class, a few irrelevant hits and 2 articles (one of which is mine) showing how to do it the old way and just mentioning that there's a new way with ThumbnailAttribute.
So, my question is this: does anybody use ThumbnailAttribute to set toolbox images for WPF/Silverlight controls? Does it work?
Update: Microsoft recommends using specifically named icon files rather than ThumbnailAttribute as per Michael S. Scherotter (see comment below).
You want to create a design-time assembly for your class. You do this to assign design-time attributes to a class that don't take up space in the assembly. This is important for Silverlight apps which should have smaller assemblyies for faster downloading.
See this article for an description of the design-time assembly.
For Icons, in the design-time assembly add 12x12 and 24x24 PNG icons as embedded resources with these names:
Namespace.ControlName.12x12.png
Namespace.ControlName.24x24.png

How can I obtain a sketch or hand-drawn look in Silverlight for various controls?

I am looking to create a Silverlight application that employs a control style similar to what one might see when using Balsamiq Mockups or SketchFlow.
I am not sure how this look is best achieved in Silverlight. My initial thought is that clever use of a pixel shader effect on the desired control might just do the trick, however, my searches for a similar solution have failed.
What might be the best approach for drawing controls with a hand-drawn look in Silverlight?
Can this be done with a custom pixel shader?
Note: I am using Silverlight 3, but would not be opposed to using Silverlight 4 Beta if it provided a more elegant solution to the problem.
This guy has a HandDrawnBorder style in the source he provides on his website. An example of using his styles is shown here. It does say that this is for the Beta2 of WPF but that the source should compile and be usable in later releases.
EDIT: Looks like the download is broken. Might have to do some hunting...
Check out UX Musings Rough theme.
There's also a nice set of sketch style icons I found on Icon Finder.

Silverlight Rich text box control

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.

Resources