Skip to main content

Icons and Images in Wisej.NET

One runnable application per module, built cumulatively. IconDesk starts as an empty shell and ends as a capstone that puts every image mechanism Wisej.NET offers on one screen.

The modules​

ModuleWhat it builds
1 · Image Sources, Icons and the ImageListFour icon mechanisms and an IImage diagnostics readout
2 · Raster and Vector: the Two PipelinesImageLab - four size modes, LoadAsync, one SVG at four sizes
3 · The Designer Image Selector and Theme ImagesIconGallery - five image-source kinds, theme switch, ?color=
4 · Official Icon PacksTwo official icon packs compared, with cache evidence
5 · Embedded Resources and resource.wxEmbedded resources, resource.wx, and a deployment override
6 · Building Your Own Icon PackIconDesk.Icons - the project's own pack and its AppIcons catalog
7 · Icon Fonts and the CapstoneIcon fonts, grid actions, the capstone and the theme QA pass

Each folder is the complete application at that point in the course, with its own solution.

cd "Icons and Images Course/Module 1/IconDesk"
dotnet run -f net10.0 --urls http://localhost:6201

Every module builds for net10.0-windows and net10.0. Wisej-4 is pinned to 4.1.4 throughout, because the official icon packs used from Module 4 depend on it.

The findings worth knowing before you start​

These came out of running the code, and each one contradicts a reasonable first guess. _template/COOKBOOK.md has them with the evidence.

  • Image and ImageSource are mutually exclusive. Assigning one clears the other. A lost icon is nearly always a second assignment, not a missing file.
  • LoadAsync sets ImageSource, not Image. The browser fetches the URL; the server never downloads or decodes it.
  • Wisej.NET inlines SVG image sources and recolours the ones it reads as icons. One meaningful fill means "icon" and the theme repaints it - even for an absolute URL to a static file. Multi-coloured artwork is passed through untouched.
  • Strokes are never rewritten. A line icon must stroke with currentColor or ?color= does nothing to it.
  • A qualified resource.wx URL cannot be overridden from disk; an unqualified one can.
  • Icon fonts do not follow the theme at all. They are text, and the theme never sees them.