Example #1
0
        private void InitializeControl()
        {
            try
            {

                if (root == null)
                {
                    root = (Canvas)GetTemplateChild("root");
                    layerStoryboard = (Storyboard)root.Resources["layerStoryboard"];

                    layerAnimationX = (DoubleAnimation)layerStoryboard.Children[0];
                    layerAnimationY = (DoubleAnimation)layerStoryboard.Children[1];

                    layerState = new LayerState(SensitivityX, SensitivityY);

                    Conductor.Beat += Conductor_Beat;

                    rootParent = (Canvas)this.Parent;
                    //rootParent.PointerPressed += rootParent_PointerPressed;
                    rootParent.ManipulationDelta += rootParent_ManipulationDelta;
                    rootParent.ManipulationMode = this.ManipulationMode; // &ManipulationModes.TranslateY;

                }


            }
            catch { }
        }
Example #2
0
        public void UnInitializeControl()
        {
            if (root != null && rootParent != null)
            {
                Conductor.Beat -= Conductor_Beat;
                //rootParent.PointerPressed -= rootParent_PointerPressed;
                rootParent.ManipulationDelta -= rootParent_ManipulationDelta;

                layerState = null;
                layerStoryboard.Stop();
            }
        }
Example #3
0
        private void InitializeControl()
        {
            try
            {
                if (root == null)
                {
                    root            = (Canvas)GetTemplateChild("root");
                    layerStoryboard = (Storyboard)root.Resources["layerStoryboard"];

                    layerAnimationX = (DoubleAnimation)layerStoryboard.Children[0];
                    layerAnimationY = (DoubleAnimation)layerStoryboard.Children[1];

                    layerState = new LayerState(SensitivityX, SensitivityY);

                    Conductor.Beat += Conductor_Beat;

                    rootParent = (Canvas)this.Parent;
                    //rootParent.PointerPressed += rootParent_PointerPressed;
                    rootParent.ManipulationDelta += rootParent_ManipulationDelta;
                    rootParent.ManipulationMode   = this.ManipulationMode; // &ManipulationModes.TranslateY;
                }
            }
            catch { }
        }
Example #4
0
        public void UnInitializeControl()
        {
            if (root != null && rootParent != null)
            {
                Conductor.Beat -= Conductor_Beat;
                //rootParent.PointerPressed -= rootParent_PointerPressed;
                rootParent.ManipulationDelta -= rootParent_ManipulationDelta;

                layerState = null;
                layerStoryboard.Stop();
            }
        }