WPF Colour Picker/Wheel with Multiple Selection - wpf

I am looking for a free WPF Colour Picker/Wheel which has the ability to allow multiple colour selections. Does anything like this exist. The ones I have seen allow only one colour to be selected. I want to be able to easily select two or three colors.

Take a look at color wheel for silverlight (you can adapt it for wpf): http://asyrovprog.host22.com/colorwheel.html. Source code is located here: timeline.codeplex.com.

Related

Is it possible to change colour palette on a per window / user control basis?

I am wondering if with the Telerik WPF library it is possible to change colour palette on a per window / usercontrol basis.
For clarity, I am not refering to basic Foreground or Background colours, I am interested in changing colours for certain visual states such mouse over or focused which is not possible to simple change on a control.
In the docs there is a sample for changing a colour palette such as FluentPalette.Palette.BasicColor = (Color)ColorConverter.ConvertFromString("#33000000");.
But this will have an effect on the whole app UI, whereas I am aiming to change the palette on a per window basis.
The way it looks to me, the only option would be to copy the specific theme for each variant (if that's possible at all) each with its colour palette tweaks for each window, which is of course overkill.
Any ideas?

How can I neatly line up right-aligned check boxes with with other controls?

The Visual Studio WinForms designer lets you snap together text boxes, list boxes, buttons, and so forth reasonably well. However, a check box with CheckAlign=MiddleRight does not work quite like the others, because it has two components: the built-in label, and the check box itself. If you line up the text with other labels, the check box is left floating and will not automatically line up. You can turn off AutoSize and attempt to size the CheckBox control so the check box lines up, but this is touchy and will be thrown off by custom font sizes.
In this example, I've almost lined up the check box with the other controls, but not quite:
If I had several check boxes it would be a real headache, as with AutoSize turned off the position of the check box is relative to the end of the text, so each control has to be individually sized pixel by pixel.
What's the best way to line up check boxes with other controls?
One workaround is to not include text with the CheckBox and instead have a separate Label control. However, by doing so you lose the ability to click on the label to toggle the check box. On a high-resolution screen, clicking a 10x10 pixel is finicky, a poor UX experience. You could add an OnClick event to the label, of course, but that seems like solving the wrong problem.
Here's an example of someone else with the same issue: in the preferences panel in Oracle SQL Developer, when there's a mix of properties the check boxes are handled with separate labels and boxes:
Personally, i avoid that issue by not having the CheckBoxes aligned to the right:
rather than having the caption on the left.

Changing color of an image - at runtime

Im going to make a new application for a car dealership. They basically want a WPF/silverlight application where one can slect a car (model) and then via a color palette choose the color of the car (from predefined colors). They also need to be able to different kind of rims, headlights and interior.
what is the best/easiest approach for this. Been thinking on having all the different images and then just swap them out when the selection changes. This, however has the potentional problem of all images with all combinations does not exist (eg. a red VW, metallic rims, white leather interior) etc.
Is there any other approach to this? replacing colors? Having a basic model and then copying the "body" of the car on top, copy rims on top etc. and then just having to enable/disable a particular "layer" of the images?
I would do this by using different layers: the basic model with the car's color as translucent part, on top of this pictures with the different add-ons, the background color is the car's color. The trick is to fit everything together that it looks good.
Depending on the color (maybe you want to have shadows or chrome effects), you could have one model's picture for each color, and then add the add-ons and the interior on top of this.

Silverlight 4: how to highlight control on mouse over

My aim is to get fine control "animation" when it is mouse-over-ed. For example, I have a "map" of controls (game map that represent different type of terrain), each of them is an image with trees/rocks/hills on the green grass or water (lake or see) image of blue/cyan color. When user point any image with mouse it should get shiny: either get more bright background or get a shiny border.
It is hard to say what exactly I want to have (either background change or border), I would like to try each of them and see what is the most appropriate for me.
I am going to have a custom control (MapTile) that will represent a map tile. I know how to catch MouseEnter/MouseLeave events, but not sure how to change control style and if it is a good idea to work with control style in CodeBehind, probably there are better XAML-based solutions.
Could you please help with a solution that provide few goals:
Goal1: Add highlighted border around the control (it will be squares/rectangles, or circles; use what is easier) on mouse enter, remove border on move leave;
Goal2: Change some properties of my CustomControl (for example, background color).
Thank you very much!
1. How to han
You might find it easiest to get hold of Expression Blend and use it to create a custom template for your control.
The Learn Expression Blend page would be a good place to start. Look for tutorials on customising buttons and this is the same sort of thing that you want to do.
You need to use an attached behavior on your control. You don't need to learn Blend for this.
Check this one as an example, but you can search the site for Mouse Over for other examples.
http://gallery.expression.microsoft.com/en-us/MouseOver3D

Respecting XP themes when designing WinForms UI

How do you deal with the different XP themes when designing a WinForms UI? Do you avoid hard coded color values or just accept that your UI will not look good on non standard themes?
For instance, I have a light blue gradient panel that looks good against the standard control background color but would clash with other custom themes. What's a good approach to take?
Avoid hex colors and colors with names like "White" or "Green". The color picker for most objects should be able to show you colors with names like "ActiveWindow" or "ForegroundText". Those are the colors you want to be using. They are available via code also, and you want to choose them so that the names have some relationship to how they're used. For example, don't set "ForegroundText" as your background color just because you want a black background. If you have a gradient, then use those colors to build the gradient. Also, there's an event you may need to handle for when the theme changes.
That's if you choose to respect the themes. If you have a really out-there interface then you may want to specify your own colors. In that case, never use the windows colors, because they won't be reliable and you might end up with something real ugly. That means you'll need to go and change all the defaults in the standard controls, but if you're doing this you probably have your own controls anyway.
In summary, the thing to remember is that it's an all or nothing shot: either respect themes and always use colors defined based on Windows widget elements, or don't use themes and never use those colors at all.

Resources