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

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.

Related

dragable controls in runtime Similar to a toolbox in wpf

I want to create a project in WPF for designing a custom report.
For this, I need a library to add controls to a panel, canvas, etc. with drag and drop at runtime.
Controls should be resizable and moveable with the mouse. Finally I want to print this.
Telerik's WPF controls contain the Diagram Control which supports the features you mention out of the box. I use it for a very similar scenario as you describe and it works well. The might be a counterpart offered by Infragistics as well.
With .NET framework's built in features and/or free libraries you will able to cover the drag&drop part. You will have to implement the rest yourself which is possible but too much to ask for one question.
Late reply, but I came across this. Take a look at this
There are 4 parts that show how to do a toolbox with what you're looking for.

Need recommendations for Image Editing Library

I am trying to create a WPF based application which will allows users to edit photos and provide features like:
Increase/Decrease Brightness
Crop
Retro looks
and lot more.
I am also looking forward to provide more fancy features like : Framing an image, print to a Tshirt, but these are low on priority.
Any open source libraries for that?
P.S -> This is a POC project, even if i miss some features it will be fine.
I would suggest you to use BitmapEffects available in WPF, the BitmapEffects make use Shading language; at present very few effects available in .net Fx. But it is quite easy create your own shaders to adjust the birghtness, gamma, colour saturation, and they can be data bound too. The great thing about shaders is you apply them to videos as well.
Shazzam Tool is on of the best tool to create shadders, it lets you try the effect on your images and generate the C# or VB.Net binding code to use in WPF/Silverlight.
I guess you have to write code to do the image cropping, or quick Google search would help.
Opensource shader effects available here in codeplex.
For a low-level library that allows GDI like operations on bitmaps please see the WriteableBitmapEx library. This is open source and as a disclaimer, I have made a minor contribution to it.
WriteableBitmapEx has functions for drawing shapes, lines, ellipses, applying filters (via matrices, e.g. convolution blur etc), rotation, resize and cropping. You would have to write your own code to apply framing but this could be done by rendering to a separate bitmap and using the Blit function.
Above all its very fast and portable, to WP7 and Silverlight!
Best regards,

Coded UI Test - get my custom object (WinForms)?

I want to create an automated UI test that will test my syncfusion grid. My problem is that the recorder can't recognize this control (or any syncfusion control). I've searched a lot in the internet but I couldn't find any extension so the recorder will recognize my controls (I'm using WinForms, not WPF!), or at least a way to extend the recorder abilities so syncfusion's controls will be recognized somehow.
Is there any easy way to extend the recorder? Or is there any extension available?
Or maybe can I get the grid object from the WinClient that the recorder generates?
Thanks!
Start your program. Run the Spy++ utility. Type Ctrl+F to start the finder tool and drag the bulls-eye onto your form. Ok, Synchronize and have a look-see at the windows that are visible in the tree. If you see regular Windows Forms controls, like a Button or a Label, but not any of the SyncFusion controls then you've probably found the source of the problem.
Component vendors that try to improve .NET controls typically do so by creating 'window-less' controls. They are not really controls, they don't derive from the Control class and don't have a Handle property. They use the surface of the parent to draw themselves, making them look just like controls. The .NET ToolStripItem classes do this. And this is also the approach WPF uses.
The big advantage is that they render quickly and support all kinds of effects that regular controls can't support, like transparency, rotation and anti-aliased window edges. The big disadvantage is that the kind of tool that you are using suddenly gets noddy and can't find the control back. Because they work by finding the Windows window back on your form, there is no window for them.
This is a hard problem to solve, the 'control' exists only in memory and there's no good way for a tool to find it back. Using Accessibility is about the only other way for such a tool to find a control that I can think of. Which would have to be implemented by the control vendor first, a somewhat obscure feature that gets easily overlooked. You really do need the help of the vendor to find a workaround for this. Shouldn't be a problem, that's why you paid them the big money.
This is Rajadurai from Syncfusion. Thank you for your interest in Syncfusion Products. To make UI Test Automation recognize Syncfusion grids(WinForms), some internal support need to be provided in grid whose implementation is in progress and about to be completed. Please submit an incident through Direct-Trac for any further related inquiries in the following link.
http://www.syncfusion.com/Account/Logon?ReturnUrl=%2fsupport%2fdirecttrac
You can also contact us through support#syncfusion.com. We are happy to assist you.
Regards,
Rajadurai

Bread-crumb style navigation for Winforms

Does anybody know of a bread-crumb style navigation for Winforms like the one from DotNetBar.
http://www.devcomponents.com/dotnetbar/BreadCrumbHorizontalTreeControl.aspx
I really like that control. However I am using a other UI library already and just for this control I do not want a reference to another 4 MB lib. I just need this control. Does anybody if something like this is available as a standalone control?
I have used the Bread Crumb control of Krypton Toolkit, but you mentioned, that you donĀ“t want an other UI library.
But maybe this source can help you, to build your own Bread Crumb control Creating A Breadcrumb Control
Try this one i haven't used it but (i use the one from Krypton) but i guess it will be good for you.
The one Jehof gave you is way better.
However take a look at Krypton suite, i always use it with the DevExpress XtraEditors. together you can create some great looking apps. i know you said that you don't want a huge library, but it's worth it.

HTML layout for winforms

Instead of arranging controls on a winform form by specifying pixel locations, I'd like to lay it out similar to the way you'd layout a form in html. This would make it scale better (for larger fonts etc).
Does anyone know of a layout library that allows you to define the form in xml and lay it out similar to html?
Have you checked out the TableLayoutPanel and FlowLayoutPanel in the .NET framework? It might be what you are looking for.
Yeah, it's called WPF :)
Seriously, there are some newer panel types in WinForms 2.0 that will let you place controls without setting Location and Size. They are FlowLayoutPanel and TableLayoutPanel.
You should also look into the AutoSize property. It takes care of sizing when the value of the label, say, changes. Also, don't forget about Docking and Anchoring.
Once you master those concepts, writing a little parser that converts from XML to controls shouldn't be that hard if you feel you really need it.
Not sure there is anything perfect for this.
MyXAML was kicking about a few years ago that enabled you to add forms in XML as opposed to embedding them into the binary. Not sure if that project is dead or not.
WinForm does have the flow layout control already
However if you want to do this kind of thing properly I think the only answer is to move to WPF.
You may also want to consider using Windows Presentation Foundation (WPF) instead of WinForms - WPF has an XML declarative markup language (XAML) that works well for defining scalable UI.
I've already got something like MyXAML - my screens are loaded from xml files already. It suffers the same problem as MyXAML which is that you still have to position the controls with pixel positions whereas I want something like html with the automatic flow and tables and such.
I think TableLayoutPanel might be what I'm looking for.
The only one I know of is a 3rd party from DevExpress called the LayoutControl..

Resources