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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:18:59+00:00 2026-06-13T09:18:59+00:00

I resize a dock panel like this: Private WithEvents PanelAnimation As New DoubleAnimation Private

  • 0

I resize a dock panel like this:

Private WithEvents PanelAnimation As New DoubleAnimation
Private WithEvents PanelSB As New Storyboard

With PanelAnimation
        .From = WpfDockPanel.ActualHeight
        .To = s
        .Duration = New Duration(TimeSpan.FromSeconds(0.5))
        .AccelerationRatio = 0.5
        .DecelerationRatio = 0.5
End With
PanelSB.Children.Add(PanelAnimation)
Storyboard.SetTarget(PanelAnimation, WpfDockPanel)
Storyboard.SetTargetProperty(PanelAnimation, New PropertyPath(DockPanel.HeightProperty))
PanelSB.Begin(AviMainWindow)

..which works fine. Then, I want to manually set the size, but it won’t change, if I stop the code and type in a different size, the size won’t change, it is as though it is readonly.

But if I change the size once, not by animating, just by setting the size, I can change it again no problem. Why can’t I manually set the height after animating?

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-13T09:19:00+00:00Added an answer on June 13, 2026 at 9:19 am

    This is because the animation’s FillBehavior is set to HoldEnd by default. You could set it to Stop.

    You would however also have to set the Height property of the animation target to the desired end value manually before starting the animation. Otherwise it would flip back to the value it had before the animation was started.

    With PanelAnimation
            .FillBehavior = FillBehavior.Stop
            ...
    
    ...
    WpfDockPanel.Height = s
    PanelSB.Begin(AviMainWindow)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to resize a dynamic dock panel to the size of the
I need resize this image proportionally heigth 411px. how do this? [HttpPost] public WrappedJsonResult
I want to resize the dialog dynamically just before I open it, but this
I resize a bitmap using the following code: FileOutputStream out = new FileOutputStream("/sdcard/mods.png"); Bitmap
I trying to resize one image from InputStream, so I use the code in
I would like to resize the pagewrapper div with javascript. I have chrome and
The aim I would like to set such size for the DataGrid (standard, from
I have a problem with the DockPanel component. When i resize the panel I
I have a panel with a groupbox inside of it. I'd like the groupbox
I have something like this: <OBJECT id='MyObject' name='MyObject' classid='clsid:2C582098-28CA-224e-D9B9-34E516F10E9F' width='...' height='...'> I was determining

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.