Note that there are some explanatory texts on larger screens.

plurals
  1. POThickness animation trouble? (with Begin function parameters)
    primarykey
    data
    text
    <p>There is Main frame on which there is a button and control and also stackpanel. Attempting to move worked animation from xaml to .cs I have wrote next cool function)):</p> <pre><code>private void ToggleButton_Checked(object sender, RoutedEventArgs e) { int heightBottom = 100; System.Windows.Thickness th = stackPanel1.Margin; th.Top = stackPanel1.Margin.Top + heightBottom; ThicknessAnimation animStackPanel1 = new ThicknessAnimation { From = stackPanel1.Margin, To = th, AccelerationRatio = 0.2, FillBehavior = FillBehavior.Stop, DecelerationRatio = 0.8, Duration = DURATION }; System.Windows.Thickness th2 = fxPSEditorView.Margin; th2.Right = fxPSEditorView.Margin.Right - heightBottom; th2.Bottom = fxPSEditorView.Margin.Bottom - heightBottom; ThicknessAnimation animPSEditorView = new ThicknessAnimation { From = fxPSEditorView.Margin, To = th2, AccelerationRatio = 0.2, FillBehavior = FillBehavior.Stop, DecelerationRatio = 0.8, Duration = DURATION }; Storyboard.SetTarget(animPSEditorView, fxPSEditorView); Storyboard.SetTargetProperty(fxPSEditorView, new PropertyPath(MarginProperty)); sb.Children.Add(animPSEditorView); Storyboard.SetTarget(animStackPanel1, stackPanel1); Storyboard.SetTargetProperty(stackPanel1, new PropertyPath(MarginProperty)); sb.Children.Add(animStackPanel1); sb.Begin();//null reference error here! }; </code></pre> <p>As I understand I must specify TWO parameters for sb.Begin - one for stackPanel1 and the other is for fxPSEditorView. But It does not takes a set of objects as first parameter. Any ideas how to run this animation will be wellcome ! Thank you</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload