Commit 4d08d73
committed
feat: a gallery that shows what the control can do, and four smaller gaps
Running Codejock''s property grid sample beside ours made the difference
obvious, and most of it was not the control. Their sample shows about thirty
kinds of item; ours showed eight, which reads as "this library supports less"
when in fact almost all of theirs are a DataTemplate over the row and always
were. So the gallery now shows them: a tick box with its own caption, a group
of radios, a slider with a spin box, a masked field, an address field, an
upper-cased field, a hyperlink, and a button inside an editor - none of which
needed anything added to the library.
Four things did. A colour now shows its channels beside the swatch, because
the swatch says roughly which colour it is and somebody matching two of them
needs exactly. A description can carry a glyph, and can name brushes for its
own text, its value and its row. And a row can take the whole width with no
name beside it, for a property whose editor is the point.
The per-row brushes are named rather than handed over as objects, so a
description stays a plain object - and setting them taught me something worth
recording next to the code: a brush read from Application.Resources is
whichever theme was current at the time, not the theme of the element it is
about to paint. Writing one back unconditionally painted dark-theme text on a
light window. Now nothing is written unless a description asked, and the value
underneath stays the {ThemeResource} from the template.
The diagnostics moved out to PropertyGridProbe, a separate repository that is
not published, the same way DockingProbe sits beside DockingPanels. It is
scaffolding rather than a sample and nobody cloning this wants it. The
screenshot mode stays: it produces the README image.1 parent 946c4e9 commit 4d08d73
14 files changed
Lines changed: 575 additions & 548 deletions
File tree
- assets
- samples/PropertyGridGallery
- src/Digi21.WinUI.PropertyGrid
- Metadata
- Primitives
- Themes
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | | - | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
66 | 73 | | |
67 | 74 | | |
68 | 75 | | |
| |||
Loading
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 21 | + | |
31 | 22 | | |
32 | 23 | | |
33 | 24 | | |
| |||
0 commit comments