Drag and drop placement did not work, image was repositioned to another part of the code. Collapsable code region not compatible. Image no longer appears. There are just too many bugs (VS2010 Premium).
I wanted to try if it works with C++ as well. As soon as the image drop cursor was hovering over the C++ source, Visual Studio 2010 has displayed a message box about an exception. Once I have dropped the file, it opened to be edited as a resource.
I don't recommend this extension. An image will not insert unless it fits in the code window when you drag and drop, then (at least in my case) you can't undo it. If you code is hidden, the image will randomly appear and disappear when you scroll up and down, and once you accidentally resize an image to be large it can temporarily vanish and become impossible to select it again. Not worth the hassle
I wish the pictures would disappear/hide when the code its attached to is collapsed!!
The Pictures get in the way sometimes, when the Code it is referring to is collapsed, but the picture is still there.
Try draging to the far left of the code display and drop there. It's the only way I can get it to work. Also play with adding comment lines.
Greatest idea since sliced bread -- but the implementation is wanting badly.
I am not using the extension at the moment, although I like its concept, but I got an exception in VS while moving back and forth between tasks using Alt-Tab:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Microsoft.VisualStudio.Utilities.PropertyCollection.GetProperty(Object key)
at Microsoft.VisualStudio.ImageInsertion.ImageAdornmentRepositoryService..ctor(ITextBuffer textBuffer)
at Microsoft.VisualStudio.ImageInsertion.ImageAdornmentManager..ctor(IServiceProvider serviceProvider, IWpfTextView view, IEditorFormatMap editorFormatMap)
at Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func`1 creator)
at Microsoft.VisualStudio.ImageInsertion.ImageInsertionFactory.GetOrCreateManager(IWpfTextView view)
at Microsoft.VisualStudio.ImageInsertion.ImageInsertionFactory.Microsoft.VisualStudio.Text.Formatting.ILineTransformSourceProvider.Create(IWpfTextView view)
at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.<BindContentTypeSpecificAssets>b__9(ILineTransformSourceProvider p)
at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension,TMetadata,TExtensionInstance](Object errorSource, Lazy`2 provider, Func`2 getter)
There's a problem with #region collapsed. It doesn't become invisible... And, also, I have hard time to place the image to the exact line that I need. Sometimes, the image seems being added but I can't see it and sometimes it jumps to another line (I do have some spaces for the lines). Can you tell me is there a constraint/check for the spaces that the image needs to be place at? Thanks!
Yes, I see this as well. It would be really nice for it to recognize both #region collapsed and "Hide Selection". That way you could collapse them down when you don't need to look at them.
I think I have finally figured out the "trick" to getting the image where I want it:
1) Add a comment line that defines the image. The image then appears to be "hooked" to this line.
2) Drag the image and watch for a blue line ... it is often at the very top of the image and not at the location of your cursor.
3) When the blue line is over your added comment, drop the image.
The image then appears to stay with the line that it was dropped on.
I saved my images to my Model project, but I cannot drag and drop them from there. I tried moving the images to the WinForms project and it worked fine from there. Any idea why it does not work from the Model project?
I also second the desire to paste directly from the clipboard instead of having to have extra files.
Firstly, I think this extension is one of the best ones. I love it, but I am not using it at the moment, because I can't seem to place the images where I want them, and the region areas are causing me a bit of issues. I also seem to be unable to delete an image once inserted.
I think a handy feature will also be to allow image insertions from the clipboard, since I use Gadwin to capture areas, and that is in my clipboard.
I am looking forward to the maturing of this extension.
Assuming I have a solution with some images in the code. If someone else opens the solutions but doesn't have the extension installed; will the image be simply overlooked? If the editor does not show it but the user saves the code, will the image be discarded then or will it be kept in the code?
Besides this, it's the kind of extension I've been waiting for ten years now! Great stuff, thanks!