예제 #1
0
        private void ApplyResize_Click(object sender, RoutedEventArgs e)
        {
            ImageEditorViewModel vm = DataContext as ImageEditorViewModel;

            vm.ResultImage = vm.ResizeVm.ApplyTransform();
            vm.RefreshBindings();
        }
예제 #2
0
        /*public ImageEditor(FrameworkElement parentControl, BitmapImage image)
         * {
         *  InitializeComponent();
         *  (DataContext as ImageEditorViewModel).ResultImage = image;
         *  this.parentControl = parentControl;
         * }*/

        public void EditImage(BitmapImage image)
        {
            ImageEditorViewModel vm = DataContext as ImageEditorViewModel;

            vm.ResultImage = image;
            vm.RefreshBindings();
            Visibility = Visibility.Visible;
        }