Back to Blog
Ipack visual6/11/2023 ![]() ![]() Then multiply that for any different color. Other systems would have you create at least 3 different PNGs (normal, disabled, active) and 3 more for high definition displays. SVG icons can also scale without any loss of quality, being vector images, which works well especially with the newer high definition monitors. All these variations work: = + “?color=red” The recoloring supports any color, including our theme colors. This allows Wisej to change the color of monochromatic SVG icons on the fly, cache the new version, and update the web page really quickly by using the base64 representation of the SVG icon. Internally, on the browser, we preload the SVG icons and store them as XML objects. Wisej provides another unique feature, which is the recoloring of SVG icons. One more note to explain why we use SVG icons everywhere. For example, to override the icons deployed with, create a directory “” in the deployed location and add the replacement icons in there. You can also override fully qualified icon names by creating a directory with the same name as the assembly. This feature allows you to overwrite deployed icons and to swap an icon set using assemblies with different names.įor example, if on a particular server you want to override an icon, simply deploy the replacement icon as the root of the project. root = “resource.wx/”, Wisej will load the icon from anywhere it can find it giving the precedence to the deployed files. If you omit the name of the assembly from the root string, i.e. Now you can refer to the icons in this assembly throughout the application and if you need add a new icon, add it in one place only, if you need to change an icon you can do it in one place.Īnd in case you want to manage “themeable” icon sets, you can build an assembly with the same name but different icons. Create a new class Icons like this (assuming your project compiles to an assembly names “”:.Copy in Resources all the icons you want and set the Build Action to “Embedded Resource”.Remove all the references, they are not needed.Simply create a new project (Class Library) in the solution, name it something like “AppIcons”.Given the flexibility of this approach, it would be a good idea to create an icon pack specific for your application. Create an Icon Pack for Your Application: And you get all the benefits of IntelliSense as well when coding. Having this class in the library allows the application code to use the icons easily in code like this: = When you look into the projects we provide you will also find a class named “Icons” in the root namespace as the library. ![]() However, there is more to a Wisej Icon Pack than meets the eye. We provide these Icon Packs downloadable here. And most importantly, you have to deploy only 1 file containing all the icons. You can use the icons at design time and in code. ![]() It will be available for both Wisej 1.5 and Wisej 2.0 in the next updates.īut more about Icon Packs in Wisej… Icon Packs allow you to put as many icons as you like into a single assembly and use them from your Wisej application as if they were a regular image file. However, more than four thousand icons are too many for the image browser to preview at design time, so we have also improved the design time browser to render the icons in preview only when scrolled into the view area. You can find the project here and on GitHub. We have just shared a new icon pack extension with 4,670 icons all in SVG format from Visual Studio 2017.
0 Comments
Read More
Leave a Reply. |