Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
 public void SelectPicture(PictureItem pictureItem)
 {
     this.DeselectAll();
     pictureItem.IsSelected = true;
 }