I'm looking for a WPF Gradient Picker example and source code.
The goal is to allow the user of a WPF application to pick the gradient brush to use for a background or foreground. I've seen pickers in Blend (too confusing for a casual user) and Photo Shop. I'm looking for a WPF implementation of something along the line of the Photo Shop picker implemented as a WPF dialog box.
Any pointers to good examples much appreciated.
Thanks.
Found it, this one too on the CodeProject: .Net Protoshop-like gradient picker. Enjoy ;)
Random gradient wallpaper generator. closest thing I could find... unfortunately it only has four possible gradient stops, one in each corner... worth looking at the code perhaps, and getting a few tips...
It seems like something that would be pretty easy to code, in terms of a custom control.
Just have a canvas that you change the background of, with some other controls for changing the colour and the stop points.
Related
I'm using Devexpress charts for winforms. I'm using the SwiftPlotSeriesView for preformance, but since the hittesting is off for that type I can't get the clicked point on the chart. That's why i whould like to get the text value from the crosshair label so that i know where in my series the user clicked. I nope my explanations is good enough :)
Any help?
After hours of work we concluded that this is not possible in Devexpress SwiftPlotSeries.
I am trying to make some rotary knob with WPF and C#, .NET3.5; So right now what I am having is:
but instead, I really want to have something like these:
Anyone has any idea how I can make it look nicer? I am writing the WPF code from scratch. Thanks a lot.
You are using SolidColorBrush right now. Play with RadialGradientBrush instead to achieve the look.
You can create such an effect by finding a nice pictue of a knob, and then apply a rotatetransform on it.
If the picture contains the scale, you will need to edit that out to an other image, which can be under the knob picture.
I'd like to use an ItemsControl which behaves somewhat carousel-like:
I want the items which are all text to circle so that the selected item is always centered and the biggest. I should not be 3D since I like the fact that the unselected items don't overlap and are still readable. Most carousel implementations I saw made the impression to be too heavyweight for this scenario or to look good only with pictures.
I have the feeling this should be doable with some storyboards alone but it seems I'm not far enough into the WPF to get it done properly.
I hope you can point me in the right direction.
Thanks for your help.
This blog post has a good description of how you can implement this
I am new to WPF in general and want to add some animation to my interface.
I have a label and an image. The label will fly in from the right side of the window, the image from the left. They'll meet in the center. The image will rotate while its flying in, while the text will pretty much just move across the screen.
So my question is. For this kind of animation do you get a path object where you can draw a line at design time and have elements move across this line at a certain speed?
In classic windows forms I would have approached the issue using a timer and then adjust the left property of the label at each tick. Surely WPF is more sophisticated than this though.
So can anyone tell me a good approach?
First: You need ExpressionBlend to create animation in WPF.
WPF is more sophisticated
Of course no, read about animation in WPF, Personally, I prefer video learning for it.
you can find here some clips, I recommend this series from Total training.
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