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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:42:10+00:00 2026-06-15T04:42:10+00:00

Just a quick question, I’ve been searching for ages on Google. I have a

  • 0

Just a quick question, I’ve been searching for ages on Google. I have a storyboard:

<Storyboard x:Key="ViewLeftToRight" AccelerationRatio=".5" DecelerationRatio=".5">
    <DoubleAnimation Storyboard.TargetName="ReferenceInfo" Storyboard.TargetProperty="Margin" Duration="0:0:0.15" To="{Binding, Width},0,0,0"/>
</Storyboard>

It doesn’t work. I was wondering if there is a way for me to bind the Width of the control to the “left” margin. If I need to use a converter, could you possibly show how it would be written in XAML in the above example?

Thanks!

  • 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-15T04:42:12+00:00Added an answer on June 15, 2026 at 4:42 am

    No, you can’t bind an animation to Margin, because it does not define a corresponding dependency property. There are several alternatives, here are two:

    1. Place your object in a Canvas and animate Canvas.Left and Canvas.Top
    2. Define a RenderTransform on your object, and animate its X and Y properties.

    1)

    <Canvas>
        <TextBlock Text="test" x:Name="ReferenceInfo" Canvas.Left="0" Canvas.Top="0" />
    </Canvas>
    

    Here your storyboard short target the same element ReferenceInfo, but target the attached properties, which you denote using brackets like “(Canvas.Left)”:

    <DoubleAnimation 
        Storyboard.TargetName="ReferenceInfo" 
        Storyboard.TargetProperty="(Canvas.Left)" Duration="0:0:0.15" 
        To="{Binding Width}"/>
    

    2)

    <TextBlock Text="test" x:Name="ReferenceInfo">
        <TextBlock.RenderTransform>
            <TranslateTransform x:Name="TranslateReferenceInfo" X="0" Y="0" />
        </TextBlock.RenderTransform>
    </TextBlock>
    

    The animation would then reference the TranslateTransform itself by name:

    <DoubleAnimation 
        Storyboard.TargetName="TranslateReferenceInfo" 
        Storyboard.TargetProperty="X" Duration="0:0:0.15" 
        To="{Binding Width}"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just a quick question here guys. I've been searching to no avail so far.
Just a quick question for you guys. I have a resource key that is
Just a quick question here. I have a program in which I need to
Just a quick question on the memory usage of the play framework. I have
just a quick question - most tablets and devices have a touchscreen keyboard that
Just a quick question. Say I have updated my app to iOS6 and changed
Just a quick question. I have an NSArray that is generated in my applicationDidFinishLaunching
Just a quick question I haven't found an answer for by searching... How do
Just a quick question... I currently have the following jQuery code with a selector
Just a quick question and I hope that hasn't been asked before. I want

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.