WPF: LayoutTransform and RenderTransform

LayoutTransform – A transform that is applied before the layout pass. After the transform is applied, the layout system processes the transformed size and position of the element.

RenderTransform – A transform that modifies the appearance of the element but is applied after the layout pass is completed. By using the RenderTransform property instead of the LayoutTransform, you can gain some performance benefits.

You may ask which property we should use. Because of the performance benefits that it provides, use the RenderTransform property whenever possible, especially when you use animated Transform objects. Use the LayoutTransform property when you are scaling, rotating, or skewing, and you need the parent of the element to adjust to the transformed size of the element. Note that when they are used with the LayoutTransform property, TranslateTransform objects appear to have no effect on elements. This is because the layout system returns the translated element to its original position as part of its processing.

– from “Pratical WPF Graphics Programming”

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>