Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8869245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:26:38+00:00 2026-06-14T17:26:38+00:00

In windows store applications, a RepositionThemeTransition can be added to UI elements in order

  • 0

In windows store applications, a RepositionThemeTransition can be added to UI elements in order to make them swoop instead of teleporting when their positions change. There are also other types of transitions.

<Rectangle>
    <Rectangle.Transitions>
        <TransitionCollection>
            <RepositionThemeTransition/>
        </TransitionCollection>
    </Rectangle>
</Rectangle>

WPF doesn’t appear to support this functionality. Is there a way to do something equivalent?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:26:40+00:00Added an answer on June 14, 2026 at 5:26 pm

    I ended up just emulating the functionality myself, by applying animations in LayoutUpdated events that initially counteract changes in position. Here’s the code:

    public static void AddRepositionTransitionsUsingRenderTransform(this FrameworkElement control, bool x = true, bool y = true, CancellationToken lifetime = default(CancellationToken)) {
        if (control == null) throw new ArgumentNullException("control");
        var approachPeriod = TimeSpan.FromMilliseconds(100);
    
        // animate when positions change, to give a 'swooping' effect instead of teleporting
        var transform = new TranslateTransform();
        var oldPosition = May<Point>.NoValue;
        EventHandler updated = (sender, arg) => {
            // determine where the control has moved to
            var newPosition = control.ActualWidth == 0 || control.ActualHeight == 0 || control.Visibility != Visibility.Visible
                            ? May<Point>.NoValue
                            : control.TranslatePoint(new Point(-transform.X, -transform.Y), Application.Current.MainWindow);
            if (oldPosition == newPosition) return;
    
            // adjust the animation to initially cancel the change in position, and finish at the new final position after the approach period
            var dif = (from o in oldPosition
                        from n in newPosition
                        select new Point(n.X - o.X, n.Y - o.Y)
                        ).ElseDefault();
            if (x) transform.BeginAnimation(TranslateTransform.XProperty, new DoubleAnimation(transform.X - dif.X, 0, approachPeriod));
            if (y) transform.BeginAnimation(TranslateTransform.YProperty, new DoubleAnimation(transform.Y - dif.Y, 0, approachPeriod));
    
            oldPosition = newPosition;
        };
    
        // register for events and replace transform, until lifetime ends
        var oldTransform = control.RenderTransform;
        control.RenderTransform = transform;
        control.LayoutUpdated += updated;
        lifetime.Register(() => {
            control.LayoutUpdated -= updated;
            control.RenderTransform = oldTransform;
        });
    }
    

    Note that “May” is a custom option type, so that part won’t compile. You can use the type Point? instead, with explicit null checks instead of queries.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm analyzing existing Windows Store applications and modifying them to make sure my company's
Is there a way I can make a Windows Store App style tile for
Pardon my ignorance, but I've never really developed Windows applications. How do you store
I would like to securely store a shared secret key on Windows but make
In a Windows Store app I can only store WinRT types in the ApplicationSettings,
For Windows Store applications, a developer licence is required to run the unit tests,
I am writing a Windows Store App toy application for Windows 8. It has
I am creating a windows phone application, which need to store some data in
Is there something like SESSION in Windows application? I want to store a few
Can I host an application in Windows Azure and have the database stored on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.