private void AddMazeToContainer()
 {
     mazeUserControl = new MazeUserControl(mazeDrawer);
     container.Children.Add(mazeUserControl);
     Grid.SetColumn(mazeUserControl, 1);
     Grid.SetRow(mazeUserControl, 2);
 }
示例#2
0
        public BlurAnimation(MazeUserControl mazeUserControl)
        {
            myStoryboard      = new Storyboard();
            myDoubleAnimation = new DoubleAnimation();
            blurEffect        = new BlurEffect();

            mazeUserControl.RegisterName("blurEffect", blurEffect);
            blurEffect.Radius = 0.0;
            mazeUserControl.mazeCanvas.Effect = blurEffect;

            myDoubleAnimation.Duration    = new Duration(TimeSpan.FromSeconds(2));
            myDoubleAnimation.AutoReverse = false;

            Storyboard.SetTargetName(myDoubleAnimation, "blurEffect");
            Storyboard.SetTargetProperty(myDoubleAnimation, new PropertyPath(BlurEffect.RadiusProperty));
            myStoryboard.Children.Add(myDoubleAnimation);
        }