Apple Dock like (Magnify items near mouse) control in WPF? - wpf

Does anyone know of any WPF controls that act like the Apple Dock (something like this). If not how would you go about creating one? A horizontal listbox of images is simple but I can't seem to recreate the smooth magnification of the images based on where the mouse is. Any help would be appreciated.

Not an expert, but sounds like you'd do an animation on a ScaleTransform on the LayoutTransform of the items?
mouse enter would start animation to increase the scale, exit the reverse?

Related

How do i create xaml (silverlight) animation like attacted image?

I want to create animation like this image, i'm wondering how do i get start for this ? in silverlight xaml
this bar will increased or decreased in animation
thanks for any help
I would create image overlay to create grid effect and would draw solid rectangles under the image. Animate rectangles using standard XAML animations.
Or even better: animate black overlay rectangles covering top of bars.
Sent from windows phone.

How do I incorporate speed and/or acceleration into a (WPF) scrollviewer?

I have a WPF scrollViewer that I use for panning (MouseDown, MouseMove, MouseUp) and I would like to include an acceleration effect that incorporates inertia. So, if the mouse moves beyond a threshold speed and I release the mouse, it continues to pan but slows down as a function of the initial speed. Any ideas, thoughts or examples?
I've done basically this before and started by looking at ScrollViewer but in the end threw it away and used a Viewbox with a Canvas as the child for absolute positioning of content (I was supporting zoom aswel as scroll, it was basically DeepZoom without the scaled images for zooming so there was pixelation when zoomed right in). I wrote code for determining the gesture direction and the speed of the gesture from the mouse events and converted this to a scroll direction and speed and then animated the Canvas.Left and Canvas.Top properties of the scrollable content (which was in the Children collection of the Viewbox's child Canvas) with DoubleAnimation. It worked well, however there may be a better way...heres a thread suggesting hosting DeepZoom in WPF via a Frame control (although I wouldn't do it that way).
EDIT: Basically the ScrollViewer was just too restricting. Even if you get into the ControlTemplate and get references to the ScrollBars directly, it is the position of the Thumb of these scrollbars that you would need to animate and I'm pretty sure this is what I found I couldn't do (it was almost 3 years ago :)

Need a WPF rendering tip

I want to make a WPF Grid in which users can drag and drop controls from one cell to another and when the user is dragging I need to draw tips on the screen, like arrows. It's as if the tips were in ANOTHER LAYER in the screen. That is, they are not drawn IN the grid I mentioned.
The problem is: I don't know how to OVERLAP a "transparent" canvas over my Grid so that I can draw on it.
Do you experienced guys have some tip? THANKS.
I think what you are looking for are Adorners. You can read something about them here:
http://marlongrech.wordpress.com/2008/02/28/wpf-overlays-or-better-adorner/
Heres an example with a listView control, pretty good.
Heres a tut also decent.
And even a section in msdn

Customize the shape of a scatterview

I'm currently using the Surface SDK 1.0 in Blend and VS2008, and I've encountered a problem: I use a scatterview over the whole screen. I also have a grid in the middle of the screen. The panel in the middle is quite annoying because my scatterviewitems can easily get lost BEHIND the grid, and since the grid is locked in position, there is no way for me to retrieve them.
It would be desireable to add "walls" around the grid, so that my scatterviewitems would bounce off it, as it does at the edges of the scatterview.
How can I solve this problem?
Just hook up to "ScatterManipulationCompleted" and check if the item is under your grid. If yes start a Storyboard which moves the Center of your ScatterViewItem back out of the grids background.
Also take a look at the surface community forums, there are a lot posts regarding ScatterViewItem and collision detection.

How to draw on top of winforms controls with transparency?

I have an app with a bunch of controls in it and I want to place a set of cross hairs on top of it. My first attack used a PictureBox and ran into this problem. The solution that fellow proposes, seems a bit... verbose for what I need.
Is there a simple way draw on top of my form? Note that I don't even need the drawing to be part of a control as it doesn't need to do anything but just be there.
This eventually worked. I had to play some games though because most of the controls I wanted to draw on were not where it expected them to be.
Also, it ran into issues when controls were moved; it failed to redraw and stuff moved with the underlying control. This was fixed by forcing invalidation from the move event for anything that might move.
Does a PictureBox with a transparent image have the same problem as a Panel with BackColor set to Transparent? I'm thinking you could have a PictureBox with the crosshair image in it and move that around, instead of drawing it yourself...

Resources