user1016179
user1016179

Reputation: 629

why width property doesn't change from code - WPF

I have a grid in WPF application which contains 2 grids. The inner grids are width binding - one depend on the other. I change the width of one grid from code with a story board and it works. but when I try to change it in another method, it does nothing. what can cause this behavior?

Upvotes: 0

Views: 130

Answers (1)

Andy
Andy

Reputation: 6466

Check that the storyboard isn't constantly putting it's final value in to the width property on your grid, you can turn this off by giving it a FillBehavior of Stop. MSDN

<Storyboard FillBehavior="Stop">

Upvotes: 1

Related Questions