Beispiel #1
0
        private void ButtonOpen_Click(object sender, RoutedEventArgs e)
        {
            Storyboard storyboard = new Storyboard();

            DoubleAnimation daWidth = new DoubleAnimation(SideMenu.ActualWidth, 200, new Duration(TimeSpan.FromSeconds(0.4)));

            storyboard.Children.Add(daWidth);

            Storyboard.SetTarget(daWidth, SideMenu);
            Storyboard.SetTargetProperty(daWidth, new PropertyPath(WidthProperty));

            SideMenu.BeginStoryboard(storyboard);

            SideMenu.Focus();
        }