如何在紧凑的 SplitView 菜单项中正确显示焦点矩形

How to properly display a focus rectangle in a compact SplitView menu item

我正在构建我的第一个通用 Windows 平台 (UWP) 应用程序,并尝试使用 SplitView class.

实现流行的 "Hamburger Menu"

many samples, the items hosted on the SplitView pane are re-styled RadioButton 控件的启发,具有垂直高亮矩形、图标和文本。外观与 Groove 应用程序相似。

我现在正在尝试使用键盘实现导航和选择,现在这会在 SplitView 窗格中的项目周围带来一点焦点矩形。但是,由于窗格在其 DisplayModeCompactInlineCompactOverlay 时剪切其内容,焦点矩形也被剪切,这不是用户期望的行为。

请问,谁能告诉我如何在这种情况下属性显示焦点矩形?

只是一个想法,如果您将所有单选按钮的宽度设置为与 Split View 的 CompactPaneLength 属性 相同会怎样。默认为 48 个 DIP。