the field that offers what it thinks you are typing, on a sheet of white in either theme
mounted as auto-complete-box
why it looks like this
A text box that offers what it thinks you are typing, from the Toolkit's AutoCompleteBox.
The library documented this control before it had it. KvadrantTypography.mediumLarge's KDoc names "a text box, a list picker and an autocomplete box" as the three controls Microsoft sized up from the page default — a sentence about a component that was not here, which is what B-43 was about.
The suggestion list is white in both themes, and that is transcribed rather than chosen. The template sets the ListBox inside its Popup to a literal Background="White" — not a theme brush, not PhoneBackgroundBrush — with BorderBrush="{StaticResource PhoneTextBoxEditBorderBrush}" around it. It is the same decision the focused field makes, where a dark theme's box goes solid white: what you are typing into is a sheet of paper whatever the page behind it is.
| Transcribed | Value | |---|---| | The list's fill | literal White | | Its border | PhoneTextBoxEditBorderBrush, the same the focused field takes | | Padding on the list | 0,8 | | Margin on a row | 8,7 | | The field's Padding | 6,0,6,4 — asymmetric, and deeper at the bottom than the top | | FilterMode | StartsWith, case-insensitive, from the property's own metadata | | MinimumPrefixLength | 1 — nothing is offered until a character is typed |
One deviation, and it is a layout one. The Toolkit puts the list in a Popup, so it floats over whatever follows the field. This draws it in the control's own layout, below the field, which pushes the rest of the form down instead. A Popup renders outside the layout it belongs to, where neither a screenshot of this component nor a page that wants to place it can reach it — and a component whose whole point is only visible in a window nothing here can photograph is a component nobody can check. A caller who wants the float back puts this in a Box above the rest.
suggestions | everything that could be offered; filter decides what is. The Toolkit's ItemsSource is the same list, and it did its own filtering for the same reason: the caller knows what a match means and a control does not. |
filter | defaults to the Toolkit's own StartsWith, ignoring case. It takes the typed text first and the candidate second. |
Read it: kvadrant-core/src/commonMain/kotlin/io/github/youndie/kvadrant/components/KvadrantAutoCompleteBox.kt · the full signature and every parameter