fix(border-color): keep ComboBox popup clicks inside LeftPanel (TASK 63)
This commit is contained in:
@@ -31,6 +31,17 @@ not *"is this control type themed?"*.
|
||||
matches `SelectedValue` ordinally (case-sensitively) and the palette mixes `#FFFFFF` and
|
||||
`#e94560`; the model matches by VALUE, so the hex the creator typed in any case still lands
|
||||
on the right row.
|
||||
- **Clicking a popup row stays inside `LeftPanel` (2026-10-22 fix):** a `ComboBox`'s open
|
||||
`PART_Popup` lives in its own `PopupRoot` visual tree (`VisualTreeHelper.GetParent(popupRoot)`
|
||||
is `null`), connected back to the `Popup` and `ComboBox` only via `PopupRoot`'s **logical**
|
||||
parent (`LogicalTreeHelper.GetParent(popupRoot)`). `LeftPanel.IsDescendantOf` previously used
|
||||
`child is Visual ? VisualTreeHelper.GetParent(child) : LogicalTreeHelper.GetParent(child)`,
|
||||
which returned `null` at `PopupRoot` because `PopupRoot` is a `Visual`. That caused
|
||||
`MainWindow.Window_PreviewMouseLeftButtonDown` to see `IsClickInside == false` on any click
|
||||
inside the open dropdown and clear `SelectedElement = null` — exiting the properties panel
|
||||
before the `ComboBoxItem` click could select the colour. `IsDescendantOf` now falls back to
|
||||
`LogicalTreeHelper.GetParent` and `TemplatedParent` whenever `VisualTreeHelper.GetParent`
|
||||
returns `null`.
|
||||
- **The closed box shows the swatch + the colour's NAME; the rows show swatch + hex + name**
|
||||
(the rows the creator approved in TASK 60). A ComboBox cannot do that with one
|
||||
`ItemTemplate` — WPF copies it into the read-only `SelectionBoxItemTemplate` — so
|
||||
|
||||
Reference in New Issue
Block a user