예제 #1
0
        public MultiIndicator()
        {
            InitializeComponent();

            InteractionPanel.PreviewMouseDown        += (s, e) => ZoomImageViewer.BeginDrag(e);
            InteractionPanel.PreviewMouseMove        += (s, e) => ZoomImageViewer.Drag(e);
            InteractionPanel.PreviewMouseUp          += (s, e) => ZoomImageViewer.EndDrag();
            InteractionPanel.PreviewMouseWheel       += (s, e) => ZoomImageViewer.Zoom(e);
            InteractionPanel.PreviewMouseDoubleClick += (s, e) => ZoomImageViewer.ZoomIn();

            SizeChanged += MultiIndicator_SizeChanged;

            BindingOperations.SetBinding(this, XProperty,
                                         new Binding("X")
            {
                Source = ZoomImageViewer, Mode = BindingMode.TwoWay
            });
            BindingOperations.SetBinding(this, YProperty,
                                         new Binding("Y")
            {
                Source = ZoomImageViewer, Mode = BindingMode.TwoWay
            });
            BindingOperations.SetBinding(this, ScaleProperty,
                                         new Binding("Scale")
            {
                Source = ZoomImageViewer, Mode = BindingMode.TwoWay
            });
            //            BindingOperations.SetBinding(this, BitmapSourceProperty,
            //                new Binding("BitmapSource") {Source = ZoomImageViewer, Mode = BindingMode.TwoWay});
        }
예제 #2
0
 public void ZoomActual()
 {
     ZoomImageViewer.ZoomActual();
 }
예제 #3
0
 public void ZoomFit()
 {
     ZoomImageViewer.ZoomFit();
 }
예제 #4
0
 public void ZoomIn()
 {
     ZoomImageViewer.ZoomIn();
 }