Hello,
Can anyone please help me with the Image Reflection. I want to put use some or group of images/icons in WPF App. I want their reflection as well.
I am using Border opasitymask for each image but I think that is not the right way to code. I want to arrange the images/icons with the reflection in an order. I mean using stackpanel or something.
Please explain how to code.
Thanks and Regards.
Loading
Nishant RanaPosted Dec 19, 2010, 9:51 PM
I am giving you the basics of showing Image Reflection in wpf.
1. Create an Image object with some image source let say "P_1.jpg".
2. Create another Image object right at the top of same object and having soame source "P_1.jpg".
3. Now set RenderTransformOrigin = "0.5, 0.5".
4. Set OpacityMask with Gradient Brush to show image lil faded towards far end (plz chk my sample code for details).
5. Perform ScaleTransform to translate "ScaleY" with some -ve value let say Value="-.75" (this is to show image inverted just below the actual and give us a sense of reflection).
6. Done !!
You can follow this hint to apply reflection as per your implementation. Value can be tweaked as per requirements.
Sample Implementation code:
Plz let me know if it fits your requirement
Thanks and Regards
Nishant Rana
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
CrishPosted Dec 15, 2010, 4:43 AM
This is very important thing.If you want get reflection in image than just check this below link to solve your problem .It shows how to reflect image step by step.
http://www.ehow.com/how_5055541_create-image-reflection-photo-photoshop.html