In my WPF desktop application, I want to implement a toolbar with key actions (add, update, delete, etc.), something like what you can see in any mail service of the web interface.
For this, I have a large PNG image with all possible icons (normal, active, disabled, etc.)
So my question is how to show not the whole image, but only the area. For example, from a pixel of 50 to 100 pixels in the case where my icon is square and has a side of 50 pixels.
In other words, how would you suggest implementing in WPF the choice of a subsection of the image to display inside the toolbar button if all the icons are placed in one large PNG image?
Thank.
PS I came from web development, and there he regularly uses one large PNG image with all the icons, and when you want to place a specific icon, you have to determine which area you want to display.
source
share