Spin Spin Sugar [Updated code to easily animate orientation changes for any Windows Phone application]


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!

Comments (8)
  1. Justin Chase says:

    Your zip file appears to be broken.

  2. David Anson says:

    Justin Chase,

    If you click the download link for the sample in a browser, it takes you to a page with the following text:

    AnimateOrientationChanges.zip has been superseded by DynamicOrientationChanges.zip. The download should begin shortly…

    That page includes a link with a redirect to the following download – and performs the redirect after about 5 seconds:

    cesso.org/…/DynamicOrientationChanges.zip

    I've just re-verified that the resulting DynamicOrientationChanges.zip file downloads and unzips successfully.

    Hope this helps!

  3. Pero says:

    Hi,

    I am having a problem.

    If there is a textbox covered by virtual keyboard, it will not be scrolled into the view. To test it you can add textbox to your application under ElasticEase radio button, and then click on it to bring up keyboard.

    If root frame is initialized standard way:

    RootFrame = new PhoneApplicationFrame();

    Text box will normally scroll into the view

    Pero

  4. David Anson says:

    Pero,

    Great feedback, thank you very much! I have an idea why this might be the case (and an idea to fix it), but it'll probably be a couple of days before I have time to look into this. Thanks very much for your patience – I'll update this thread or post a new version of the code once I've sorted this out. 🙂

  5. David Anson says:

    Pero,

    I looked into the SIP problem you reported just now and it appears that my idea for fixing it works. 🙂 I'll blog a sample update with this fix and another soon, but if you'd like to contact me via the "Email Blog Author" link on the sidebar, I'd be happy to send you the changes now so you can try this out in advance! Thanks again for letting me know about this problem!

  6. Shane S. Anderson says:

    Easy and works well, thanks!

  7. Tony Cabello says:

    I'm using your AnimateOrientationChangesFrame.cs in a project and everything went fine until I started using SilverlightToolkit's AutoCompleteBox. An ArgumentException was thrown on _clientArea.Arrange inside ArrangeOverride, because HandleSizeChanged is not yed called so it ends building a zero sized Rect. It turns out just adding _handledSizeChanged to the condition does the trick. 🙂

    Thanks for sharing this code anyway!

  8. David Anson says:

    Tony Cabello,

    Thanks for the information! I'll look into this sometime soon-ish and see about making a change like this for the next release.

Comments are closed.