2

I need to grow the size of my Application.Current.MainWindow (when running OOB, of course).
Is there any way to do it in a Storyboard?
I can do it programatically:

private long timerCntr = 0;
    private void OpenBtn_OnClick(object sender, RoutedEventArgs e)
    {
        timerCntr = 0;
        DispatcherTimer t = new DispatcherTimer();
        t.Interval = new TimeSpan(0, 0, 0, 0, 10);
        t.Tick += (o, args) =>
            {
                if (timerCntr < 100)
                {
                    Application.Current.MainWindow.Height += 1;
                    userControl.Height += 1;
                    LayoutRoot.Height += 1;
                    ++timerCntr;
                }
                else
                {
                    t.Stop();
                }
            };
        t.Start();
        OpenStory.Begin();  // Controls opacity of object becoming visible
    }  

Thanks for any insights...

Number8
  • 12,322
  • 10
  • 44
  • 69

1 Answers1

0

The link in comments provided the answer.
Basically, add a hidden slider control; change the slider's value in a storyboard; in the slider's value_changed handler change the window size.
Works great.

Number8
  • 12,322
  • 10
  • 44
  • 69