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 739381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:23:38+00:00 2026-05-14T08:23:38+00:00

I have Border element with Margin property bound to StartDate (DateTime) property of some

  • 0

I have Border element with Margin property bound to StartDate (DateTime) property of some class. If property changed margin is changed also (with a help of converter).

I’d like to make changes as smoothly as possible. for example, on UI side one hour in data class equals to 15 pixels on screen and when i change StartDate +/- one hour i can see that element margin jumping by +/- 15 pixels right/left… so how can i animate this?

Thank you in advance!

BTW – this is my first question here 🙂

  • 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-05-14T08:23:39+00:00Added an answer on May 14, 2026 at 8:23 am

    Unforunately you can’t natively manipulate a margin through an animation. A margin is really a Thickness object and objects are almost impossible for the simple property animator to figure out on their own.

    However, like anything now-a-days, there are many ways to override this:

    1. Move the position of the object instead of the margin:
      Animate Margin Change in Silverlight

    2. Create a new class similar to the ThicknessAnimation class in WPF and call it in code: http://blogs.msdn.com/blemmon/archive/2009/03/18/animating-margins-in-silverlight.aspx

    3. …or my preferred way: Find something else to animate. You can manipulate a different object which moves your other objects over. You can animate width and height of an invisible/clear object very easily. If that item is the first thing in a stack panel, all items after it will be moved as it’s size values are changed. This can become finicky, but it is really easy to do.

    Good luck!

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

Sidebar

Related Questions

I have a border element with rounded corners containing a 3x3 grid. The corners
I have a UserControl with a Border element within it that I want to
I have this code <html> <head> <style type=text/css> .frame {width: 50em; border: 1px solid
In my test, I have 2 spans both set to display:inline-block with a border
I wonder if it is possible to bind a structure element like BorderThickness.Top to
I am using the following code: <ListBox x:Name=lbItems Grid.Row=1 Margin=2> <ListBox.Template> <ControlTemplate> <Border Background={StaticResource
I have a doosie of a layout problem that looks like a browser bug.
I have an img element set next to a div. I have tried a
I have the following HTML (excerpt from larger code-base) <div class=diary-event ui-corner-all title=[title]> <span
Does anyone have a solution for styling the borders of select elements in Internet

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.