SIGN UP MEMBER LOGIN:    
ARTICLE

Reflection of Images Using Expression Blend 4

Posted by Nipun Tomar Articles | Expression Studio January 28, 2011
Here is an article on reflected images using Microsoft Expression Blend in WPF.
Reader Level:
Download Files:
 


Here is an article on reflected images using Microsoft Expression Blend in WPF.
1.gif

1. Open a new project in Expression Blend and name it "RefImage" or any other name as you like with project type "WPF" and select Language as C#:

2.gif

2. Select LayoutRootand then setBackground to black from the Properties pane.

3. Go to Assets Library and select a StackPanel Control and draw it on top of your LayoutRoot control.

3.gif

4. Copy any image from any of your folders and paste on top of the stack panel and name the image as "Image1".

4.gif

Note: Adjust the size of the window according to your design.

5. Right-click on the image and from the drop-down menu select Group Into->Border.
6. Then Select border from tool pane and draw it of the same size as the Image in the bottom of the stackpanel:

5.gif

7. Now add the following code to the second Border Control:

<Border BorderBrush="Black" BorderThickness="1" Height="197">
<Border.Background>
<VisualBrush Visual="{Binding ElementName=Image1}"/>
</Border.Background>
</Border>


8. We have used our Image1 as a VisualBrush for second Border. Your window design should be like this now:

5.1.gif

9. In this step just copy the Stackpanel by right-clicking on Stackpanel in the object and timeline pane and paste it onto the window and again do the same for the third Stackpanel. So that your window would be something like this:

6.gif

10. The top image is our real image and the bottom one is just VisualBrush applied to Border control. For the reflection effects select the Border control, go to Properties pane->Transformsection ->Scaleproperty. Set the value of Y to "-1". Do the same procedure for the other two Border controls.

7.gif

11. Now its time to fade-out our image to show the mirroring effect. Select the border control and from the brushes section change the opacity mask by setting the transparency of first gradient to 0% and for the second gradient to 65% for all the three Borders:

8.gif

First Gradient Second Gradient

9.gif

12. Finally select the Border and position your cursor above the bottom handler and you will see that cursor changes its appearance suggesting that you can skew your border. Skew it a bit and after that grab it by the same handler and pull it up (so it shrinks a bit). As follows:

10.gif

13. After applying step 12 for all the images you will get the following result :

11.gif

Login to add your contents and source code to this article
share this article :
post comment
 

Thanks for sharing... This will help me in the future. Dennis

Posted by Dennis Triplett Feb 17, 2011

Good to hear that it was helpful for someone :)

Posted by Nipun Tomar Jan 31, 2011

http://expression.microsoft.com/en-us/cc507094.aspx

Posted by Nipun Tomar Jan 31, 2011

Great articles on WPF and Expression Blend, thanks!

Posted by Christian Andersson Jan 29, 2011

@Nipun Tomar hi ninun, will you tell me please, from where i can get Expression Blend 4? Thanks ..........

Posted by Pritesh Patel Jan 28, 2011
Nevron Gauge for SharePoint
Become a Sponsor
PREMIUM SPONSORS
  • Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
    ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
Team Foundation Server Hosting
Become a Sponsor