.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> .Net Framework >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Silverlight Plane Projection

Posted By:Diptimaya Patra       Posted Date: June 12, 2010    Points: 25    Category: .Net Framework    URL: http://www.dotnetspark.com  

n this article we will see Projection in Silverlight, which describe how to transform an object in 3-D space using perspective transforms. In this article we will use Plane Projection, which represents a perspective transform (a 3-D-like effect) on an object.
 

Introduction

In this article we will see Projection in Silverlight, which describe how to transform an object in 3-D space using perspective transforms. In this article we will use Plane Projection, which represents a perspective transform (a 3-D-like effect) on an object.

Creating Silverlight Project

Fire up Visual Studio 2008 and create a Silverlight Application. Name it as PlaneProjectionInSL3.

image1.gif

Open the solution in Expression Blend 3 to design the application.

Our basic aim of the sample is to rotate an image in 3 directions that is X, Y and Z plane. So we need three TextBlocks and three Slider Controls and an Image Control.

The design will look something similar to the following:

image2.gif

If you look into the Objects and Timeline Pane you will find the following controls are used.

image3.gif

Now go back to Visual Studio 2008 environment.

Here is the Xaml code for your reference:


  
    
      
        
        
      
    
    
      
        
        
        
      
      
        
        
        
        
      
      
        
          
           

         

        
          
          
        
        
          
          
        
        
          


Now the Border Control which contains the Image; we need to add Projection and then Plane Projection. The xaml will look as follows:


  
    
  
  


Now we will bind the Projection with the respective Slider Controls.

  
  


  
  


  
  

As we have added a Button to reset the Rotations. Add the following code to reset the rotation:
Now our application is ready to go. Press F5 to run the application.

image4.gif

That's it you have successfully used the Plane Projection in Silverlight.

You can also download sample project used in the above example.

Enjoy Coding.

 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend