Пример #1
0
        private void InitializeTouchToolkit()
        {
            /* Initialize framework */
            var inputProvider = new SilverlightTouchInputProvider();
            GestureFramework.Initialize(inputProvider, LayoutRoot, Assembly.GetExecutingAssembly());

            /* Add common visual feedbacks */
            GestureFramework.AddTouchFeedback(typeof(BubblesPath));
        }
Пример #2
0
        void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            TouchInfo info = new TouchInfo() { ActionType = TouchAction2.Down, GroupId = 0, Position = new Point(1, 1), TouchDeviceId = 14 };
            info.Tags.Add("size", "20");

            FrameInfo fi = new FrameInfo() { TimeStamp = 123121, WaitTime = 10 };
            fi.Touches.Add(info);

            List<FrameInfo> frames = new List<FrameInfo>();
            frames.Add(fi);

            string content = TouchToolkit.Framework.Utility.SerializationHelper.Serialize(frames);

            // Initialize Gesture Framework
            TouchInputProvider inputProvider = new SilverlightTouchInputProvider();
            GestureFramework.Initialize(inputProvider, LayoutRoot, Assembly.GetExecutingAssembly());
            //GestureFramework.ShowDebugPanel(GestureFramework.DebugPanels.GestureRecorder);

            // Add touch feedbacks
            GestureFramework.AddTouchFeedback(typeof(BubblesPath));

            // Add gesture feedbacks
            GestureFramework.AddGesturFeedback("lasso", typeof(HighlightSelectedArea));

            // Load UI
            LoadImages(false);
        }