# waft-winui/src/controls
Audience: readers familiar with Flutter and Rust; the headings identify the corresponding WinUI code.
WinUI home: controls/dev/CommonStyles (templates), dxaml/xcp/dxaml/lib (`<Control>_Partial.cpp`), dxaml/xcp/core/core/elements
Ported against: aa3207e6
## mod.rs → shared control conventions
- Change: `Button`, `CheckBox`, `RadioButton`, `ToggleButton`, `HyperlinkButton`, `RepeatButton`, `ToggleSwitch`, `Slider`, and navigation and tab item click handlers do not request keyboard focus on pointer activation.
Reason: framework — Flutter controls separate pointer activation from focus acquisition, and Waft's native focus policy is used for this port.
Affect: These controls acquire focus and its highlight through keyboard traversal; a pointer click leaves any existing keyboard focus highlight in place.
- Change: `ToggleSwitch`, `Slider`, `Expander` and other controls with application-owned values report requested changes through callbacks.
Reason: framework — WinUI changes values on persistent control objects, while Waft follows Flutter by rebuilding widgets from application state.
Affect: A value-change callback that the caller ignores leaves the corresponding control unchanged.
- Change: A control takes the size its parent forces and, where the parent leaves room, its own size, instead of applying its style's `HorizontalAlignment` and `VerticalAlignment`; `TextBox`, `NumberBox`, `Slider`, `ColorPickerSlider`, `ProgressBar` and `TabView` take the whole of a bounded width (a vertical slider, of a bounded height), and `NavigationView` and `SplitView` the whole bounded space, as Flutter's text fields, sliders and scaffolds do.
Reason: framework — a XAML element aligns itself within the slot its panel gives it, while a Flutter parent decides a child's size through tight or loose constraints.
Affect: Under `Center` or in a start-aligned `Column`, a `CheckBox`, `Expander` or `InfoBar` is as wide as its content, and a stretched `Column` or a `Grid` cell makes it fill the width as WinUI's default `Stretch` does.
## button.rs → `ControlTemplate`
- Change: `Button` accepts a drawing function to customize its appearance while retaining its input behavior.
Reason: language — Rust callbacks receive the current button state and content in place of a XAML template resource.
Affect: A `Button` caller can supply `.template(...)` without replacing the button’s input behavior.
## text_control.rs → TextBoxBase
- Change: a multiline `TextBox` with no `max_lines` gives its editor `EditableText.expands`, so the editor fills the height its parent gives and scrolls once the text passes it.
Reason: framework — WinUI's `TextBox` stretches to its slot by default through `VerticalAlignment="Stretch"`, while Flutter's matching mechanism is `EditableText(expands: true)`; the port has no `Expands` property, as WinUI has none, and `AcceptsReturn` or `TextWrapping` chooses multiline.
Affect: a multiline box in a fixed-height pane has a full-height editing area, and its lines grow and scroll inside it; `max_lines` keeps the editor at its line height instead.
- Change: `TextBox` and `PasswordBox` use Flutter’s text editor, selection gestures, controllers and input formatters.
Reason: framework — WinUI delegates editing to Windows RichEdit, while Waft supplies Flutter's editor.
Affect: Text selection, keyboard shortcuts, IME composition, length enforcement and undo follow the native Flutter behavior.
- Change: `TextBox` and `PasswordBox` report text and selection changes after the edit has been applied.
Reason: framework — WinUI can let application code cancel a pending edit or selection change, while Flutter validates edits with input formatters before updating the controller.
Affect: Applications use input formatters to reject user edits and controller listeners to observe changes, rather than canceling a before-change event.
- Change: `TextControl` adjusts its clear and password-reveal buttons after the editor is measured.
Reason: framework — the button widgets are built before the editor’s size is known, so they need another build to apply size-dependent changes.
Affect: A clear or reveal button can settle its visibility or width on the frame following a size change.
## text_box.rs → TextBox
- Change: `TextBox` with `accepts_return` and `TextWrapping::NoWrap` scrolls its lines sideways in a horizontal scroll view around the editor, which scrolls vertically itself, where WinUI's text view scrolls both axes inside `ContentElement`'s `ScrollViewer`.
Reason: framework — Waft's editor follows Flutter's, which scrolls one axis and breaks multiline text at its width; the kit gives it its longest line's width with Flutter's `IntrinsicWidth`, at least the box's, inside a horizontal scroll view, which takes the second axis.
Affect: A sideways scroll of the wheel or the trackpad scrolls the box's lines as one view, and when an application shows a vertical scroll bar it sits on the lines and scrolls sideways with them.
- Change: `TextBoxState::get_rect_from_character_index` answers `None` for an index outside the text, where WinUI's `GetRectFromCharacterIndex` throws `E_INVALIDARG`, and also before the box is laid out.
Reason: language — Rust reports an argument a call cannot answer for by its result, not by an exception.
Affect: A caller reaches the box through a `GlobalKey` on it and matches on the result; the end of the text and every index of an empty box are `None`, as they are errors in WinUI.
- Change: `TextBox::horizontal_scroll_bar_visibility` takes `Disabled`, `Auto` and `Hidden`, not `Visible`.
Reason: framework — the kit's scroll bar shows while the pointer is over a view that overflows, which is WinUI's `Auto`, and has no bar kept on screen.
Affect: An application that wants WinUI's `Visible` uses `Auto`, whose bar shows on hover.
- Change: A multiline `TextBox` also takes `max_lines`, a limit on its height in lines that WinUI's `TextBox` does not have, and grows with its text from one line up to it; a height limit from its parent works as WinUI's `MaxHeight` does.
Reason: framework — Waft's editor takes a line limit, as Flutter's does, and the box passes it on beside WinUI's height limit.
Affect: Without `max_lines` a multiline box grows until its parent's height limit and then scrolls, as WinUI's does; with it, the box also stops growing after that many lines.
- Change: `TextBox` receives a TextEditingController owned by the application instead of storing editable text on the widget itself.
Reason: framework — Waft keeps mutable editing state in a persistent controller while rebuilding the surrounding widget descriptions.
Affect: Callers read or assign text and selection through the controller and dispose it after the editor unmounts.
## password_box.rs → PasswordBox
- Change: `PasswordBox` keeps its password in a native TextEditingController.
Reason: os — WinUI's additional CryptProtectMemory storage is a Windows facility outside the native Flutter editing engine.
Affect: The field conceals text visually and disables copying and cutting, but the controller contains an ordinary text value.
## text_edit_menu.rs → TextCommandBarFlyout desktop commands
- Change: `TextBox` and `PasswordBox` show editing commands in Flutter’s text-selection menu overlay.
Reason: framework — Flutter’s editor opens, places and closes the menu, whereas WinUI uses a separate popup window for the editing commands.
Affect: Editing menus stay inside the application window and follow Flutter’s placement and keyboard shortcuts, while preserving WinUI’s command order and rules for enabling commands.
- Change: `TextEditMenu` blurs content inside the application window and appears without an opening animation.
Reason: os — the Windows system backdrop and popup theme animation are not available through the native overlay host.
Affect: The menu samples the application scene instead of the desktop behind the window and appears immediately.
## grid/render_grid.rs → `Grid`
- Change: `Grid` gives each child its whole grid cell, with alignment expressed by child wrappers.
Reason: framework — WinUI combines alignment and sizing on each element, while Waft uses separate alignment wrappers and requires each render box to obey its parent’s size constraints.
Affect: `Grid` constrains a child larger than its cell to that cell rather than letting it overflow.
## grid/layout.rs → `Grid` row and column layout
- Change: `Grid` row and column sizes are not rounded to physical pixels.
Reason: framework — XAML rounds track sizes using the display scale, whereas Waft’s layout keeps fractional logical-pixel measurements.
Affect: `Grid` proportionally sized rows and columns can have edges between physical pixels.
## toggle_switch.rs → `ToggleSwitch`
- Change: `ToggleSwitch` moves its knob over 167 ms with fast-out-slow-in easing.
Reason: os — the template delegates knob movement to Windows through `RepositionThemeAnimation`, leaving the duration and acceleration outside the checkout.
Affect: `ToggleSwitch` slide duration and curve can differ from Windows.
- Change: `ToggleSwitch` waits for enough pointer movement to distinguish a drag from a tap before moving its knob.
Reason: framework — Flutter recognizers first decide whether the press is a tap or a drag, while WinUI’s draggable knob starts tracking on press.
Affect: `ToggleSwitch` keeps its knob still for the first 18 px of touch movement, and shorter movement remains a tap.
## radio_button.rs → `RadioButton`
- Change: `RadioButton` asks the caller to update the selected option instead of finding and unchecking other buttons in a named group.
Reason: framework — Waft’s controlled widgets receive their checked values from owner state, while WinUI can mutate other persistent RadioButton objects in the group.
Affect: A `RadioButton` caller checks the chosen button and unchecks the others.
- Change: `RadioButton` keeps its selected dot’s outline when the pointer moves over it.
Reason: framework — the port chooses one appearance for the current state rather than letting several WinUI animations overwrite the same color in sequence.
Affect: Hovering a selected radio button does not briefly change its one-pixel dot outline.
## repeat_button.rs → `RepeatButton`
- Change: `RepeatButton` uses the App clock with a 500 ms delay and 33 ms interval.
Reason: os — the port schedules exact deadlines on Waft’s application clock, whereas Windows rounds timer delivery to its system timer resolution.
Affect: A held `RepeatButton` can repeat somewhat faster than on Windows.
## hyperlink_button.rs → `HyperlinkButton`
- Change: `HyperlinkButton` does not open a URL automatically.
Reason: os — Windows opens the URL for the original control, but this host does not provide an equivalent URL-opening service.
Affect: A `HyperlinkButton` caller opens the link from the click handler.
## slider.rs → `Slider`
- Change: `Slider` sizes its filled portion as a fraction of the available width.
Reason: framework — the fill’s widget description is built before layout knows its width, so a proportional grid track expresses the size without waiting for another build.
Affect: `Slider`’s fill can end on a fractional pixel where Windows rounds it.
- Change: `Slider` shows its value label using the kit’s tooltip.
Reason: framework — Waft shows popups in an `Overlay`, where WinUI's ToolTip opens a popup of its own.
Affect: The slider needs an Overlay ancestor for its value label, whose placement and fade follow the tooltip behavior documented below.
- Change: `Slider` accepts a function returning text to format its value label.
Reason: language — a Rust formatting callback replaces the object that converts bound values to text in XAML.
Affect: `Slider` callers provide `thumb_tool_tip_value_converter` for custom text.
- Change: `Slider` vertical tooltip placement assumes a right-handed user.
Reason: os — this host does not expose Windows handedness settings.
Affect: `Slider` vertical tooltips prefer the left side of the thumb.
- Change: `Slider` accepts a `SliderTemplate`, a function that builds its template around the `SliderContainer` it is given, and a `key_down` function that sees each key before the slider does.
Reason: language — Rust callbacks receive the slider's states and template parts in place of a XAML `ControlTemplate`, and a function in place of a derived class's `OnKeyDown` override.
Affect: A control built on `Slider`, as `ColorPickerSlider` is, supplies `.template(...)` and `.key_down(...)` and keeps the slider's input and value behavior.
## split_view.rs → `SplitView`
- Change: `SplitView` dismisses an overlay pane when Waft recognizes a tap outside it.
Reason: framework — the pane lives in the application’s overlay, where tap recognition competes with other gestures instead of receiving pointer events from a separate XAML popup.
Affect: `SplitView` requires an Overlay ancestor, and outside dismissal waits for a recognized tap.
- Change: `SplitView` updates automatic pane width after the pane is measured.
Reason: framework — Waft cannot read the child’s measured width during widget build.
Affect: `SplitView` initial layout and content-width changes can take an extra frame to settle.
- Change: `SplitView` reports opening and closing requested by application code after the new layout is ready.
Reason: framework — Waft forbids updating ancestors or showing overlays during child build.
Affect: `SplitView` opening and explicit closing notifications arrive after layout, while tapping outside the pane still raises a cancelable event before closing.
## tool_tip/mod.rs → `ToolTip` and `ToolTipService`
- Change: `ToolTipService` draws help text in the application’s overlay rather than a separate popup window.
Reason: framework — Waft composes overlays and pointer listeners as widgets rather than attaching a popup service to any existing control.
Affect: `ToolTipService` callers wrap the owner beneath an Overlay, and the tooltip stays inside that window.
- Change: `ToolTipService` uses a 150 ms fade and fixed delays before showing a tooltip.
Reason: os — this host does not report Windows theme timing or user hover settings.
Affect: Hovering first shows a tooltip after 800 ms, or after 400 ms if one was recently shown, regardless of the user’s Windows hover settings.
## navigation_scroll_viewport.rs → NavigationView navigation scroll presentation
- Change: `NavigationScrollViewport` uses WinUI’s scrollbar appearance with Flutter’s scrollbar input handling.
Reason: framework — the port reuses Flutter’s existing behavior for dragging the scroll handle and clicking the track around it.
Affect: `NavigationScrollViewport` scrolls once by 80% of the viewport on a track press instead of repeatedly paging while the pointer is held down.
- Change: `NavigationScrollViewport` changes its scrollbar thickness instantly after the hover delay.
Reason: framework — Flutter’s scrollbar accepts a thickness value but does not animate that value itself.
Affect: The scroll handle jumps to its new width instead of widening or narrowing over 167 ms.
## tab_view.rs → `TabView`
- Change: `TabView` receives its tab list and selection from the application, with a unique identity for each tab that stays the same across rebuilds.
Reason: framework — Waft rebuilds item descriptions from owner state instead of mutating a collection on the control.
Affect: Callers apply close, reorder and transfer requests and update the selected index.
- Change: `TabView` builds its headers in a lazy ListView, and each tab keeps its key and focus node across rebuilds.
Reason: framework — Flutter’s lazy list creates widgets as they come into view instead of using WinUI’s system for creating item containers.
Affect: Offscreen selection first scrolls to an estimated position and then adjusts to measured headers.
- Change: `TabView` keeps inactive pages’ State alive, but those pages do not paint or receive animation ticks.
Reason: framework — removing a Flutter page would dispose its State, whereas WinUI can keep the page object alive separately from its displayed content.
Affect: Inactive pages can still be laid out; Offstage hides them and TickerMode mutes their animation ticks, while timers and other application updates still run.
- Change: `TabView` chooses a valid selected tab immediately when its tab list changes and reports that choice after the frame.
Reason: framework — a Flutter child cannot trigger an ancestor rebuild while the ancestor’s current build is updating that child.
Affect: The replacement `TabView` page appears in the current frame, while the owner’s selection callback runs after layout.
## tab_view/drag.rs → TabView tab dragging and reordering
- Change: `TabView` uses native drag recognition, an in-window preview and scrolling near the strip edges.
Reason: framework — Waft’s drag source and target communicate through the application overlay rather than Windows drag-and-drop services.
Affect: Drag thresholds and edge-scroll speed follow Waft, and transfers stay within one overlay.
- Change: `TabView` moves neighboring headers immediately after the 200 ms reorder delay.
Reason: os — Windows supplies the source reposition animation.
Affect: The insertion gap opens without the Windows motion animation.
- Change: `TabView` does not reserve space in a destination strip while a tab from another strip is hovering over it.
Reason: framework — Waft reports drag-target entry and movement but does not insert a temporary tab into the destination layout.
Affect: Cross-strip hover does not widen the strip or open an insertion gap.
## tab_view_item.rs → `TabViewItem`
- Change: `TabViewItem` includes its text and icon in the default drag preview but omits other custom header widgets.
Reason: framework — Waft cannot capture the displayed header as an image, so it builds a separate widget for the drag preview.
Affect: Applications supply a custom drag-preview builder for other header content, using keys and focus nodes separate from the original header.
- Change: `TabViewItem` uses Flutter gesture recognition and focus nodes, together with the kit’s tooltips.
Reason: framework — WinUI can direct all events from a captured pointer to a control, whereas Flutter decides which gesture recognizer handles the press.
Affect: A drag can cancel a tab click, and clicking a tab leaves keyboard focus unchanged, as described in the shared control conventions.
## navigation_indicator_transition.rs → NavigationView selection-indicator animations
- Change: `NavigationIndicatorTransition` starts moving the line marking selection after the newly selected navigation item is laid out.
Reason: framework — the animation needs the new item’s position and size, which are unavailable until Flutter layout finishes.
Affect: The line stays at the previously selected item for up to one extra frame before moving.
- Change: `NavigationIndicatorTransition` speeds up and slows down using an explicit ease-in-out curve when selection moves between a parent item and a nested child.
Reason: os — the source leaves that acceleration to Windows, so the port substitutes Waft’s cubic curve with control points (0.42, 0) and (0.58, 1).
Affect: `NavigationIndicatorTransition` can speed up and slow down differently from Windows when changing hierarchy levels.
## navigation_view.rs → `NavigationView`
- Change: `NavigationView` receives its items and selection from the application, with a unique identity for each item that stays the same across rebuilds.
Reason: framework — Waft rebuilds item descriptions from owner state instead of mutating a XAML item collection on the control.
Affect: Applications update `selected_item` in `selection_changed` and use `item_invoked` for activation, including activating an already selected item; item ids must remain unique and reserve `NavigationView::SETTINGS_ITEM_ID` for the built-in Settings item.
- Change: `NavigationView` uses Flutter gestures and focus handling, and reports pane changes after layout.
Reason: framework — WinUI routes input events through its control objects, while this port composes the gesture, focus and pane widgets described above.
Affect: Starting a scroll can cancel an item click, and application code receives pane-change callbacks after the frame.
- Change: `NavigationView` accepts any widget for its search field and item badges.
Reason: framework — Waft composes ordinary child widgets, while WinUI requires `AutoSuggestBox` for search and `InfoBadge` for badges.
Affect: Applications can use the kit's `InfoBadge` or a custom badge, and supply their own search editor until `AutoSuggestBox` is ported.
- Change: `NavigationView` decides which top-level items fit and which go into the overflow menu after measuring them.
Reason: framework — the widget tree is built before item widths are measured, so moving items between the main row and overflow requires a subsequent build.
Affect: After item text changes, moving items between the top row and its overflow menu can take an extra frame.
- Change: `NavigationView::is_title_bar_auto_padding_enabled`, on by default as in WinUI, pads for every system bar the ambient `MediaQuery` reports, not only the title bar. The pane and the content card still reach the edges of the navigation; the padding goes inside them. The toggle, back and close buttons and the pane's items move down by the top bar and right by the left bar. The open pane and the compact rail grow by the left bar. The pane's items stay above the bottom bar. The content's controls stay clear of the top, right and bottom bars, and of the left bar when no rail sits beside them. In Top mode the top row is padded at its top and sides and the content at its sides and bottom. The adaptive display mode is chosen from the width between the side bars. The content gets a `MediaQuery` with the padding removed.
Reason: os — WinUI's `UpdateTitleBarPadding` pads only the top of the pane (`TogglePaneTopPadding`, `ContentPaneTopPadding`) by the title bar's height, and only when the navigation sits at the window's top, because a Windows window has no bars on its other sides; a phone has a status bar, a gesture bar and, in landscape, side bars.
Affect: Under a page that extends into the bars, the navigation's backgrounds reach the screen's edges while its controls stay clear of the bars, with no colour band at either edge; with the switch off the navigation pads nothing, as in WinUI, and an application keeps it clear of the bars itself.
## navigation_view_item.rs → NavigationView item containers
- Change: `NavigationViewItem` keeps its key and stays mounted when hidden or moved between the side pane and top bar.
Reason: framework — Flutter State belongs to a mounted element, so keeping the element preserves custom item state across those moves.
Affect: `NavigationViewItem` preserves custom item state across presentation changes, and its collapsed children remain mounted but cannot paint or take focus.
- Change: `NavigationViewItem` uses a replacement font symbol for its arrow and rotates it over 250 ms.
Reason: os — Windows supplies the original animated arrow, while the replacement font contains only a static arrow.
Affect: Navigation arrows can differ from Windows in shape and in how they move while opening or closing a child list.
## progress_bar.rs → `ProgressBar`
- Change: `ProgressBar` jumps to the new filled length when its value changes and omits the fade when switching from moving segments to a known progress value.
Reason: os — the WinUI template asks Windows to perform those movement and fade effects through `RepositionThemeAnimation` and `FadeInThemeAnimation`, but their durations and acceleration are not defined in the checkout.
Affect: `ProgressBar` still animates moving segments and pause/error colors using the timings written in the template; only the Windows-supplied effects above are omitted.
## expander.rs → `Expander`
- Change: `Expander` asks the application to change whether its content is shown.
Reason: framework — like a controlled Flutter widget, it receives a boolean and a callback rather than changing the supplied boolean itself.
Affect: The application must handle the callback and rebuild with the new value before the section opens or closes.
- Change: `Expander` reports that its content is opening or closing through callbacks that run after layout.
Reason: framework — changing the supplied boolean rebuilds the widget, and a callback that updates application state cannot run safely during that build.
Affect: Application code receives the notification at the end of the frame rather than immediately when it changes the boolean.
- Change: `Expander` rotates its expand/collapse arrow over 250 ms.
Reason: os — Windows supplies the original animated icon, while the replacement font supplies only a static arrow that Waft rotates.
Affect: The arrow points in the correct direction, but its shape and movement differ from Windows.
- Change: `Expander` keeps hidden content’s State alive, but ticker-driven animations stop receiving ticks.
Reason: framework — removing a Flutter widget would dispose its State, so hiding it preserves the child state for the next expansion.
Affect: Child widget values survive closing and reopening, and TickerMode mutes their animation ticks while hidden; timers and other application updates still run.
## info_bar.rs → `InfoBar`
- Change: `InfoBar` asks the application to update whether it is open.
Reason: framework — like a controlled Flutter widget, it receives a boolean and a callback rather than changing the supplied boolean itself.
Affect: Handle `is_open_changed` by storing its requested boolean and rebuilding, including a request for `true` when the closing callback cancels a close started by application code.
- Change: `InfoBar` reports opening and closing requested by application code after layout.
Reason: framework — these events may update application state, so they wait until the current build has finished.
Affect: The opening notification arrives at the end of the frame, and a closing notification can then cancel the close before the banner is hidden.
- Change: `InfoBar` reports completion of a close-button request after the application rebuilds it as closed.
Reason: framework — the button can request a new value, but only the application can supply that value to the next build.
Affect: The click and cancelable closing callbacks run immediately; an accepted close reports completion only after the application rebuilds with the open value set to false, while a canceled close immediately reports that the banner is open again.
- Change: `InfoBar` keeps child State alive while closed, but ticker-driven animations stop receiving ticks.
Reason: framework — removing a Flutter widget would dispose its State, so hiding the banner preserves the child state for the next opening.
Affect: Child widget values survive closing and reopening, and TickerMode mutes their animation ticks while hidden; timers and other application updates still run.
- Change: `InfoBar` draws its status icons with the bundled replacement font over a colored circle.
Reason: os — the original matching foreground and background symbols belong to a font supplied with Windows.
Affect: The replacement icon shapes differ from Windows, while the warning uses an exclamation mark inside a circle that matches its circular background.
- Change: `InfoBar` accepts a widget-building callback to customize its close button.
Reason: language — a Rust callback receives the button’s current state and content in place of a XAML style declaration.
Affect: Applications can change the button’s appearance while keeping its existing click and close behavior.
- Change: `InfoBar` uses a callback rather than a command object for close-button actions.
Reason: framework — WinUI command objects also report whether an action is available, while the kit’s button callbacks only perform the action.
Affect: Applications capture action arguments in their callback, but the button does not automatically disable itself when that action becomes unavailable.
## progress_ring.rs → `ProgressRing`
- Change: `ProgressRing` supports the built-in loading and percentage animations, but does not accept a custom animation.
Reason: framework — WinUI plays replaceable animation objects through Windows Composition, while this port draws the two built-in animations directly with Waft's canvas and animation clock.
Affect: Applications can change the range, value, activity and colors, but cannot replace the animation through WinUI's `DeterminateSource` or `IndeterminateSource` properties.
## info_badge.rs → `InfoBadge`
- Change: `InfoBadgeStyle` selects the badge's background color but does not supply an icon or icon-specific padding.
Reason: os — WinUI's named icon styles depend on symbols from the Windows icon font, which this kit replaces with the bundled Fluent System Icons font.
Affect: Applications supply `icon_source` themselves and use 4 logical pixels of top padding, 2 at the bottom and none on either side when reproducing the attention or informational icon styles.
- Change: The badge's number is centred in its line without the 2 pixels the template lifts it by.
Reason: framework — the lift is tuned for XAML's text layout, and Flutter's text line, the font's ascent and descent, already centres the digits within half a pixel.
Affect: The number sits in the middle of the badge with Selawik or a system font, where the lift put it about 0.7 pixels high.
## flyout/mod.rs → `Flyout` and `FlyoutBase`
- Change: `Flyout` keeps its content mounted while hidden and displays it inside the application’s root Overlay.
Reason: framework — Flutter preserves child State through mounted widgets and draws overlays inside the existing window, while WinUI retains detached content and can create separate popup windows.
Affect: Reopening the same Flyout from another button preserves its child State, but the flyout cannot extend beyond the application window.
- Change: `Flyout` uses Flutter’s ModalBarrier to handle outside input in `FlyoutShowMode::Standard`, except when a `MenuBar` groups its headers with the popup.
Reason: framework — WinUI's host distinguishes pointer buttons during popup hit testing, while Flutter's native barrier blocks input behind it and recognizes a completed tap from any button.
Affect: Standalone flyouts dismiss on release rather than press, and consume an outside right-click rather than passing it to the control behind the flyout.
- Change: `Flyout` opens and closes without a visual transition.
Reason: os — WinUI obtains popup motion and timing from Windows rather than declaring them in the template.
Affect: The flyout’s visible container appears and disappears immediately.
- Change: `Flyout` accepts a widget builder to customize the visible container around its content.
Reason: language — Rust supplies widget construction through callbacks rather than runtime XAML template resources.
Affect: Applications provide `flyout_presenter_style` when replacing the default border, scrolling or content layout.
## flyout/shadow.rs → `Flyout`, `MenuFlyout`, `ContentDialog`, `NumberBox`, `ComboBox` and `AutoSuggestBox` popup shadows
- Change: `Flyout`, `MenuFlyout`, `ContentDialog`, the popup of `NumberBox`, the drop-down of `ComboBox` and the suggestion list of `AutoSuggestBox` paint their shadows using Waft's native BoxShadow blur with WinUI's default shadow colors, offsets and elevations: a flyout's rises with each nested submenu, a dialog's is the highest the recipe allows, the number box popup's is lower than a flyout's, and the combo box drop-down's and the suggestion list's match a flyout's.
Reason: os — Windows Composition performs WinUI's blur, and its blur-radius conversion is not specified, so the port interprets the radii from WinUI's `DropShadowRecipe.h` using Flutter's native conversion.
Affect: Popups have a soft shadow that becomes stronger in dark theme and at deeper submenu levels, but its softness can differ from Windows; the shadow is clipped at the application window's edges.
## content_dialog.rs → `ContentDialog`
- Change: `ContentDialog` centers itself in what the system's bars and the keyboard leave of the window, moving with the keyboard over 100 ms, as Flutter's `showDialog` (`useSafeArea`) and `Dialog` (`AnimatedPadding` by `MediaQuery.viewInsets`) keep a dialog; the content area shrinks first, so the command buttons stay in view.
Reason: framework — WinUI centers the dialog over the whole window and leaves a keyboard to the input pane handler, which scrolls the focused text box into view and which the kit does not port.
Affect: On a phone a dialog with a text box keeps its buttons above the keyboard, and never sits under the status bar.
- Change: `ContentDialog::show_async` pushes the dialog onto the root navigator as a dialog route whose modal barrier is the smoke layer, instead of opening one popup for the smoke layer and another for the dialog.
Reason: framework — Waft's navigator already has modal routes that block input to the page beneath and keep keyboard focus inside, while WinUI builds modality from two popups and its own focus cycling.
Affect: A dialog needs a `Navigator` above the context that shows it, as `WidgetsApp` provides, and returns keyboard focus to the page the way any popped route does.
- Change: `ContentDialog` always shows over its whole window: there is no `ContentDialogPlacement` choosing `InPlace` or `UnconstrainedPopup`.
Reason: framework — a XAML control is at once the object `ShowAsync` is called on and an element that can sit in a page, while an Waft widget is a description its parent rebuilds, so the persistent dialog object has no element of its own to place in a page; and Waft draws overlays only inside the window.
Affect: A dialog cannot be confined to part of a page or extend beyond the application window.
- Change: `ContentDialogButtonClickEventArgs` and `ContentDialogClosingEventArgs` reach their handlers as an `Rc`, with `cancel` and `set_cancel` in place of a `Cancel` property.
Reason: language — WinRT event arguments are shared objects a handler may keep after it returns, which in Rust is a reference-counted value whose fields change through `Cell`.
Affect: A handler that decides later clones the `Rc`, takes `get_deferral`, and calls `set_cancel` before it completes the deferral.
- Change: The future `ContentDialog::show_async` returns cannot be canceled, and dropping it leaves the dialog open.
Reason: language — `ShowAsync` returns an `IAsyncOperation` whose `Cancel` closes the dialog without Closing, while an Waft future has no cancellation and runs to completion.
Affect: An application closes a shown dialog with `hide`, which raises Closing, or with `dispose`.
- Change: `ContentDialog` keeps the theme and text direction of the context that showed it for as long as it is shown.
Reason: framework — the dialog's route lives in the root navigator's overlay, usually above the page's `ThemeScope`, so it inherits no theme and holds what the showing context had.
Affect: A theme change while a dialog is open reaches the dialog the next time it is shown.
- Change: `ContentDialog` has click handlers for its buttons but no `PrimaryButtonCommand`, `CommandParameter` or button style properties.
Reason: language — XAML binds an `ICommand` object with its parameter and a `Style` resource per button, while a Rust closure captures both and the kit's buttons choose between its default and accent styles.
Affect: Applications put a command's work in `primary_button_click` and its siblings, and the command buttons always look like the kit's default buttons, the default button accented.
- Change: `ContentDialog::dispose` releases the dialog object, closing a shown dialog first without its Closing and Closed events.
Reason: language — WinUI's dialog is released when nothing refers to it, while the kit's persistent objects, like `Flyout`, are released by their owner.
Affect: The owner of a dialog disposes it when the owner is disposed; a shown dialog then disappears and its `show_async` result is `None`.
## number_box.rs → `NumberBox`
- Change: `NumberBox` reports through `value_changed` only the values it asks for itself, from typing, keys, the wheel and its spin buttons, and shows its value as the application passes it back.
Reason: framework — WinUI's `Value` is a property of a persistent control, which the control sets itself and every change of which raises `ValueChanged`, while an Waft widget is rebuilt from the application's state.
Affect: An application stores `new_value` and rebuilds; a value it sets raises no `ValueChanged`, and a value it does not pass back is undone in the box at the box's next build.
- Change: `NumberBox` raises the `ValueChanged` of a change it makes to what the application passes, coercing a `value` out of range or reading a new `text` or `validation_mode`, at the end of the frame.
Reason: framework — these changes are found while the box is rebuilt, and Waft forbids a callback that updates the application's state during a build.
Affect: The application hears of such a change one frame late, and a new `text` shows as given for that frame before the box shows its value.
- Change: `NumberBox::text` is read as committed input whenever the application passes a new one, but the box does not report the text it shows.
Reason: framework — XAML can bind `Text` both ways, so the control's own updates reach the application, while an Waft widget only receives what the application passes.
Affect: An application that needs the shown text formats `value` itself, and passing the same `text` again is not read again.
- Change: `NumberBox::number_formatter` takes any `NumberFormatter` with `PartialEq`, a trait of `format_double` and `parse_double`, and formats the text again only when a formatter of another type or value is passed.
Reason: language — WinUI takes a Windows.Globalization object that must implement two interfaces, checked when it is set, while a Rust trait states both methods; and a widget is described again on every build, where XAML sets the property once, so the box compares formatters by value.
Affect: Applications implement `NumberFormatter` and `PartialEq` for their own formatting and can build the formatter inline; an equal one leaves text being typed alone.
- Change: `NumberBox` opens its compact spin buttons in the root Overlay of the application window.
Reason: framework — the template's `UpDownPopup` sets `ShouldConstrainToRootBounds` to false to open in a window of its own, while Waft draws popups only inside the application window.
Affect: Next to a window edge the popup is cut off by the edge instead of extending past it.
## number_box/formatter.rs → `DecimalFormatter` and NumberBox's display rounding
- Change: `DecimalFormatter` and `NumberBox`'s rounding stand in for the Windows `DecimalFormatter` and `SignificantDigitsNumberRounder` NumberBox creates: a value is rounded to 10 significant digits, a halfway value toward positive infinity, and written in its shortest decimal form with `.` and `-` and no grouping, and text is read as an optional `-`, digits and one `.`.
Reason: os — Windows.Globalization formats, rounds and parses numbers following the user's regional settings, which the repository does not contain and this host does not provide.
Affect: Numbers always follow the en-US conventions: text with grouping separators, exponents or another locale's decimal separator is not a number, and formatting can differ from Windows beyond those conventions.
## combo_box.rs → `ComboBox` and `ComboBoxItem`
- Change: `ComboBox` reports through `selection_changed` only the selections it asks for itself, from the pointer, keys, the wheel, typing and an editable box's text, and shows the selection the application passes back in `selected_index` and `custom_value`.
Reason: framework — WinUI's `SelectedIndex` and `SelectedItem` are properties of a persistent control, which the control sets itself and every change of which raises `SelectionChanged`, while an Waft widget is rebuilt from the application's state.
Affect: An application stores the selection the event asks for and rebuilds; a selection it sets raises no `SelectionChanged`, and one it does not pass back is undone in the box at the box's next build.
- Change: `ComboBoxSelectionChangedEventArgs` carries `removed_item` and `added_item`, each an `Option<ComboBoxSelectedItem>` holding an item's index and id or a custom value's text, in place of the `RemovedItems` and `AddedItems` lists of objects.
Reason: language — XAML's lists hold whatever objects the items are, while a box with one selection removes and adds at most one, which Rust states as an `Option` of an enum.
Affect: A handler reads `selected_index()` or `custom_value()` of the arguments, or matches `added_item`, instead of casting the first element of `AddedItems`.
- Change: `ComboBoxItem` is a unique `id`, a `content` widget, an optional `plain_text` and `is_enabled`, in place of the objects of `Items` or `ItemsSource` that the box shows through `ItemTemplate` or `DisplayMemberPath`.
Reason: language — the source turns an item object into the string it searches with `DisplayMemberPath` or the object's `ToString`, while a widget has no string form, so the text is given beside the content.
Affect: Type-ahead and an editable box find only items with `plain_text`, which `ComboBoxItem::text` sets; an item without it ends a search, as an item without a string does in WinUI.
- Change: `ComboBox` opens and closes its drop-down itself unless the application passes `is_drop_down_open`, in which case it asks through the callback and shows the state the application passes.
Reason: framework — WinUI's `IsDropDownOpen` is a property that both the control and the application set, while an Waft widget is rebuilt from the application's state.
Affect: An application that owns the drop-down stores the state it is asked for; a state it declines is undone at the box's next build without asking again, and a state it passes takes effect, with `DropDownOpened` or `DropDownClosed`, at the end of that frame.
- Change: `ComboBox` opens its drop-down in the root Overlay of the application window and places it within the window.
Reason: framework — the source sets the popup's `ShouldConstrainToRootBounds` to false, so that the drop-down opens in a window of its own placed within the monitor's work area, while Waft draws popups only inside the application window.
Affect: The drop-down never extends past the application window, so in a short window it shows fewer items and scrolls sooner than WinUI's.
- Change: `ComboBox` places its drop-down using the item heights laid out in earlier frames, and one line of text for items not laid out yet, and makes it as wide as the widest item laid out since it opened.
Reason: framework — the source measures any item's container on demand while it arranges the popup, while Waft lays a widget out only in the frame's layout pass, and the lazy list lays out the items in its view and a margin beyond it.
Affect: Items taller than one line can move the drop-down a frame after it opens, and an item laid out just beyond the drop-down's view widens it before it is scrolled into view.
- Change: `ComboBox` opens and closes its drop-down without the template's split animation, and raises `DropDownClosed` as soon as the drop-down closes.
Reason: os — the template's `SplitOpenThemeAnimation` and `SplitCloseThemeAnimation` take their motion and timing from Windows, and the source raises `DropDownClosed` when the close animation completes.
Affect: The drop-down appears and disappears at once, and `drop_down_closed` runs in the frame the drop-down closes.
- Change: `ComboBox` uses a static Fluent chevron for the template's animated `DropDownGlyph`.
Reason: os — the Windows animated-chevron asset has no matching animation in the bundled Fluent font.
Affect: The chevron changes color with the box's state but does not animate its shape.
- Change: A non-editable `ComboBox` takes the characters for type-ahead from the key presses that reach it.
Reason: framework — XAML raises `CharacterReceived` for every character the window receives, including those an input method commits, while Waft delivers an input method's text only to a focused text field and otherwise reports the character a key press produces.
Affect: Text composed with an input method, such as kana converted to kanji, does not select items in a non-editable box.
- Change: An editable `ComboBox` searches its items for submitted text as soon as `text_submitted` returns unhandled, before the application can pass an item it added in the handler.
Reason: framework — a WinUI handler can add the text to an observable `ItemsSource`, which the box sees at once and then selects, while an Waft widget sees new items only when the application rebuilds it.
Affect: An application that adds submitted text as an item without setting `handled` receives the text as a custom value in `selection_changed`, and selects the new item by passing its index in `selected_index`.
- Change: An editable `ComboBox` opens its drop-down directly below the box rather than below an input method's candidate window.
Reason: os — the source adds the height of the candidate window that Windows reports through the text box's `CandidateWindowBoundsChanged`, which this host does not report.
Affect: While text is being composed with an input method, its candidate window can cover the top of the drop-down.
- Change: `ComboBox` takes pointer input only within its own bounds, not in the 4-pixel focus border (`HighlightBackground`) that the template draws around the box.
Reason: framework — XAML hit-tests an element where it is drawn, even outside its parent's layout bounds and at zero opacity, while Waft tests a child only where its parent's bounds contain the point.
Affect: A press or hover up to 4 pixels outside the box's edges reaches what lies beneath instead of the box.
## combo_box/search.rs → ComboBox text search
- Change: `ComboBox` matches typed text to an item's text ignoring case, the width of full-width Latin letters, digits and punctuation, and the difference between hiragana and katakana, but not diacritics, as a substitute for the Windows comparison.
Reason: os — the source compares with `FindNLSStringEx` under the user's locale, with flags that also ignore diacritics and apply the locale's casing, which Windows implements and this host does not provide.
Affect: Typing `e` does not find an item that starts with `é`, and case follows Unicode's default rules rather than the user's language, as Turkish dotted and dotless i show.
## auto_suggest_box/mod.rs → `AutoSuggestBox`
- Change: `AutoSuggestBox` keeps its text in the application's controller and gives a change the `ProgrammaticChange` reason unless the text box reports it as the user's edit or the box makes it to show a chosen suggestion.
Reason: framework — WinUI sets `UserInput` by default and `ProgrammaticChange` from its own `Text` property, while here the application changes the text through the controller, which tells no one who changed it; the text box's own change callback, which only an edit calls, marks the user's.
Affect: Setting the controller's text raises `TextChanged` with `ProgrammaticChange`, as setting `Text` does in WinUI.
- Change: `AutoSuggestBox` takes `items_source` as a new list of suggestions, clearing the selection and opening or closing the list of a focused box, only when the items' texts differ from the last list's.
Reason: language — the suggestions are a plain list that the application passes again whenever it builds, without the collection-changed notification WinUI's `OnItemsChanged` answers.
Affect: Passing the same suggestions again keeps the selection, and a list whose items read the same but differ otherwise is not taken as new; `suggestion_chosen` and `query_submitted` still lend the latest items.
- Change: `AutoSuggestBox` opens or closes its list at the end of the frame when a new list of suggestions asks for it while the box takes its new widget, and an application's `is_suggestion_list_open` takes effect at the end of the frame it passes it.
Reason: framework — the box learns of both while it builds, when it can neither show the overlay nor run the application's code.
Affect: The list appears one frame after the suggestions that open it.
- Change: `AutoSuggestBox` decides which side the list opens on, how tall it may be and where it goes each time it lays the list out, from the box's bounds in the root overlay, where WinUI does it when the popup opens, when the items or the box's size change, and when the candidate window moves.
Reason: framework — the overlay child's layout is where the box's position is known; WinUI's popup asks for it from its events.
Affect: A box that moves while its list is open, as in a scrolled page, can have its list change sides, which clears the selection, as a new list does.
- Change: `AutoSuggestBox` measures the room above and below the box in the root overlay, the window, and its list is clipped at the window's edges.
Reason: os — WinUI's popup does not constrain itself to the window (`ShouldConstrainToRootBounds` is false), so on Windows it measures the room in the window's layout bounds but may draw past the window, while the overlay is the window.
Affect: A list that would reach past the window is cut at its edge, as it would in WinUI only near a screen's edge.
- Change: `AutoSuggestBox` squares the corners of the box and the list where they meet one frame after the list opens.
Reason: framework — `AutoSuggestBoxHelper` does it on the popup's `Opened`, from where the popup was put, which the box learns in the list's layout, when it cannot rebuild.
Affect: The first frame of an open list shows the box's lower corners round.
- Change: `AutoSuggestBox` shows `query_icon` at the icon's own size.
Reason: framework — the kit has no `SymbolIcon`, which WinUI sets to take `AutoSuggestBoxIconFontSize`, 12.
Affect: An application gives a `FontIcon` of size 12 for the size WinUI's `Find` symbol has.
## auto_suggest_box/suggestion_item.rs → `ListViewItem` in `SuggestionsList`
- Change: The suggestions are a lazy list of containers drawn as `ListViewItemPresenter` draws a `ListViewItem` in Single selection mode, with no focus of their own, rather than a `ListView`.
Reason: framework — the kit has no `ListView`; the box needs only its selection, its click and its item chrome, and moves the selection with the keys while the text box keeps the focus.
Affect: A click on a suggestion leaves the focus in the text box, and the selection indicator shrinks while pressed without its animation.
## drop_down_button.rs → `DropDownButton`
- Change: `DropDownButton` uses a static Fluent chevron for the source animated icon.
Reason: os — the Windows animated-chevron asset has no matching animation in the bundled Fluent font.
Affect: The chevron changes color on hover and press but does not animate its shape.
## toggle_split_button.rs → `ToggleSplitButton`
- Change: `ToggleSplitButton` receives its checked value from the application and reports the next value through a callback.
Reason: framework — Waft rebuilds widgets from application state, while WinUI changes the control's own checked property before raising its change event.
Affect: Applications store the requested value in `is_checked_changed` for the next rebuild, then `click` runs with that updated application state; assigning a checked value directly does not invoke the change callback.
## split_button.rs → `SplitButton` and `ToggleSplitButton`
- Change: `SplitButton` and `ToggleSplitButton` use an action callback instead of a command object.
Reason: framework — WinUI commands can report whether they are available, while the kit's callbacks only perform the action.
Affect: Applications capture action arguments in the callback and set `is_enabled` themselves when the action becomes unavailable.
- Change: `SplitButton` and `ToggleSplitButton` use a static Fluent chevron for the menu button.
Reason: os — the Windows animated-chevron asset is unavailable in the bundled icon font.
Affect: The arrow changes color with the button's state but does not animate its shape.
## menu_flyout/mod.rs → `MenuFlyout`
- Change: `MenuFlyout` receives toggle and radio-item checked values from the application.
Reason: framework — Waft builds menu descriptions from application state, while WinUI stores checked values on its item objects and coordinates radio items by group name.
Affect: Applications use the callbacks passed to `MenuFlyoutItem::toggle` and `MenuFlyoutItem::radio` to replace the menu's items with updated checked values and keep radio choices mutually exclusive.
## menu_bar.rs → `MenuBar` and `MenuBarItem`
- Change: `MenuBar` receives header descriptions with application-owned ids instead of live child controls.
Reason: framework — WinUI retains control objects in its collection, while Waft rebuilds widgets from data and uses keys to preserve their State.
Affect: Applications keep header ids unique and stable when changing titles, commands or display order; replacing an id creates a new header and menu.
- Change: `MenuBar` groups its headers and menus using Flutter's TapRegion mechanism.
Reason: framework — WinUI selects which elements receive input through its popup layer, while Flutter groups widgets and consumes gestures outside that group.
Affect: Outside taps dismiss the menu without activating ordinary tap callbacks behind it, but raw pointer listeners behind the menu can still observe those pointer events.
## command_bar/mod.rs → `CommandBar` and `AppBar`
- Change: `CommandBar` is drawn in the root overlay, above a light-dismiss layer covering the window, from the moment it starts opening until it has closed, while its place in the layout keeps its closed size.
Reason: framework — WinUI lifts the open bar above the page through a layout transition element, which Waft does not have; the overlay is where a widget paints above the content after it, and the bar's subtree moves there under a global key.
Affect: An open bar covers the content below it and is not clipped by its parent, as in WinUI, but it also comes above a flyout or tooltip that was showing before it opened.
- Change: `CommandBar` raises `Opening` and `Closing`, and moves the focus into the opening bar or back out of the closing one, at the end of the frame in which its owner's `is_open` changed.
Reason: framework — the bar learns of the change while it builds, when it can neither run the application's code nor move the focus, where WinUI does both from the `IsOpen` property change.
Affect: An `Opening` handler runs one frame after the change, with the open bar already laid out.
- Change: `CommandBar` raises `DynamicOverflowItemsChanging` at the end of the frame whose layout moved the commands, not before they move.
Reason: framework — WinUI raises it from inside measure, and a Waft render object cannot run the application's code during layout.
Affect: A handler runs after the frame showing the commands already moved, and a change it makes to the commands shows a frame later.
- Change: `CommandBar` keeps every primary command built in the bar and hides those it moved into the overflow, where it builds them again as overflow items.
Reason: framework — WinUI moves one element from the primary `ItemsControl` to the overflow's during measure, while a Waft element cannot change parents during layout.
Affect: A command's pointer-over and pressed state does not follow it into the overflow, and a focused command that moves loses the focus (see Deferred).
- Change: `CommandBar` takes a rebuild whose commands differ in kind, label or `DynamicOverflowOrder` from the last as a reset of both command collections, every primary command back in the bar before it measures again.
Reason: language — the commands are values without identity, so the bar cannot see an insertion or a removal as WinUI's observable collections report one.
Affect: Changing a command's icon or callback keeps the overflow as it is; adding, removing or relabelling one starts over and may raise `DynamicOverflowItemsChanging` again.
- Change: `CommandBar` opens upward when the menu would pass the overlay's bottom below the expanded bar, measuring the menu alone, where WinUI also counts the padding row it adds to its windowed popup, as tall as the bar.
Reason: os — WinUI's overflow menu is a separate window, padded so its animations have room, while the overlay needs no padding.
Affect: Near the window's bottom the bar keeps opening downward a little longer, by the difference between its open and closed heights: 16 pixels with labels at the bottom.
- Change: `CommandBar` lets a Shift+Tab that arrives on the open bar's last element from outside the bar stop there, where WinUI's `ProcessCandidateTabStopOverride` sends it on into the overflow menu.
Reason: framework — the bar sees only the keys of a focus inside it, and Waft's focus traversal has no hook for a container to replace the target of a move into it.
Affect: Shift+Tab into a sticky open bar reaches the bar's last element before the menu; Tab and Shift+Tab within the bar pass to and from the menu as in WinUI.
- Change: `AppBarButton` and `AppBarToggleButton` in the overflow menu show their accelerator text whenever an item of the menu has some, as on a machine with a keyboard.
Reason: os — WinUI asks Windows whether a keyboard is attached (`GetIsKeyboardPresent`).
Affect: The menu keeps its accelerator column on a tablet without a keyboard.
## flyout/placement.rs → `MenuFlyout` point placement
- Change: `MenuFlyout` starts pen-triggered menus at the requested point, aligning the left edge in left-to-right layouts and the right edge in right-to-left layouts.
Reason: os — WinUI adjusts pen menus using the Windows handedness preference, which Waft's host does not expose.
Affect: Pen-triggered menus adjust to fit the window but do not switch sides to avoid the user's hand.
## breadcrumb_bar.rs → `BreadcrumbBar` and `BreadcrumbBarItem`
- Change: `BreadcrumbBar` receives item descriptions with stable ids and widget content instead of a XAML item collection and data template.
Reason: framework — Waft rebuilds widgets from application data, while WinUI retains item objects and asks its element factory to create their controls.
Affect: Applications preserve item ids across collection changes; inline and overflow content have separate widget State, and `item_clicked` reports the item and its index in the current collection for inline clicks or the copied collection from when the overflow menu opened for dropdown clicks, without changing the path.
- Change: `BreadcrumbBarItem` recognizes dropdown clicks with Waft’s native tap recognizer.
Reason: framework — WinUI tracks a pointer id and invokes the dropdown item on release, while Waft resolves taps alongside competing drag and scroll gestures.
Affect: Dragging the overflow list can cancel a pending item click using the same native behavior as the kit’s buttons.
## color_spectrum.rs → `ColorSpectrum`
- Change: `ColorSpectrum` reports through `color_changed` only the colours the user picks, with the `HsvColor` it asks for, and shows the `hsv_color` the application passes back.
Reason: framework — WinUI's `Color` and `HsvColor` are properties of a persistent control, which the control sets itself and every change of which raises `ColorChanged`, while an Waft widget is rebuilt from the application's state.
Affect: An application stores `args.hsv_color` and rebuilds; an `hsv_color` it sets raises no `ColorChanged`, and one it does not pass back is undone at the spectrum's next build.
- Change: `ColorSpectrum` takes its colour only as `hsv_color`, whose `Color` is `HsvColor::to_color`, and an RGB colour becomes an `HsvColor` through `HsvColor::from_color`.
Reason: framework — WinUI keeps `Color` and `HsvColor` as two properties that set each other, while a widget the application rebuilds needs one value to compare with what it shows.
Affect: Where XAML sets `Color`, a caller writes `ColorSpectrum::new(HsvColor::from_color(color), …)`.
- Change: `HsvColor` names its components `hue`, `saturation`, `value` and `alpha` where XAML's `Vector4` has `X`, `Y`, `Z` and `W`.
Reason: language — a Rust struct gives the four numbers their meanings as field names instead of reusing a general vector type.
Affect: Code reading `HsvColor.X` reads `hsv_color.hue`.
- Change: `ColorSpectrum` computes its spectrum images on the UI thread, in the update that changes its size, `Shape`, `Components` or a component's range.
Reason: framework — WinUI computes the pixels on a thread-pool work item and hands them back through the dispatcher, which the kit's controls do not use; the largest spectrum ColorPicker shows, 336 square, takes 2 to 5 ms in an optimized build.
Affect: The spectrum appears in the frame after its size is known, without the empty frames WinUI can show while its work item runs, and that frame takes the time of the computation.
## color_picker_slider.rs → `ColorPickerSlider`
- Change: `ColorPickerSlider` is a widget of its own that builds a `Slider` with the template of `ColorPickerSliderStyle` and an `OnKeyDown` override, and it has the Slider properties that template shows.
Reason: language — the XAML control derives from `Slider` and inherits all of its properties, while a Rust widget composes another.
Affect: `ColorPickerSlider` has no tick, `SnapsTo`, `SmallChange` or thumb tooltip converter properties; an application needing them uses `Slider` with its own template.
- Change: `ColorPickerSlider` opens its tooltip of the value and the colour's name when it takes the focus from the keyboard, not when it is pressed.
Reason: framework — the source opens the tooltip from `OnGotFocus`, and the kit's `Slider` does not take the focus on a press (see the shared conventions).
Affect: Pressing or dragging the thumb does not open the tooltip; once the value has changed, it opens as other tooltips do when the pointer rests on the thumb.
## color_picker.rs → `ColorPicker`
- Change: `ColorPicker` reports through `color_changed` only the colours it asks for itself, from its spectrum, sliders and text boxes, and shows the `color` the application passes back.
Reason: framework — WinUI's `Color` is a property of a persistent control, which the control sets itself and every change of which raises `ColorChanged`, while an Waft widget is rebuilt from the application's state.
Affect: An application stores `new_color` and rebuilds; a colour it sets raises no `ColorChanged`, a colour it does not pass back is undone in the picker at its next build, and the hue and saturation of a grey or black are kept only while the application passes back the colours the picker asks for.
- Change: `ColorPicker` raises the `ColorChanged` of a change it makes to the colour the application passes, bringing it into a narrowed `MinHue` to `MaxValue` range, at the end of the frame.
Reason: framework — these changes are found while the picker is rebuilt, and Waft forbids a callback that updates the application's state during a build.
Affect: The application hears of such a change one frame late.
## tree_view.rs → `TreeView`, `TreeViewItem` and `TreeViewList`
- Change: `TreeView` receives its nodes, each node's `is_expanded` and the selected nodes from the application, and reports what it asks to change through `expanding`, `collapsed`, `selection_changed` and `move_requested`.
Reason: framework — WinUI's `TreeViewNode` objects and `SelectedNodes` belong to the control, which changes them itself, while an Waft widget is rebuilt from the application's state.
Affect: An application stores what each callback asks for and rebuilds; a change it does not store is undone at the tree's next build, and a change it makes itself raises no event.
- Change: `TreeView` reports the moves a drop or Shift+Alt with an arrow makes as `TreeViewNodeMove`s, each a node with its new parent and its index counted after the node leaves its parent, and reports a parent the moves leave without children through `collapsed`.
Reason: framework — WinUI's drop and keyboard reorder handlers remove and insert `TreeViewNode`s in the control's own collections, which an application owning its tree has to do itself.
Affect: An application applies the moves in order and stores the collapse; `DragItemsCompleted`'s `new_parent_item` is the parent the moves give the first item.
- Change: `TreeView` draws `selected_nodes` as the application passes them, without the rules `SelectedNodes` applies when a node is added to it.
Reason: framework — WinUI's `SelectedNodes` is a collection on the control whose `Append` also selects the node's descendants and completes its ancestors, while an Waft widget only reads what the application passes.
Affect: In Multiple mode, an application selecting a node itself also passes its descendants, and a parent whose children are all passed is drawn partly selected until it is passed too; the check boxes and Space apply WinUI's rules and report the full selection in `selected_nodes`.
- Change: In Single mode, `TreeView` draws every node of `selected_nodes` selected, not only the list's selection, which is the first.
Reason: framework — WinUI's Single-mode list holds one selected item of its own, while an Waft widget draws the selection its application passes, which an application such as a layers panel extends with clicks it reads itself.
Affect: An application can show several nodes selected in Single mode, deciding them from `item_invoked` and the keys held; clicks, the arrow keys and Ctrl+click still ask for one node, or none, through `selection_changed`.
- Change: `TreeView` has no `Expand`, `Collapse`, `SelectAll`, `SelectedItem`, `NodeFromContainer` or `ContainerFromNode`, and no content mode with `ItemsSource`, `ItemTemplate`, `ItemTemplateSelector`, `ItemContainerStyle` or `ItemContainerStyleSelector`.
Reason: language — the methods act on the control's own nodes and containers, and the content mode turns application objects into rows through XAML templates, while in Rust the application passes `TreeViewNode`s with the widget each row shows.
Affect: An application sets `is_expanded` and `selected_nodes` itself, chooses each node's `content` widget where it would choose a template, and cannot set a property, such as `AllowDrop`, on a single row.
- Change: `TreeView`'s event arguments name nodes by their `id`, `TreeViewSelectionChangedEventArgs` adds the new `selected_nodes`, and `TreeViewItemInvokedEventArgs` has no `Handled`.
Reason: language — WinUI passes the node objects, which a handler reads further from the control, while a Rust handler receives values; nothing in TreeView reads `Handled`.
Affect: Handlers look nodes up by id in the application's own tree.
- Change: `TreeView` builds its rows in a lazy `ListView`, and Left and Right move the focus to a parent or first child whose row is not built yet, scrolling to it.
Reason: framework — Flutter's lazy list creates rows only near the view, and estimates the place of rows not laid out yet, where WinUI's ItemsStackPanel keeps a cache of containers and `HandleExpandCollapse` only focuses a container it has.
Affect: Paging and scrolling to rows far from the view can land a few pixels off and correct themselves once the rows are laid out, and Left from a deep row reaches a parent above the cached range, where WinUI's key does nothing.
- Change: `TreeView` raises no `SelectionChanged` when a selected node the application passes while it is hidden becomes a row, and raises the one for a selected node the application's change hides at the end of the frame.
Reason: framework — WinUI's list selects the container it creates for a node the view model has selected and unselects one it removes, each with an event, while the tree draws the selection from `selected_nodes` and finds such changes while it is rebuilt, when Waft forbids a callback that updates the application's state.
Affect: Expanding the parent of a selected node raises no event, and the application hears of a selection its own collapse cleared one frame late.
- Change: `TreeViewItem`'s chevron uses the bundled Fluent chevrons for the template's `\uE76C` and `\uE70D` glyphs of `SymbolThemeFontFamily`.
Reason: os — the Segoe Fluent Icons font ships with Windows and is not bundled with the kit.
Affect: The chevrons can differ slightly in shape and weight from Windows'.
- Change: `TreeView` adds, removes and moves rows at once, and fades a dragged row out at once, without the template's `ContentThemeTransition`, `ReorderThemeTransition`, `EntranceThemeTransition` and `FadeOutThemeAnimation`.
Reason: os — these theme transitions and animations take their motion and timing from Windows.
Affect: Rows appear when a node expands, and the gap of a drag opens, without movement.
## tree_view/drag.rs → TreeView drag and drop
- Change: `TreeView` starts a drag with Waft's native drag recognition and shows the dragged row as a separate widget under the pointer, opaque and without the system's drop glyph or caption.
Reason: framework — Waft cannot capture the displayed row as an image for the system drag visual, and its drags stay in the window.
Affect: The drag starts after Waft's drag threshold, and the preview is the row in its pressed state, with the count of nodes for a drag of several, built from the node's `content` a second time, so content holding a `GlobalKey` cannot be dragged.
- Change: `TreeView`'s drags carry no `DataPackage` and reach only the tree they started in: `TreeViewDragItemsStartingEventArgs` has no `Data`, and drags from outside are not taken.
Reason: framework — Waft's drag and drop passes widgets' data within a window, with no transfer of formats to other controls or applications.
Affect: Nodes cannot be dragged to another tree, control or application, or dropped in from them.
- Change: `TreeView` goes over the pointer's place again when a gap opens, a hovered row expands, the list edge-scrolls and a drop happens.
Reason: framework — Windows keeps reporting a drag's position while the pointer is still, and Waft reports it only when the pointer moves.
Affect: What lies under a still pointer decides the drop as on Windows, though the row a still pointer points at shows only after one of these.
- Change: `TreeView` moves nothing for a drag when `can_drag_items` is false and `can_reorder_items` true.
Reason: framework — without `DragItemsStarting` TreeViewList knows no dragged node, and WinUI's ListView then reorders the flattened rows of its view model, which in Waft is no collection a list owns.
Affect: The rows open a gap while dragged and the drop leaves the tree as it was, where WinUI moves a row without changing the tree.
## selector_bar.rs → `SelectorBar` and `SelectorBarItem`
- Change: `SelectorBar`'s template holds the kit's `ItemsView` in a horizontal `StackLayout`, and each `SelectorBarItem` is an `ItemContainer` in the item style's template, so a click, the keys, the Tab stop and the single selection are `ItemsView`'s.
Reason: framework — the bar's selection stays the application's index, which the bar keeps in step with the view's selection both ways, as `UpdateItemsViewSelectionFromSelectedItem` and `UpdateSelectedItemFromItemsView` keep `SelectedItem` with the view's.
Affect: A click focuses the item when the press is released, as `ItemsView::ProcessInteraction` does, so Control with a click deselects the selected item only once the bar has the focus; a first Control click finds nothing selected when the focus arrives and `OnGotFocus` selects the item again.
- Change: `SelectorBar` receives its selection from the application as an index, and `selection_changed` asks the application to change it.
Reason: framework — Waft rebuilds a control's description from its owner's state instead of the control holding a `SelectedItem` property of its own.
Affect: Callers set `selected` from `selection_changed`, and selecting an item from code raises no event, where setting WinUI's `SelectedItem` raises `SelectionChanged`.
- Change: when the number of items changes, `SelectorBar` gives its `ItemsView` a new source with `ItemsViewSource::set_items` and selects its index again, with the clear that `set_items` notifies kept from asking the application to deselect.
Reason: framework — WinUI's bar keeps one `Items` collection whose changes reach the selection through `SelectionNode::OnSourceListChanged`, which shifts it in place, and Waft's source has no such path.
Affect: None an application sees: the same index stays selected.
- Change: `SelectorBarItem` takes a `child` in place of its text, as Flutter's `Tab` does, and gives its state's foreground to the child, the text and the icon through the inherited text style and icon theme.
Reason: framework — WinUI's `ItemContainer.Child` sits beside the template's icon and text and keeps its own foreground, so content such as a text with an `InfoBadge` would not follow the selected, pointer-over, pressed and disabled colours; Flutter's `TabBar` gives a tab's label its colour through `DefaultTextStyle.merge` and `IconTheme.merge`, which a child takes up without the application doing anything.
Affect: A child, given with `SelectorBarItem::with_child`, is drawn where the text would be, in the item's colours for its state; an item has a text or a child, not both.
## item_container.rs → `ItemContainer`
- Change: `ItemContainer` takes a press through Waft's tap recognizer, which shows the pressed state once a press has lasted `kPressTimeout` or at its release, gives the press up to a list that starts to scroll, and takes the primary button only.
Reason: framework — WinUI's container tracks the raw pointer and loses it to the scroll view's manipulation, while Waft's recognizers decide in the gesture arena whether a press is a tap or a drag, as the kit's buttons already do.
Affect: A quick click shows no pressed state, a right-button press neither presses nor selects the item, and dragging a list never selects the item the drag started on.
- Change: `ItemContainer` takes a second tap within `K_DOUBLE_TAP_TIMEOUT` and `K_DOUBLE_TAP_SLOP` of the first as a double tap.
Reason: os — Windows' gesture recognizer raises `DoubleTapped` with the system's double-click time and area, which Waft has no host setting for.
Affect: The double tap that invokes an item in a selection mode follows Flutter's 300 ms and 100 pixels rather than the user's Windows setting.
- Change: `ItemContainer`'s `can_user_select`, `can_user_invoke` and `multi_select_mode` are public enums whose `Auto` the view resolves where it reads them.
Reason: language — WinUI keeps them internal outside its prerelease builds and stores them as flags the view ors its own choice into.
Affect: An application can make one row unselectable or uninvokable, which the shipped WinUI does not let it do.
## items_view/mod.rs → `ItemsView`
- Change: `ItemsView` takes an item count and a builder that returns each item's `ItemContainer`, and lays a vertical `StackLayout` out as Waft's lazy `ListView` and a horizontal one as a row of every item.
Reason: framework — WinUI's `ItemsRepeater` makes containers from `ItemsSource` through `ItemTemplate` and virtualizes them with its layouts, while Waft's slivers build only the items in and near the view.
Affect: An application writes `ItemsView::new(source, |app, context, index| ItemContainer::new(row))`, a horizontal view builds all its items, and only `StackLayout` is available.
- Change: `ItemsView` takes its items from an `ItemsViewSource` the application makes with the number of items and passes in, and that object also keeps the selection and the current item, and reports selected items by index.
Reason: framework — WinUI exposes `Select`, `SelectAll`, `SelectedItems` and `CurrentItemIndex` as members of the control, while a Waft application reaches a control's state through a controller it holds, as with `ScrollController`.
Affect: An application calls `select_all`, `deselect_all`, `invert_selection` and `selected_indices` on the selection, and maps indices to its items itself.
- Change: `ItemsView` brings an item that is not built into view by an offset estimated from the extents of the items measured so far, and focuses it once the list builds it.
Reason: framework — Waft's `SliverList` cannot build an arbitrary item on demand as `ItemsRepeater::GetOrCreateElement` does, and laying out far from the built items builds every item in between.
Affect: End, Home, Page Down and Page Up reach any item, but on a long list End builds every item before the last unless the application gives the view an `item_extent`, which makes the jump exact and cheap.
- Change: `ItemsView` acts on each navigation key as it arrives, where WinUI queues the keys that arrive while a bring-into-view is settling and cancels opposite ones.
Reason: framework — the queue exists for `ScrollView`'s asynchronous bring-into-view, and the port's scrolling jumps within the frame.
Affect: Held Page Down keys each move a page from where the last one left the view.
- Change: `ItemsView` makes Tab stop at the current item, else the selected item in `Single` mode, else the first item built.
Reason: framework — WinUI realizes the current item when Tab enters the repeater, and the port cannot build an item the list has scrolled far away from.
Affect: When the current item has been scrolled out of the built range, Tab passes the list until an arrow key or a click makes another item current.
- Change: `ItemsView`'s `item_extent` gives every item of a vertical stack the same extent.
Reason: framework — it is Flutter's `ListView.itemExtent`, which lets the sliver place an item without building those before it, and WinUI's layouts have no counterpart.
Affect: An application whose rows share a height sets it, and the view lays every row out at that height.
## items_view/selection_model.rs → `SelectionModel`
- Change: `SelectionModel` holds one flat list's selection, without the tree of `IndexPath`s or the source collection, and its owner tells it of an insertion or removal (`on_items_added`, `on_items_removed`) where WinUI's `SelectionNode` hears the collection's change notifications.
Reason: framework — `ItemsView` asks only for a flat selection (`SelectAllFlat`), and Waft's list builder has no collection to observe.
Affect: A `TableView`'s selection moves with its rows as `TableViewSource` inserts and removes them; an `ItemsView`'s does not, as `ItemsViewSource` has no in-place changes, and a new count is a new `ItemsSource`: `ItemsViewSource::set_items` clears the selection as `SelectionModel::Source` does.
## sort_indicator.rs → `SortIndicator`
- Change: `SortIndicator` draws the bundled font's `ChevronUp` and `ChevronDown` for an ascending and a descending column.
Reason: os — WinUI's `ScrollChevronUpLegacy` and `ScrollChevronDownLegacy` glyphs (U+E96D and U+E96E) are characters of Segoe Fluent Icons, which ships with Windows.
Affect: A sorted header's chevron has the Fluent System Icons shape.
## resize_gripper.rs → `ResizeGripper`
- Change: `ResizeGripper` measures a drag by Waft's drag recognizer in global coordinates rather than by a manipulation in its `ManipulationContainer`.
Reason: framework — Waft has no manipulation events; global coordinates, like WinUI's container frame, do not move while the drag resizes the column.
Affect: A table under a scale transform resizes its column by the pointer's unscaled distance.
## table_view/mod.rs → `TableView`
TableView keeps WinUI's own structure, its rows on the kit's lazy list as `ItemsView` stands in for `ItemsRepeater`, its selection on the kit's `SelectionModel`, and every row and the header laying their cells out in a port of `TableViewCellsPanel`. This replaces the earlier plan 9(a), which would have composed the table from `ItemsView` and `Grid`.
- Change: `TableView` lays its rows out in Waft's lazy `ListView` inside a horizontal viewport as wide as the columns, and draws the vertical scroll bar at the table's own edge, where WinUI's `PART_BodyScroller` is one `ScrollViewer` that scrolls an `ItemsRepeater` both ways.
Reason: framework — Waft has no two-dimensional scroll viewer, and its slivers build only the rows in and near the view.
Affect: A pan scrolls the rows along one axis at a time, and the header band follows the body's horizontal offset.
- Change: `TableView` resolves an `Auto` column's width from the cells measured so far and resolves it again after the frame in which a measured cell's width changed, where WinUI resolves it again within the same layout pass.
Reason: framework — WinUI's cell panel calls `InvalidateMeasure` on the table from inside layout and the layout manager measures the table again in the same tick, while a Waft render object cannot dirty an ancestor's layout during layout.
Affect: An `Auto` column shows the default 120 pixels in the table's first frame, and widens one frame after a wider row scrolls into view.
- Change: `TableView` rounds an `Auto` column's width up to a whole device pixel rather than to the nearest.
Reason: framework — Waft measures text to fractions of a pixel, and a cell a fraction narrower than its text ellipsizes it, which XAML's whole-pixel text measure does not.
Affect: An `Auto` column is up to one pixel wider than XAML's rounding to the nearest pixel would make it.
- Change: `TableView` takes its columns as `TableViewColumn` objects the application makes, keeps and gives it, and `TableViewTextColumn` and `TableViewTemplateColumn` are `TableViewColumn::text` and `TableViewColumn::template`, which take a closure for the cell's text or content in place of a `Binding` or a `DataTemplate`.
Reason: language — Rust has no derived classes and no data binding; a column is an object the table writes to, as WinUI's `DependencyObject` is.
Affect: An application writes `TableViewColumn::text(app, "Name", |p: &Person| p.name.clone())`, sets its properties with `set_width` and the like, and reads `actual_width` and `sort_direction` from it.
- Change: `TableView`'s `Select`, `Deselect`, `IsSelected`, `DeselectAll`, `SelectedIndex` and `SelectedItem` are members of a `TableViewSelection` the application makes and gives the table, and a table given none selects nothing whatever its selection mode.
Reason: framework — a Waft application reaches a control's state through an object it holds, as `ItemsView`'s `ItemsViewSource` does, and a widget has no methods to call.
Affect: An application gives `.selection(..)` for selectable rows, calls `select` on the selection with a row of the view, and reads `selected_item` as an index into the source's items.
- Change: `TableViewSelection` subscribes to the items source itself and applies the `ViewChange`s it reads, so it follows its rows whether or not a table holds it; the table no longer forwards the source's changes to it.
Reason: framework — WinUI's `SelectionModel` holds its `Source` and hears its `CollectionChanged`, and here both the selection and the source are application-owned `ChangeNotifier`s while the table is a widget rebuilt on every mount.
Affect: rows inserted above the selected row while the table is unmounted move the selection down with its item, removing the selected row clears it, and a remount shows the same row.
- Change: a table adopting the same items source again keeps the selected row, and only a replaced source clears it.
Reason: framework — a Waft table is a new element on every mount (a tab switch rebuilds it), where WinUI's control keeps its `SelectionModel`; assigning the same source again is not WinUI's items-source replacement, and the selection already has the source's changes from its own listener.
Affect: a selected row survives a table rebuilt over the same source, and the widget above the table listening to the selection is not rebuilt while the new table binds it.
- Change: the clear a replaced source causes is reported to the selection's listeners after the frame the new table builds in, where WinUI raises `SelectionChanged` as the source is assigned.
Reason: framework — the table binds its selection during build, and marking an ancestor for rebuild then panics in Waft.
Affect: a listener above the table hears of the clear one frame later; the selected row is already cleared when the table lays out.
- Change: `TableView`'s `SortByColumn`, `ToggleSortDirection` and `ClearSort` are members of a `TableViewSort` the application gives the table to sort from code; header clicks sort without one, the direction living on the column.
Reason: framework — a widget has no methods an application can call.
Affect: A request to a `TableViewSort` no mounted table holds answers false.
- Change: `TableView`'s `SelectionChanged` reports the removed and added items by their indices in the source's items, a removed item by the index it had.
Reason: language — the items are values with no identity to pass as `Object`s.
Affect: A handler reads `removed_items` and `added_items` as `usize` indices for `TableViewSource::item`, and an index in `removed_items` of an item the source no longer holds names whatever moved into its place.
- Change: `TableView` builds its rows by their index in the view, so a row inserted or removed above the focused row leaves the focus at its position rather than with its item.
Reason: framework — WinUI's `ItemsRepeater` moves a realized element with its item (`ElementIndexChanged`), while Waft's list builder builds each index anew.
Affect: After a live insertion above it, the focus visual and the arrow keys' starting row are on the row now at the focused index; the selection follows its item.
- Change: `TableView`'s keyboard navigation brings a row that is not built into view at an offset estimated from the height of the nearest built row, and focuses it once built.
Reason: framework — Waft's `SliverList` cannot build an arbitrary row on demand as `ItemsRepeater::GetOrCreateElement` does.
Affect: End, Home, Page Down and Page Up reach every row; over rows of different heights a jump lands near the row and settles once it is built.
- Change: A text column sorts by its cells' text in Rust's string order.
Reason: os — WinUI compares strings with Windows' `CompareStringEx` in the user's locale.
Affect: Text sorts by code point, so "Zoe" sorts before "anna" and accented letters after the unaccented alphabet.
## table_view/source.rs → `TableViewSource`
- Change: `TableViewSource` holds the items it is given and takes the collection's changes as calls, `insert`, `remove` and `replace` for one item, `update` for an item's values and `set_items` for a reset, and names a row by its item's index, which it moves as items are inserted and removed.
Reason: language — WinUI's source observes an `IObservableVector` of objects that raise `PropertyChanged`, and follows each row by its object's identity, and Rust items are values with no identity to observe.
Affect: An application changes the items through the source: `update` changes an item's values and keeps its row selected, as `PropertyChanged` does, and `replace` puts a new item in its place and deselects its row.
- Change: `TableViewSource` places every inserted, removed, replaced or updated item at its exact row, among a filter's rows and within a sort's ties by source order, where WinUI's shaping rebuilds the whole view for a change under a filter without a sort, for an item that ties with a sorted row unless it is the last item, and for removing an item the filter left out.
Reason: deliberate improvement — each row of the view knows its item's source index, which WinUI's projection of objects does not carry, so the place source order gives can always be found.
Affect: The selection stays on its item through those changes, where WinUI's rebuild clears it.
- Change: `TableViewSource::update` moves an updated item's row to its new place when a sort key changed, and adds or removes the row when the filter's answer changed, where WinUI's shaping sorts and filters again only on a collection change and leaves a row whose sort key changed through `PropertyChanged` at its old place until the next one (`ShapedItemsSource::ApplyIncrementalChange`, and the limitation `TableView_Sort.cpp` notes).
Reason: deliberate improvement — an update is a call on the source, so the source knows which item changed and can place it, where WinUI's source hears no `PropertyChanged`.
Affect: A live table stays sorted and filtered as its values change, and a row that moves keeps its selection without a `SelectionChanged`.
- Change: `TableViewSource::sort` adds a sort axis on every call, where WinUI's `Sort` replaces the axis an earlier call declared with the same key selector.
Reason: language — a Rust closure has no identity by which a later call could name an earlier axis.
Affect: An application that sorts by the same key again calls `clear_sort` first, and `SortDirection::None` removes no axis.
- Change: `TableViewSource` does not catch a filter predicate or key that panics.
Reason: language — WinUI catches a throwing predicate and leaves the item out, and Rust has no exceptions to catch.
Affect: A predicate that panics panics the application.
## page.rs → `FluentPage`
- Change: `FluentPage` keeps its content clear of the system's bars by the ambient `MediaQuery`'s `padding`, and hands its content a `MediaQuery` with that padding removed, wherever the page sits.
Reason: framework — WinUI's `CalculateUpdatedBounds` applies the window's layout bounds only when the page is the window's size, while Waft, after Flutter's `SafeArea`, removes padding an ancestor has used from the `MediaQuery` it passes down.
Affect: A page nested in another page, or under a `SafeArea`, adds no inset, as in WinUI; a page smaller than the window still pads by what its `MediaQuery` reports, where WinUI's would add none.
- Change: `FluentPage` also shrinks its content by the keyboard's height, `MediaQuery::view_insets.bottom`, and removes that inset from the content's `MediaQuery`, as Flutter's `Scaffold` does with `resizeToAvoidBottomInset`.
Reason: framework — WinUI leaves the page's size alone and scrolls the focused text box into view from its input pane handler (`CInputPaneHandler`), which the kit does not port.
Affect: Content laid out to the page's bottom edge, such as a text box there, moves above the keyboard while the keyboard shows.
- Change: `FluentPage::extends_content_into_system_bars`, off by default, lets the content fill the page under the system's bars and leaves their padding in the content's `MediaQuery`; the keyboard is still kept clear. It takes the place of WinUI's `Window.ExtendsContentIntoTitleBar` and of `ApplicationView.DesiredBoundsMode`'s `UseCoreWindow`, and covers every system bar, not only the title bar.
Reason: framework — Waft has no window object or app-wide bounds mode for the switch to live on, and its system bars are the `MediaQuery`'s padding on every side, where WinUI's switch covers only the window's title bar.
Affect: An application sets the switch on its root page, as a WinUI application sets it on its window; the content, such as a `NavigationView`, then keeps its own controls clear of the bars from that padding.
## Deferred
- `MenuBar` activation by pressing Alt followed by a letter, and the temporary labels showing those letters, remain deferred. Trigger: The kit provides shared access-key mode and label display.
- `ProgressRing` starts its arc at twelve o'clock, but that starting point remains unverified against Windows. Trigger: A Windows capture establishes where the original ellipse starts drawing its arc.
- Repeat buttons always activate on press rather than release. Trigger: A consumer needs release-time activation in the shared button handler.
- Arrow keys do not yet move between radio buttons in a group. Trigger: The group provides a list of buttons that can receive focus.
- Keeping the slider’s header widget mounted while its header is absent remains deferred. Trigger: A consumer needs that hidden header state to survive.
- ToggleSwitch state-color fades remain deferred. Trigger: The duration for each supported state change is identified from the source or measured on Windows.
- ToggleSwitch tap bounds still include the header. Trigger: A source review of hit areas using native gestures is available.
- ToggleSwitch knob animation timing remains unverified. Trigger: A recording from Windows is available.
- Collapsed Grid children are omitted rather than retained at zero size. Trigger: A consumer needs retained collapsed children.
- RepeatButton timer-rate verification remains deferred. Trigger: A Windows click-rate measurement is available.
- HyperlinkButton does not expose NavigateUri. Trigger: A host URL launcher is available.
- Slider default-value verification for StepFrequency, TickFrequency and SnapsTo remains deferred. Trigger: The Windows type table or a runtime measurement is available.
- Slider gamepad operation, including switching between navigating controls and adjusting the slider’s value, remains deferred. Trigger: A host supplies gamepad or remote-control input.
- The slider’s larger value step for accessibility actions remains deferred. Trigger: Accessibility support uses that step.
- SplitView system-back handling, element sounds and Xbox focus/dimming behavior remain deferred. Trigger: A host exposes those facilities.
- Template and Slider-key right-to-left mirroring remain deferred. Trigger: A consumer needs right-to-left layout, prompting a source comparison of each affected template and keyboard direction.
- CheckBox indeterminate sweep animation remains deferred. Trigger: A recording from Windows is available.
- `RatingControl` remains deferred because the bundled icon font supplies outlined stars but no filled stars for selected ratings. Trigger: A matching filled-star glyph is bundled.
- Additional TextBlock styles remain deferred. Trigger: The next control port is selected.
- `ContentDialog` placement inside part of a page (`InPlace`) remains deferred. Trigger: An application needs a dialog confined to part of a page.
- `NumberBox`'s accessibility, the name it gives its text box from its header and range and the automation event of a value change, remains deferred. Trigger: The kit gains accessibility support.
- `ComboBox`'s touch presentation remains deferred: the larger item padding of `TouchInputMode`, the drop-down's touch minimum width, the scrolling layout a touch-opened long list uses, and an editable box opening its drop-down when a touch focuses it and selecting its text at the next tap. Trigger: The kit distinguishes touch input in its controls.
- `ComboBox`'s gamepad and remote-control input, its `GameControllerInputMode` item padding and the `LightDismissOverlayMode` overlay remain deferred. Trigger: A host supplies gamepad or remote-control input.
- `ComboBox`'s accessibility, its automation peer and the automation events of opening, closing and selection, remains deferred. Trigger: The kit gains accessibility support.
- `ComboBox`'s element sounds and its closing on system back remain deferred. Trigger: A host exposes those facilities.
- `ComboBox::text`, an editable box's text as a property apart from its selection, remains deferred. Trigger: An application needs to set or read an editable box's text before it is committed.
- Mica wallpaper backdrops remain deferred. Trigger: A host material path supplies the wallpaper processing absent from the source.
- Text controls’ spell-check suggestion menus, touch command-bar presentation, input-scope-specific soft keyboards and OS credential/autofill integration remain deferred. Trigger: The corresponding native services or additional control ports are available.
- TabView tear-out, caption regions, window movement and cross-window drag transport remain deferred. Trigger: A host provides window management and native drag transport.
- Tab gamepad navigation and interaction, high-contrast colors and accessibility support remain deferred. Trigger: The corresponding input, theme and accessibility support is available.
- TabView insertion, removal and reorder animations remain deferred. Trigger: Windows timing is verified or a host animation service is available.
- Navigation integration with title-bar space, window borders, system sounds and page-change animations remains deferred. Trigger: The host exposes the corresponding window or animation support.
- Navigation by gamepad shoulder buttons, directional focus movement, accessibility and high-contrast colors remain deferred. Trigger: The corresponding input, accessibility and theme support is available.
- Standalone ScrollViewer and ScrollBar APIs remain deferred. Trigger: A consumer needs those public controls beyond NavigationView’s internal adapters.
- `ColorSpectrum`, `ColorPickerSlider` and `ColorPicker` accessibility remains deferred: their automation peers, the names of their parts, and the value strings of the spectrum and the sliders. Trigger: The kit gains accessibility support.
- `ColorSpectrum`'s mirrored spectrum and the reversed Left and Right keys of `ColorSpectrum` and `ColorPickerSlider` in right-to-left layout remain deferred. Trigger: A consumer needs right-to-left layout.
- `ColorPicker`'s labels, tooltip texts and colour names in languages other than en-US remain deferred. Trigger: The kit gains localized resources.
- Whether WinUI shows the tooltip of a vertical `ColorPickerSlider`, whose `ToolTip` belongs to the collapsed horizontal thumb, remains unverified; the kit shows none. Trigger: A Windows capture of a `Horizontal` ColorPicker's slider taking the keyboard focus.
- `TreeView`'s touch input, dragging a row by pressing and holding it and the press feedback of a touch, remains deferred. Trigger: The kit distinguishes touch input in its controls.
- `TreeView`'s gamepad input, Gamepad A cycling a node of Multiple mode between expanding and selecting, and directional focus movement, remains deferred. Trigger: A host supplies gamepad or remote-control input.
- `TreeView`'s accessibility, its automation peers, the automation events of expanding, collapsing, selection and drops, and the drop-effect descriptions TreeViewList builds, remains deferred. Trigger: The kit gains accessibility support.
- Cancelling a `TreeView` drag with Escape remains deferred. Trigger: Waft's drag and drop can be cancelled by a key.
- `SelectorBar`'s accessibility, its automation peers and their selection pattern, remains deferred. Trigger: The kit gains accessibility support.
- `SelectorBarItem`'s tooltip for a truncated text, which the spec leaves open, remains deferred. Trigger: WinUI's control shows one.
- `FluentPage`'s `TopAppBar` and `BottomAppBar`, whose closed height WinUI also keeps the content clear of, remain deferred. Trigger: The kit ports `AppBar`.
- `FluentPage`'s navigation members, `Frame`, `NavigationCacheMode` and `OnNavigatedTo`, `OnNavigatedFrom` and `OnNavigatingFrom`, remain deferred. Trigger: The kit ports `Frame`.
- `FluentPage` giving the focus to its first focusable element when it loads with nothing focused, with the soft keyboard held back for that focus (`InitialFocusSIPSuspender`), remains deferred. Trigger: Waft's text input can be focused without showing the soft keyboard.
- `ItemsViewSource`'s in-place changes, which `SelectionModel::on_items_added` and `on_items_removed` would follow as `TableViewSource`'s do, remain deferred; `ItemsViewSource::set_items` replaces the items and clears the selection. Trigger: A caller that changes an `ItemsView`'s items in place.
- `ItemsView`'s other layouts, `LinedFlowLayout` and `UniformGridLayout`, its `ItemTransitionProvider` and its `VerticalScrollController` remain deferred. Trigger: An application needs a grid or flow of items, or animated insertion and removal.
- `ItemsView`'s and `ItemContainer`'s accessibility, their automation peers and selection patterns, remains deferred. Trigger: The kit gains accessibility support.
- `ItemsView`'s gamepad and XY focus navigation remains deferred. Trigger: A host supplies gamepad or remote-control input.
- `TableView`'s cell editing remains deferred: `IsReadOnly` and `IsEditing`, `CommitEdit` and `CancelEdit`, `BeginningEdit` and `CellEditEnding`, a column's `IsReadOnly` and `CellEditingTemplate`, and the text column's editor. Trigger: An application edits cells in a table.
- `TableView`'s grouping, `GroupHeaderTemplate` and `TableViewGroupHeader`, remains deferred. Trigger: An application groups a table's rows.
- `TableView`'s cell tooltips, `CellToolTipBinding`, remain deferred. Trigger: An application shows a cell's full text on hover.
- `TableView`'s accessibility, its automation peers and the announcements of a sort and a column's new width, remains deferred. Trigger: The kit gains accessibility support.
- `TableViewColumn`'s `HeaderTemplate` and `HeaderTemplateSelector` remain deferred; a header is its text. Trigger: An application needs a header other than text.
- `TableView`'s `IsEnabled`, with its rows' `Disabled` and `SelectedDisabled` states, remains deferred. Trigger: An application disables a table.
- `TableView`'s right-to-left layout, its columns from the right and its header's trailing edge on the left, remains deferred. Trigger: A consumer needs right-to-left layout.
- `AutoSuggestBox`'s `AutoMaximizeSuggestionArea` and its handling of the on-screen keyboard (`InputPane`'s showing and hiding, the scrolling of the page to keep the box and its list above the keyboard, and the `Landscape` and `Portrait` states) remain deferred; the property is kept and read by nothing. Trigger: A platform reports the area an on-screen keyboard covers.
- `AutoSuggestBox`'s `LightDismissOverlayMode`, its `TextBoxStyle`, `DisplayMemberPath`, `ItemTemplateSelector` and `ItemContainerStyle`, its `IsEnabled`, its `Text` property and its input validation remain deferred. Trigger: An application restyles the box, disables it, or validates its text.
- `AutoSuggestBox`'s gamepad and remote navigation, which moves the focus into the list, its alignment to the input method's candidate window, and its accessibility (the automation peer, the text box's `ControlledPeers` and the query button's name) remain deferred. Trigger: A host reports gamepad input or a candidate window, or the kit gains accessibility support.
- `CommandBar`'s focus following a command between the bar and the overflow menu (`StoreFocusedCommandBarElement` and `RestoreCommandBarElementFocus`) remains deferred. Trigger: An application that narrows or changes a bar while one of its commands has the focus.
- An `AppBarButton` with a `Flyout` in the overflow menu opens it beside the item on a click, as `OpenSubMenu` does, but the cascading menu's opening on hover, its delayed closing and its closing of the whole bar with a menu item (`CascadingMenuHelper`, `ISubMenuOwner`, `IMenu`) remain deferred. Trigger: An application with sub-menus in a bar's overflow.
- `CommandBar`'s and `AppBar`'s template settings (`CommandBarTemplateSettings`, `AppBarTemplateSettings`, `AppBarButtonTemplateSettings`), the overflow presenter's style (`CommandBarOverflowPresenterStyle`, which the bar takes from the theme resources), `AppBarElementContainer` and `Page.TopAppBar` and `BottomAppBar` remain deferred. Trigger: An application that restyles the bar or hosts other controls among its commands.
- `CommandBar`'s and its buttons' accessibility, the automation peers and the size and position in set of the `MoreButton` and the commands, remains deferred. Trigger: The kit gains accessibility support.
- `CommandBar`'s access keys and key tips, its element sounds, its closing on system back and its gamepad navigation remain deferred. Trigger: A host exposes those facilities, or the kit provides shared access-key mode.
- `CommandBar`'s `IsEnabled`, with its `Disabled` state's ellipsis foreground, and a command's `Visibility` remain deferred. Trigger: An application disables a bar or hides one of its commands.