Lying to the layout system for a good cause [Bringing LayoutTransform to Silverlight 2!]


This blog has moved to a new location and comments have been disabled.

All old posts, new posts, and comments can be found on The blog of dlaa.me.

See you there!

LayoutTransformControl.zip

Comments (15)

  1. SilverlightのコントロールにはRenderTransformはありますが、LayoutTransformはありません。前者はレイアウトされた後で回転などの座標変換が適用されるので、レイアウトが正しく行われません。後者はレイアウト前に適用されるので、座標変換後のコントロールに対しレイアウトが正しく行われます。

  2. Two posts on the Layout system this morning: Dave Relyea and David Anson. From SilverlightCream.com

  3. I found a very good post: How to do LayoutTransform in Silverlight. Currently Silverlight supports RenderTransform

  4. Delay's Blog says:

    In the introductory post for LayoutTransformControl , I showed a trivial use case to demonstrate the

  5. gobledb@hotmail.com says:

    Has this been tested on Beta 2? I don’t know enough about how dependency properties and PropertyMetadata to debug this properly. In the LayoutTransformControl.cs file, I’m getting the following:

    Error 1 The best overloaded method match for ‘System.Windows.DependencyProperty.Register(string, System.Type, System.Type, System.Windows.PropertyMetadata)’ has some invalid arguments C:Software ProjectsSamplesSilverlightLayoutLayoutTransformControlSilverlightLayoutTransformControl.cs 36 69 LayoutTransformControlSilverlight

    Error 2 Argument ‘4’: cannot convert from ‘System.Windows.PropertyChangedCallback’ to ‘System.Windows.PropertyMetadata’ C:Software ProjectsSamplesSilverlightLayoutLayoutTransformControlSilverlightLayoutTransformControl.cs 37 80 LayoutTransformControlSilverlight

    And then again when it tries to set the AngleProperty dependency.

  6. gobledb@hotmail.com says:

    My apologies. I came to this post from somewhere else, and didn’t notice that you’d posted an updated version.

  7. coughlinj says:

    Hey Delay!

    This was an amazing post.  I’ve made use of it and have noticed that it broke with RC0.  They have made the constructors of Transform internal.  Please let us know if you plan to update this yourself.

    Otherwise if you post a technical discussion of how LayoutTransformControl works it would make my tracing into the code a little easier.

    Either way thanks a bunch for the control it was working like a charm in Beta 2 and I’m sure I’ll get it going again for the RC!

  8. Delay says:

    coughlinj,

    Thank you for the kind words! I’m aware of the breaking changes with RC0 and hope to release an update of LayoutTransformControl very soon. I’d actually begun working on this some time ago, but was blocked by a couple of problems that have since been fixed.

    Thanks for your patience!

  9. Delay's Blog says:

    In the introductory post for LayoutTransformControl and the feature-enhancing follow-up , I gave a variety

  10. Delay's Blog says:

    I’d almost finished patting myself on the back for managing to implement WPF’s LayoutTransform on Silverlight

  11. Delay's Blog says:

    When I first wrote about adding full LayoutTransform fidelity to Silverlight with my LayoutTransformControl

  12. Delay's Blog says:

    I’m a believer in the power of LayoutTransform – so much so that I wrote a control to graft this capability

  13. Delay's Blog says:

    I came across a question on the Silverlight Toolkit support forum yesterday asking how to animate the

  14. Hello,

    Thank you for the great job.

    I downloaded the code you provided and tried to make it work in my Silverlight 4 application, but got some compilation errors. Do you have plans to upgrade your control to properly support it?

    Thanks in advance,

    Igor Kondrasovas.

  15. Delay says:

    Igor,

    For Silverlight 3 and Silverlight 4, you can use the LayoutTransformer control that comes with the Silverlight Toolkit. It's my LayoutTransformControl with a different name and a slightly different API. I've written more about this here: blogs.msdn.com/…/a-rose-by-any-other-name-layouttransformcontrol-on-track-to-ship-in-the-silverlight-toolkit-under-the-name-layouttransformer.aspx

    Alternatively, you can upgrade to one of the more recent releases from my blog or take the source from the Silverlight Toolkit instead.

    Hope this helps!