Icon Fonts, HTML Content and Production Icon Strategy
The
capstone: the IconDesk shell, an Icon Summary page carrying one tile per mechanism the course
covered, and a Customer Actions page whose grid draws its actions as icon-font glyphs inside
an AllowHtml column - the sixth mechanism, and the only one that is not an image at all.
Modules 1 to 6 are carried forward unchanged; the application opens on the shell. This folder is the complete application at the end of the course, with its own solution and port.
Run it
cd "Icons and Images Course/Module 7/IconDesk"
dotnet run -f net10.0 --urls http://localhost:6207
Open http://localhost:6207.
The screen
IconDesk · Icon Summary: the application map down the left - the seven sections the course
built, in the order it built them - and the summary tiles on the right. Customer Actions and
Icon Summary are the two sections this module owns and the two the nav switches between; the
other five name where the rest of IconDesk lives.
What to try
| Action | Expected result |
|---|---|
| Read the five tiles | A theme image, an official pack icon, a custom pack icon, an embedded resource and a recoloured SVG. Each tile prints the source string it was given and carries a tooltip. |
| Press the Theme: … chip | The other theme loads and every tile gains a verdict. Four followed the theme and one did not - and the one that did not is the embedded logo, which is the opposite of the intuitive answer. |
| Open Customer Actions | A grid whose Actions column is AllowHtml, with two icon-font glyphs per cell. The glyphs are text: no Image, no ImageSource, nothing for an image property to report. |
| Click a glyph | The strip below names the role the element carried, the order, and what the application would do. Click the cell but not a glyph and it says the role was empty. |
| Switch to the dark theme and look at the glyphs | They read correctly, because icon-font.css no longer sets a colour on .idi - see docs/ThemeQA.md. |
Notes for anyone extending the capstone
- Icon-font glyphs are text. They are styled by a stylesheet the document loads and rendered
inside
AllowHtmlcontent. Nothing about them passes through the theme, so a colour set in CSS is a colour no theme can revisit. Do not setcoloron a glyph class; let it inherit. - Reference the stylesheet from
Default.html, not from C#: it has to be in the document before anyAllowHtmlcontent that uses its classes is rendered. AllowHtmlgoes on the column, not on the grid.DataGridViewCellEventArgscarriesRowIndex,ColumnIndex,X,Y,Locationand - the useful one -Role. Putrole="edit"on an element inside anAllowHtmlcell andCellClickreports it, which is how a click lands on an action rather than on a row.- The shell is a two-column
TableLayoutPanel.Dock = LeftbesideDock = Fillon a Page did not shrink the content panel here; a table says how the row is shared without either control guessing a width. - A
ButtonwithBorderStyle = Nonerenders as plain text but does not raiseClickin Wisej.NET 4.1.4. Every clickable control on this page is a Button with a border style the framework recognises, styled withCssStyle.
Where this sample differs from the lesson video
- The QA row marks the official pack icon and the custom pack icon unchanged after the
theme switch. On the running page they change, because both are monochrome SVGs with no fill of
their own - see
docs/ThemeQA.md. The sample reports what actually happened. - The video writes
status-warning.svg?color=error.erroris not a Wisej.NET theme colour name and resolves to nothing; the sample usesinvalid. - The five earlier nav entries are shown, as them, but are not links: a page with no way back is worse than a page with none.