How to animate height and width simultaneously in WPF from Code Behind
===

Here iam trying to animate width & height of the form(MainWnd) simultaneously but not able to get the desired output :(

 
 
 
 
                                                                                                                     




        Dim aniHeight As New DoubleAnimation
        Dim aniWidth As New DoubleAnimation
        'story board to handle 2 animations
        Dim sb As New Storyboard()
        aniWidth.From = Me.Width
        aniHeight.From = Me.Height
        aniHeight.To = 470
        aniWidth.To = 500
        aniHeight.Duration = TimeSpan.FromSeconds(1)
        aniWidth.Duration = TimeSpan.FromSeconds(1)
        sb.Children.Add(aniHeight)
        sb.Children.Add(aniWidth)
        Storyboard.SetTarget(aniHeight, MainWnd)
        Storyboard.SetTarget(aniWidth, MainWnd)
        Storyboard.SetTargetProperty(aniWidth, New PropertyPath("(Width)"))
        Storyboard.SetTargetProperty(aniHeight, New PropertyPath("(Height)"))
        sb.Begin()