<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using projection to build a 3D carousel in Silverlight 3</title>
	<atom:link href="http://www.silverlightbuzz.com/2009/06/12/using-projection-to-build-a-3d-carousel-in-silverlight-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.silverlightbuzz.com/2009/06/12/using-projection-to-build-a-3d-carousel-in-silverlight-3/</link>
	<description>Gavin Wignall Blogs about Silverlight tutorials and examples</description>
	<lastBuildDate>Thu, 08 Dec 2011 18:47:32 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Lenae</title>
		<link>http://www.silverlightbuzz.com/2009/06/12/using-projection-to-build-a-3d-carousel-in-silverlight-3/comment-page-1/#comment-32235</link>
		<dc:creator>Lenae</dc:creator>
		<pubDate>Thu, 27 Oct 2011 16:00:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.silverlightbuzz.com/?p=238#comment-32235</guid>
		<description>@GUSTAVO: I know this is late, but its extremely easy to make the image clickable, even simpler than a button. Just add a Mouse action property to the image like this:

XAML:


then go to C# or VB and edit that event,

C#:
private void NameofEvent(object sender, MouseButtonEventArgs e)
{
    (Define what you want that image that is clicked on to do here).
}

and voila! :) An image on the carousel that is clickable to do whatever you need it to.</description>
		<content:encoded><![CDATA[<p>@GUSTAVO: I know this is late, but its extremely easy to make the image clickable, even simpler than a button. Just add a Mouse action property to the image like this:</p>
<p>XAML:</p>
<p>then go to C# or VB and edit that event,</p>
<p>C#:<br />
private void NameofEvent(object sender, MouseButtonEventArgs e)<br />
{<br />
    (Define what you want that image that is clicked on to do here).<br />
}</p>
<p>and voila! <img src='http://www.silverlightbuzz.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  An image on the carousel that is clickable to do whatever you need it to.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zlatko</title>
		<link>http://www.silverlightbuzz.com/2009/06/12/using-projection-to-build-a-3d-carousel-in-silverlight-3/comment-page-1/#comment-13205</link>
		<dc:creator>zlatko</dc:creator>
		<pubDate>Fri, 23 Apr 2010 07:19:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.silverlightbuzz.com/?p=238#comment-13205</guid>
		<description>Hello Gavin, 

excellent posts you have here. I have studied all of them and I must say that I have only one question, so I wonder if you could help me :-)

So my goal is to simulate a room (with fixed point of sight in the center of back wall) having in my perspective three walls, front, left and right. And my problem is to change view perspective of observed object (for example of the cube) to simulate its correct position in the room. Same side of the cube should always face the center of the room, so it also should be rotated when I move it to the left or to the right wall.

Do you have any tips of how to achieve this? 

Thanks in advance!</description>
		<content:encoded><![CDATA[<p>Hello Gavin, </p>
<p>excellent posts you have here. I have studied all of them and I must say that I have only one question, so I wonder if you could help me <img src='http://www.silverlightbuzz.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>So my goal is to simulate a room (with fixed point of sight in the center of back wall) having in my perspective three walls, front, left and right. And my problem is to change view perspective of observed object (for example of the cube) to simulate its correct position in the room. Same side of the cube should always face the center of the room, so it also should be rotated when I move it to the left or to the right wall.</p>
<p>Do you have any tips of how to achieve this? </p>
<p>Thanks in advance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jairoxxx</title>
		<link>http://www.silverlightbuzz.com/2009/06/12/using-projection-to-build-a-3d-carousel-in-silverlight-3/comment-page-1/#comment-3189</link>
		<dc:creator>jairoxxx</dc:creator>
		<pubDate>Tue, 24 Nov 2009 15:53:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.silverlightbuzz.com/?p=238#comment-3189</guid>
		<description>the function to get &quot;-173&quot; is: 

double getApothem(double height, double sides)
        {
            var x0 = 360.0 / (2 * sides);
            var k = Math.Sin(Math.PI * x0 / 180.0);
            var r = (double)(height / 2) / k;
            return - Math.Sqrt((r * r) - Math.Pow((double)height / 2, (double)2));
        }</description>
		<content:encoded><![CDATA[<p>the function to get &#8220;-173&#8243; is: </p>
<p>double getApothem(double height, double sides)<br />
        {<br />
            var x0 = 360.0 / (2 * sides);<br />
            var k = Math.Sin(Math.PI * x0 / 180.0);<br />
            var r = (double)(height / 2) / k;<br />
            return &#8211; Math.Sqrt((r * r) &#8211; Math.Pow((double)height / 2, (double)2));<br />
        }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Katarina</title>
		<link>http://www.silverlightbuzz.com/2009/06/12/using-projection-to-build-a-3d-carousel-in-silverlight-3/comment-page-1/#comment-436</link>
		<dc:creator>Katarina</dc:creator>
		<pubDate>Thu, 30 Jul 2009 17:46:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.silverlightbuzz.com/?p=238#comment-436</guid>
		<description>Hello! Love your demo!
 
I used UserControls instead of images, they appear correctly in Blend but when I run the application they won`t rotate.
It works fine with an image control or grid control.
 
How do I get to rotate my UserControls also?
What am I missing?
Please help out!
 
Thanks in advance!
 
Katarina
 
Here is  a short code of my example...
 
MAIN PAGE XAML
 

   
    
   
   
    
     
    
   
         
               
                
               
              
   
    
     
    
   
   
    
     
    
   
   

 
MAIN PAGE CODE BEHIND
 
        public MainPage()
        {
            // Required to initialize variables
            InitializeComponent();
            ucProj1 = new PlaneProjection();
            ucProj2 = new PlaneProjection();
            ucProj3 = new PlaneProjection();
            ucProj4 = new PlaneProjection();
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            ucProj1.RotationY = 60;
            ucProj2.RotationY = 120;
            ucProj3.RotationY = 180;
            ucProj4.RotationY = 240;
            LayoutRoot.MouseMove += new MouseEventHandler(LayoutRoot_MouseMove);
            CompositionTarget.Rendering += new EventHandler(CompositionTarget_Rendering);
        }

        void CompositionTarget_Rendering(object sender, EventArgs e)
        {
            ucProj0.RotationY += ((pt.X - (LayoutRoot.ActualWidth / 2)) / LayoutRoot.ActualWidth) * 10;
            ucProj1.RotationY += ((pt.X - (LayoutRoot.ActualWidth / 2)) / LayoutRoot.ActualWidth) * 10;
            ucProj2.RotationY += ((pt.X - (LayoutRoot.ActualWidth / 2)) / LayoutRoot.ActualWidth) * 10;
            ucProj3.RotationY += ((pt.X - (LayoutRoot.ActualWidth / 2)) / LayoutRoot.ActualWidth) * 10;
            ucProj4.RotationY += ((pt.X - (LayoutRoot.ActualWidth / 2)) / LayoutRoot.ActualWidth) * 10;
            ucProj5.RotationY += ((pt.X - (LayoutRoot.ActualWidth / 2)) / LayoutRoot.ActualWidth) * 10;
        }
        private Point pt;
        void LayoutRoot_MouseMove(object sender, MouseEventArgs e)
        {
            pt = e.GetPosition(LayoutRoot);
        }
 

USER CONTROL with a grid
 
&lt;UserControl
 
  .....
  .......
 
</description>
		<content:encoded><![CDATA[<p>Hello! Love your demo!</p>
<p>I used UserControls instead of images, they appear correctly in Blend but when I run the application they won`t rotate.<br />
It works fine with an image control or grid control.</p>
<p>How do I get to rotate my UserControls also?<br />
What am I missing?<br />
Please help out!</p>
<p>Thanks in advance!</p>
<p>Katarina</p>
<p>Here is  a short code of my example&#8230;</p>
<p>MAIN PAGE XAML</p>
<p>MAIN PAGE CODE BEHIND</p>
<p>        public MainPage()<br />
        {<br />
            // Required to initialize variables<br />
            InitializeComponent();<br />
            ucProj1 = new PlaneProjection();<br />
            ucProj2 = new PlaneProjection();<br />
            ucProj3 = new PlaneProjection();<br />
            ucProj4 = new PlaneProjection();<br />
        }</p>
<p>        private void UserControl_Loaded(object sender, RoutedEventArgs e)<br />
        {<br />
            ucProj1.RotationY = 60;<br />
            ucProj2.RotationY = 120;<br />
            ucProj3.RotationY = 180;<br />
            ucProj4.RotationY = 240;<br />
            LayoutRoot.MouseMove += new MouseEventHandler(LayoutRoot_MouseMove);<br />
            CompositionTarget.Rendering += new EventHandler(CompositionTarget_Rendering);<br />
        }</p>
<p>        void CompositionTarget_Rendering(object sender, EventArgs e)<br />
        {<br />
            ucProj0.RotationY += ((pt.X &#8211; (LayoutRoot.ActualWidth / 2)) / LayoutRoot.ActualWidth) * 10;<br />
            ucProj1.RotationY += ((pt.X &#8211; (LayoutRoot.ActualWidth / 2)) / LayoutRoot.ActualWidth) * 10;<br />
            ucProj2.RotationY += ((pt.X &#8211; (LayoutRoot.ActualWidth / 2)) / LayoutRoot.ActualWidth) * 10;<br />
            ucProj3.RotationY += ((pt.X &#8211; (LayoutRoot.ActualWidth / 2)) / LayoutRoot.ActualWidth) * 10;<br />
            ucProj4.RotationY += ((pt.X &#8211; (LayoutRoot.ActualWidth / 2)) / LayoutRoot.ActualWidth) * 10;<br />
            ucProj5.RotationY += ((pt.X &#8211; (LayoutRoot.ActualWidth / 2)) / LayoutRoot.ActualWidth) * 10;<br />
        }<br />
        private Point pt;<br />
        void LayoutRoot_MouseMove(object sender, MouseEventArgs e)<br />
        {<br />
            pt = e.GetPosition(LayoutRoot);<br />
        }</p>
<p>USER CONTROL with a grid</p>
<p>&lt;UserControl</p>
<p>  &#8230;..<br />
  &#8230;&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: progg.ru</title>
		<link>http://www.silverlightbuzz.com/2009/06/12/using-projection-to-build-a-3d-carousel-in-silverlight-3/comment-page-1/#comment-245</link>
		<dc:creator>progg.ru</dc:creator>
		<pubDate>Fri, 03 Jul 2009 22:56:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.silverlightbuzz.com/?p=238#comment-245</guid>
		<description>&lt;strong&gt;Using projection to build a 3D carousel in Silverlight 3 »...&lt;/strong&gt;

Thank you for submitting this cool story - Trackback from progg.ru...</description>
		<content:encoded><![CDATA[<p><strong>Using projection to build a 3D carousel in Silverlight 3 »&#8230;</strong></p>
<p>Thank you for submitting this cool story &#8211; Trackback from progg.ru&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gavin Wignall</title>
		<link>http://www.silverlightbuzz.com/2009/06/12/using-projection-to-build-a-3d-carousel-in-silverlight-3/comment-page-1/#comment-242</link>
		<dc:creator>Gavin Wignall</dc:creator>
		<pubDate>Fri, 03 Jul 2009 08:24:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.silverlightbuzz.com/?p=238#comment-242</guid>
		<description>I have not written in the functionality to select the items in the carousel, but it is not that difficult. Each image is able to be treated as a button like any other normal image.</description>
		<content:encoded><![CDATA[<p>I have not written in the functionality to select the items in the carousel, but it is not that difficult. Each image is able to be treated as a button like any other normal image.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GUSTAVO</title>
		<link>http://www.silverlightbuzz.com/2009/06/12/using-projection-to-build-a-3d-carousel-in-silverlight-3/comment-page-1/#comment-207</link>
		<dc:creator>GUSTAVO</dc:creator>
		<pubDate>Wed, 24 Jun 2009 22:04:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.silverlightbuzz.com/?p=238#comment-207</guid>
		<description>how i do to select one image ?</description>
		<content:encoded><![CDATA[<p>how i do to select one image ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Creating a 3D cube with images in Silverlight 3 &#187;</title>
		<link>http://www.silverlightbuzz.com/2009/06/12/using-projection-to-build-a-3d-carousel-in-silverlight-3/comment-page-1/#comment-197</link>
		<dc:creator>Creating a 3D cube with images in Silverlight 3 &#187;</dc:creator>
		<pubDate>Sat, 20 Jun 2009 17:04:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.silverlightbuzz.com/?p=238#comment-197</guid>
		<description>[...] Resource        Using projection to build a 3D carousel in Silverlight 3 Shadow effect using 3D projection in Silverlight [...]</description>
		<content:encoded><![CDATA[<p>[...] Resource        Using projection to build a 3D carousel in Silverlight 3 Shadow effect using 3D projection in Silverlight [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shadow effect using 3D projection in Silverlight 3 &#187;</title>
		<link>http://www.silverlightbuzz.com/2009/06/12/using-projection-to-build-a-3d-carousel-in-silverlight-3/comment-page-1/#comment-195</link>
		<dc:creator>Shadow effect using 3D projection in Silverlight 3 &#187;</dc:creator>
		<pubDate>Sat, 20 Jun 2009 17:00:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.silverlightbuzz.com/?p=238#comment-195</guid>
		<description>[...] Using projection to build a 3D carousel in Silverlight 3 [...]</description>
		<content:encoded><![CDATA[<p>[...] Using projection to build a 3D carousel in Silverlight 3 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://www.silverlightbuzz.com/2009/06/12/using-projection-to-build-a-3d-carousel-in-silverlight-3/comment-page-1/#comment-165</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Fri, 12 Jun 2009 21:37:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.silverlightbuzz.com/?p=238#comment-165</guid>
		<description>Hey, great post, really well written. You should post more about this.</description>
		<content:encoded><![CDATA[<p>Hey, great post, really well written. You should post more about this.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

