void ImagePage_Loaded(object sender, RoutedEventArgs e)
        {
            var behaviors = Interaction.GetBehaviors(_image).OfType<MultiTouchBehavior>();
            if (behaviors.ToList().Count > 0)
            {
                _multiTouchBehavior = behaviors.First();
            }

            _multiTouchBehavior.Move(new Point(230, 250), 0, 200);
        }
Пример #2
0
        public void AddPicture(PictureItem picture)
        {
            var image = new AddedImage {DataContext = picture};

            var multiTouchBehavior = new MultiTouchBehavior
            {
                IsConstrainedToParentBounds = true,
                IsScaleEnabled = true,
                // IsRotateEnabled = true,
                IsTranslateEnabled = true,
                IsInertiaEnabled = false,
                IsPivotEnabled = true,
                MaximumScale = 200,
                MinimumScale = 50,
                Scale = 100,
                Rotation = 0
            };

            Interaction.GetBehaviors(image).Add(multiTouchBehavior);

            this.Canvas.Children.Add(image);
        }