Embed image in code with Visual Studio - visual-studio

I remember reading once that there was a way to embed an image into a code file (e.g. a screenshot or diagram) in Visual Studio, but now I can't find any reference to that feature.
Is this possible to do, or am I imagining things?
EDIT: I don't mean embed the image in the executable, for use at runtime. I mean link or embed it literally in the code, for use by developers.

There is a plug-in for VS 2010 that can do this:
Plug-in

There is also a plugin for VS2012 and VS2013. At this moment installing for VS2013 does not seem to work for me though.
ImageComments extension on GitHub

You can embed images in your binary through the use of the ImageList control, which is typically used to store small icons for list controls, gridviews, etc., but could also be used for storing really any image for any purpose. A better solution would be to include a resource file and store your images there.

Related

What is the DarkImages folder in Visual Studio used for?

I am working on a project in Visual Studio. Every time when I created a button, an image will be generated automatically in the Images folder. And I noticed that this image will also be generated in the DarkImages folder:
The code only takes references to the Images folder. What is the usage of the DarkImages folder? Thanks for your answers!
Ok, asked my boss, he provided a clue.
The image in the DarkImages could be used when someone wants to switch to the dark mode. And that would be where they would look for the dark version of the images.

Accessing resources XML from another library project in Xamarin.Android

I am trying to create a Xamarin.Android Component to send to the Xamarin Component Store, and I need to bundle my Colors.xml with it, so it is accessible to everyone using my component. I am setting the build action for the Colors.xml tp "AndroidResource".
So I created an Android sample application, when I add a reference to my library project's dll, I am able to use the colors defined, my project compiles and it runs, but I get no intellisense on Xamarin Studio. So that would be a bad thing for anyone using my library, as they would not be able to even see that the colors are available to use. You can see in this picture the colors defined are not available in the suggestions box.
If I add the Colors.xml directly into my project, I get Intellisense support, like this:
Is there a way to achieve the same result above when adding just the dll reference? Did I do something wrong or Xamarin.Android/Xamarin Studio doesn't support this kind of scenario?
EDIT: To be clear, I know this is a problem with Intellisense not being able to pick up the values, but is there anything I can do to make it work?

How to locate style in Less file

I have noticed that web essentials for visual studio creates a .css.map file when compiling less. Does this mean it is possible to navigate from a selector in the css file back to the selector in the associated less file? If so how?
Yes, the idea of source maps is to map code or css from a compressed file back to the original uncompressed version.
Here is a good guide to using source maps in Chrome and Firefox.
An introduction to source maps
In VS 2013, if you enable LESS preview window, you can leverage Go To Definition command on a selector in preview to highlight the corresponding selector in LESS source. (via right-click context menu or press F12 in preview window -- see #809). When applicable, it will also load the #imported document, where the source is available.
On that note, there are precession issues with libsass' source-map. For that matter, it doesn't work well in SCSS editor.

Image Transparency not working

I am using Windows 8 RTM and Visual Studio Express 2012 for Windows Desktop. I am trying to write an application that uses UIRibbon in Visual C++. (Because I have the Express version only, I don't have access to MFC; please don't use it in your answer.)
The problem has to do with the icons I use in the ribbon. Because Windows 7 compatibility is a requirement for this project, I cannot use PNG images; I am stuck with old-school BMPs. The problem is that, while some of the BMPs are displaying correctly, most of the images have black bounding-boxes around them. I suspect the problem has to do with the BMP files, and is not in the ribbon XML file or in the code.
The BMP that displays correctly I downloaded off the Internet as part of a sample that I adapted. The BMPs that don't display correctly I extracted from an ICO file, then converted to a 32-bit image using the System.Drawing.Bitmap .NET API. (This conversion process is in done in a separate program as part of my build procedure, not at runtime.)
My question is: Does changing the bit depth of a BMP in this manner affect the colors in the image? And, if so, can anyone point out a free tool that can turn a PNG file into a 32-bit BMP file that works correctly in the Windows UIRibbon?
Do you speak of the Windows Ribbon Framework here? If so, you wouldn't be able to use PNGs anyway as the framework supports BMP only for Windows 7. With Windows 8 you can also use PNGs. See the regarding MSDN article for more information.
For a free tool which converts your PNGs into compatible BMP files, you should have a look at the visual designer that comes with the "Windows Ribbon Framework for Delphi".
You can simply load you XML markup into the editor and add your pictures. The editor will then convert the added files into BMPs if required. You can also use the editor to check if your Ribbon definition looks right. It produces valid "Windows Ribbon Framework" XML markup, so you can use the markup file in any other language such as C++, C# or Delphi for your further application development.

How to Integrate non supported fonts in WP7

I am creating a English to Mangolean Dictionary app; So i need to display mangolean word corresponding to my english word; i read from a blog that wp7 only supports limited language set. So how can i over come my issue. Please help me to solve this issue.
There's a tutorial on embedding fonts in Silverlight here: http://paulyanez.com/interactive/index.php/2009/12/embedding-fonts-in-silverlight/ The implementation for Windows Phone is exactly the same. The tutorial uses Expression Blend (which is part of the developer tools download and also free for Windows Phone), which is the simplest, quickest, and easiest way to embed fonts for Silverlight.
Apart from the supported Fonts you can add your on fonts to you project. For example create a folder named Fonts in you project and add you *.TTF files(Font Files). By referring this font files you can resolve your issues.

Resources