I’m working on a very eye-candy program and I’m required to add a reflection and a 3D depth to the controls.
On both cases I need to paint the control a couple of times, but with changes:
For the reflection I’ll have to repaint the control again at the bottom + flip it.
And as for the 3D depth, it’s just a lot of copies behind + to the side.
The question is how can I get the image of the control in order to modify it and paint it below / behind it? Do you have any caveats and warnings / helpful tips regarding such actions? (I’ve never tried anything similar before).
Many thanks.
In WPF you can use a
VisualBrushas the background/fill of another element (such as aRectangle). ThisVisualBrushhas aVisualproperty that can be bound to another control in order to mimic its content. Using transforms and alpha masks on this control can help apply reflection-style effects. For example: