GithubHelp home page GithubHelp logo

madskristensen / knownmonikersexplorer Goto Github PK

View Code? Open in Web Editor NEW
28.0 4.0 10.0 477 KB

A Visual Studio extension

License: Apache License 2.0

C# 100.00%
visual-studio-extension vsix images async-toolwindow

knownmonikersexplorer's Introduction

KnownMonikers Explorer

Build status

Requires Visual Studio 2019 or newer

Provides a tool window for Visual Studio extension authors that lets you easily browse all the image monikers in the KnownMonikers catalog.

Download this extension from the Marketplace or get the CI build.


Open the tool window from the top menu View -> Other Windows -> KnownMonikers Explorer.

Filter the image monikers by typing in the search box.

Tool window

Right-click any moniker for a list of actions to take.

Context Menu

Export...

Export the image moniker to file in the size you specify. PNG, JPEG and Gif formats are supported

Export Dialog

Hitting the Enter key will also show the export dialog.

Copy to clipboard

This will copy the name of the moniker to the clipboard. You can also use Ctrl+C to do the same.

Find a moniker used in Visual Studio

Hover the mouse over an image moniker in Visual Studio (for example, an image on a toolbar button) and press Ctrl+Shift+Alt+Q. The KnownMonikers Explorer window will open and highlight the image moniker.

Find Moniker

Related resources

License

knownmonikersexplorer's People

Contributors

drewnoakes avatar madskristensen avatar reduckted avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

knownmonikersexplorer's Issues

Feature request: Add support to copy and/or display moniker XAML representation

I am a heavy user of the Visual Studio Image Library, and this extension is a really handy way to browse all of the images that are there along with their keywords (certainly a million times better than loading the giant .html file and searching through it in a browser).

The problem I have is that you can only export the image you want as a png file -- and in my application I use all XAML-based vector graphics. This means once I find the image I want in KnownMonikers I now have to go to the folder with the downloaded Image Library, find the folder matching the moniker name, find the .xaml file, open it in notepad, copy the XAML, and finally paste it into my ResourceDictionary to close the loop. It's not difficult -- it's just a lot of manual steps. This would all be greatly simplified if there was a "copy as XAML" or even "show XAML" option available.

Access to the GUID/id representation required for VSCT files

When editing a VSCT file we need a GUID/integer pair to describe the image. For example:

    <GuidSymbol name="ImageCatalogGuid" value="{ae27a6b0-e345-4288-96df-5eaf394ee369}">
      <IDSymbol name="Play" value="2356" />
    </GuidSymbol>

Using KnownMonikers Explorer I can see I'd like to use ResourceView, however I cannot see the GUID or integer representation of these values.

Workarounds for this are to:

  1. Use the legacy Visual Studio Image Library Viewer and configure it to find the .imagemanifest file, and wait a long while for it to load everything, hoping it doesn't crash.
  2. Open the .imagemanifest file manually to find the relevant entry for the moniker I'm interested in.

It'd be great to see the GUID/id in your extension. A context menu item to copy these values would be great.

image

If a Copy VSCT data item could be added, it might copy text resembling this to the clipboard:

    <GuidSymbol name="ImageCatalogGuid" value="{ae27a6b0-e345-4288-96df-5eaf394ee369}">
      <IDSymbol name="ResourceView" value="2591" />
    </GuidSymbol>

License of exported icons

Hey,
this is a helpful little extension but I wonder if I can use the exported Icons in other applications.

Do you know which license Microsoft uses for the icons?

There could be a small hint in the readme.

[Feature Request] Find the name of a known moniker that is used in Visual Studio

The other day I was looking for a moniker to use. I found a suitable one that was used somewhere else in Visual Studio, but I didn't know what its name was. I tried searching in the KnownMoniker Explorer window, but couldn't find it. What would be awesome is a way to select an ImageMoniker in Visual Studio's UI and have the KnownMoniker Explorer window highlight it.

Does that sound like a good fit for this extension? I've put a proof-of-concept together and it's fairly simple, but I'm not sure if it's within the scope of this extension.


As an aside, while I was writing the proof-of-concept, I discovered that if I press Ctrl+Alt+Shift and hover over an image, it tells me what the image moniker is.
hover
It's pretty close to what I was thinking of, but doesn't handle all places where an image moniker is used. Do you have any idea what's doing that? Is it Visual Studio or some other extension?

ARM64 support

Is your feature request related to a problem? Please describe.
I do much of my Visual Studio extension development in a Parallels hosted Windows VM on my M1 Mac, and miss having access to the various VSIX development related extensions.

Describe the solution you'd like
I'd like the extension to additionally target ARM64 versions of VS [2022].

Describe alternatives you've considered
When I really need these extensions I'll break down and RDP to my Windows desktop, but my VM runs so much snappier than RDP, even on the local network.

Additional context
For my own extension, I've found ARM64 support required only a small change to the VSIX manifest; no code changes were necessary (as it already targeted AnyCPU and did not make use of any AMD64-specific VS features). I would guess this extension is similar.

System.Resources.MissingManifestResourceException during VS startup

I'm looking at an exception during VS startup.

System.Resources.MissingManifestResourceException: 'Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "VSPackage.resources" was correctly embedded or linked into assembly "KnownMonikersExplorer2022" at compile time, or that all the satellite assemblies required are loadable and fully signed.'

The stack:

 	mscorlib.dll!System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(string fileName) Line 399	C#
 	mscorlib.dll!System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(System.Globalization.CultureInfo culture, System.Collections.Generic.Dictionary<string, System.Resources.ResourceSet> localResourceSets, bool tryParents, bool createIfNotExists, ref System.Threading.StackCrawlMark stackMark) Line 81	C#
 	mscorlib.dll!System.Resources.ResourceManager.InternalGetResourceSet(System.Globalization.CultureInfo requestedCulture, bool createIfNotExists, bool tryParents, ref System.Threading.StackCrawlMark stackMark)	C#
 	mscorlib.dll!System.Resources.ResourceManager.InternalGetResourceSet(System.Globalization.CultureInfo culture, bool createIfNotExists, bool tryParents)	C#
 	mscorlib.dll!System.Resources.ResourceManager.GetObject(string name, System.Globalization.CultureInfo culture, bool wrapUnmanagedMemStream)	C#
 	Microsoft.VisualStudio.CommonIDE.dll!Microsoft.VisualStudio.CommonIDE.ResourceLoader.TryEachApplicableNamespace.__TryGetResource|15_0(string baseName, string resourceName, System.Globalization.CultureInfo cultureInfo) Line 300	C#
 	Microsoft.VisualStudio.CommonIDE.dll!Microsoft.VisualStudio.CommonIDE.ResourceLoader.TryEachApplicableNamespace(string resourceName, System.Globalization.CultureInfo cultureInfo) Line 275	C#
 	Microsoft.VisualStudio.CommonIDE.dll!Microsoft.VisualStudio.CommonIDE.ResourceLoader.FindResource<byte[]>(string resourceName, int lcid, System.Func<object, byte[]> fnConvert) Line 340	C#
>	Microsoft.VisualStudio.CommonIDE.dll!Microsoft.VisualStudio.CommonIDE.ResourceLoader.GetBlob(string resourceName, int lcid, out byte[] bytes, ref int count) Line 447	C#

The locals for that stack frame:

image

There are three references to Menus.ctmenu in the code:

This file doesn't exist in the repo, though perhaps it's created during build. Either way, I wouldn't expect this exception during VS launch.

Could not load file or assembly 'Microsoft.VisualStudio.Shell.Interop.15.6.DesignTime, Version=15.6.0.0'

I just watched the latest episode of Writing Visual Studio Extensions with Mads and saw that you had the same problem that I had recently with an extension failing to load because of this error:

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Shell.Interop.15.6.DesignTime, Version=15.6.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

I solved it by installing the Microsoft.VisualStudio.Shell.Interop.15.6.DesignTime NuGet package.

For some reason, the Microsoft.VisualStudio.SDK doesn't have a dependency on that particular package, but it does have dependencies on a bunch of other Microsoft.VisualStudio.Shell.Interop.15.x.DesignTime packages. ๐Ÿคทโ€โ™‚๏ธ

Microsoft.VisualStudio.Shell.Interop.15.1.DesignTime (>= 16.9.31023.347)
Microsoft.VisualStudio.Shell.Interop.15.5.DesignTime (>= 16.9.31023.347)
Microsoft.VisualStudio.Shell.Interop.15.7.DesignTime (>= 16.9.31023.347)
Microsoft.VisualStudio.Shell.Interop.15.8.DesignTime (>= 16.9.31023.347)
Microsoft.VisualStudio.Shell.Interop.16.0.DesignTime (>= 16.9.31024.71)
Microsoft.VisualStudio.Shell.Interop.16.1.DesignTime (>= 16.9.31024.71)
Microsoft.VisualStudio.Shell.Interop.16.2.DesignTime (>= 16.9.31024.71)
Microsoft.VisualStudio.Shell.Interop.16.3.DesignTime (>= 16.9.31024.71)
Microsoft.VisualStudio.Shell.Interop.16.4.DesignTime (>= 16.9.31024.71)
Microsoft.VisualStudio.Shell.Interop.16.5.DesignTime (>= 16.9.31024.71)
Microsoft.VisualStudio.Shell.Interop.16.6.DesignTime (>= 16.9.31024.71)
Microsoft.VisualStudio.Shell.Interop.16.7.DesignTime (>= 16.9.31024.71)
Microsoft.VisualStudio.Shell.Interop.16.9.DesignTime (>= 16.9.31024.71) 

Exporting Light Mode images in Dark Mode, etc.

Is your feature request related to a problem? Please describe.
This extension exports images for the background of the current theme, and that means to export Light Background images you must switch to a theme that uses Light Background then export the image you want.

This will be useful if you are developing an app that uses, let's say, WinForms that cannot support dark background without massive custom rendering or by using third party libraries.

Describe the solution you'd like
To be able to select the image variant for Dark or Light background when exporting.

Describe alternatives you've considered
Switching between Light and Dark themes to export the image for the background you want.

Additional context
I have not worked on Visual Studio API and I am not sure if this is possible.

VS2017 Crash when exporting image

Great tool Mads. For some reason the latest version crashes after succesfuly saving the picture. Don't have much to repro it, just export one of the monikers anywhere.

Luis

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.