private void OnInsertDataUri(object sender, RoutedEventArgs e) { TryIt(droppedFilePath => { var dataUri = UseClipboardImage ? Images.ClipboardDibToDataUri() : Images.ImageFileToDataUri(droppedFilePath); TextEditor.Document.Insert(GetInsertOffset(TextEditor, DragEventArgs), dataUri); }); }
private void OnInsertDataUri(object sender, RoutedEventArgs e) { Guard(droppedFilePath => _vm.UseClipboardImage ? Images.ClipboardDibToDataUri() : Images.ImageFileToDataUri(droppedFilePath)); }