<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Colin Eberhardt&#039;s Adventures in .NET &#187; layout</title>
	<atom:link href="http://www.scottlogic.co.uk/blog/colin/tag/layout/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scottlogic.co.uk/blog/colin</link>
	<description>Colin Eberhardt&#039;s Adventures in .NET</description>
	<lastBuildDate>Thu, 09 Feb 2012 10:21:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>LayoutTransform vs. RenderTransform &#8211; What&#8217;s the Difference?</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2008/12/layouttransform-vs-rendertransform-whats-the-difference/</link>
		<comments>http://www.scottlogic.co.uk/blog/colin/2008/12/layouttransform-vs-rendertransform-whats-the-difference/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 05:45:42 +0000</pubDate>
		<dc:creator>Colin Eberhardt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[layout]]></category>

		<guid isPermaLink="false">http://wpfadventures.wordpress.com/?p=46</guid>
		<description><![CDATA[I have answered a few forum posts about the WPF transforms recently, mostly regarding confusion between RenderTransform and LayoutTransform. This brief blog post illustrates the difference between the two. The WPF layout system comprises, of two steps, followed by the rendering of the user interface (UI): Measure Arrange Render In the Measure step, the DesiredSize [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_light-green" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.scottlogic.co.uk%252Fblog%252Fcolin%252F2008%252F12%252Flayouttransform-vs-rendertransform-whats-the-difference%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22LayoutTransform%20vs.%20RenderTransform%20-%20What%27s%20the%20Difference%3F%20%23%22%20%7D);"></div>
<p>I have answered a few forum posts about the WPF transforms recently, mostly regarding confusion between <a href="http://msdn.microsoft.com/en-us/library/system.windows.uielement.rendertransform.aspx">RenderTransform</a> and <a href="http://msdn.microsoft.com/en-us/library/system.windows.frameworkelement.layouttransform.aspx">LayoutTransform</a>. This brief blog post illustrates the difference between the two.  The WPF <a href="http://msdn.microsoft.com/en-us/library/ms745058.aspx">layout system</a> comprises, of two steps, followed by the rendering of the user interface (UI):</p>
<ul>
<li>Measure</li>
<li>Arrange</li>
<li>Render</li>
</ul>
<p>In the Measure step, the DesiredSize of each element is computed; in the Arrange step the position of child elements within their parents is determined; finally, in the Render step, the result user interface is rendered to the screen.  Layout transforms and Render transforms are computed at different stages of the layout/render process:</p>
<ul>
<li><strong>LayoutTransform</strong></li>
<li>Measure</li>
<li>Arrange</li>
<li><strong>RenderTransform</strong></li>
<li>Render</li>
</ul>
<p>As a result, any transformations associated with an elements LayoutTransform property will have an impact on the subsequent Measure and Arrange steps. Whereas a RenderTransform will not have any impact on the layout process and will only effect rendering.  The difference is probably best illustrated by an example:</p>
<p><a href="http://wpfadventures.files.wordpress.com/2008/12/transforms.png"></a><a href="http://wpfadventures.files.wordpress.com/2008/12/transforms1.png"><img class="alignnone size-full wp-image-49" title="transforms" src="http://wpfadventures.files.wordpress.com/2008/12/transforms1.png" alt="transforms" width="440" height="350" /></a></p>
<p>In the above examples, it can be seen that when a LayoutTransform is applied, neighbouring elements are re-positioned to accommodate the transformed elements, whereas with the RenderTransform they are not. One common use of WPF transforms is to rotate ListView column headings. With the above examples it should be obvious that a LayoutTransform is required to achieve this effect.</p>
<p>You can download the demo project, <a href="http://wpfadventures.files.wordpress.com/2008/12/wpfrenderandlayouttransforms.doc">wpfrenderandlayouttransforms</a>, changing the file extension from .doc to .zip.</p>
<p>Regards, Colin E.</p>

]]></content:encoded>
			<wfw:commentRss>http://www.scottlogic.co.uk/blog/colin/2008/12/layouttransform-vs-rendertransform-whats-the-difference/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

