Repository navigation
fix(ui): 修复下拉框中隐藏的占位项显示为空白行 [Claude-Opus-5.5] - #41
Merged
Chiloven945 merged 1 commit intoNov 15, 2026
Merged
Conversation
部分下拉框在 XAML 中用 IsVisible="False" 的选项占位,使选项序号与枚举值 对应(如启动器可见性中已废弃的 1 号选项、主页预设中已移除的 EchoCave)。 默认的 VirtualizingStackPanel 生成容器时会把 IsVisible 重新设为 true, 导致这些占位项仍然显示在下拉列表中。 MyComboBox 在未绑定 ItemsSource 且未指定 ItemsPanel 时改用 StackPanel, 使内联声明的隐藏项保持隐藏;绑定 ItemsSource 的下拉框(如字体列表) 仍使用虚拟化面板。 Closes PCL-Community#36
zhuzhi-09
force-pushed
the
fix/36-combobox-hidden-items
branch
from
November 15, 2026 19:29
a6cf1dc to
2a95ecc
Compare
Author
|
改动部分注释已移除 |
Chiloven945
approved these changes
Nov 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明 / Summary
部分下拉框在 XAML 中用
IsVisible="False"的选项占位,使选项序号与枚举值对应,例如“启动器可见性”中已废弃的 1 号选项(LauncherVisibility.ObsoleteCaseDoNotUse)、主页预设中已移除的 EchoCave。默认的
VirtualizingStackPanel生成容器时会把IsVisible重新设为true,导致占位项仍然显示,在“启动器可见性”中表现为一行空白。MyComboBox在未绑定ItemsSource且未指定ItemsPanel时改用StackPanel,使内联声明的隐藏项保持隐藏。绑定ItemsSource的下拉框(如字体列表FontSelector)仍使用虚拟化面板,不受影响。占位项本身保留,选项序号与枚举值的对应关系不变。关联 Issue / Related Issue
Closes #36
验证方式 / Verification
构建
dotnet publish PCL.Launcher/PCL.Launcher.csproj -c Debug -r win-x64 --no-self-contained -p:Platform=x64,编译通过运行测试(Windows 11 x64)
未覆盖
AI 使用情况 / Generative Artificial Intelligence Usage
PCL.Launcher/UI/Controls/Inputs/MyComboBox.cs提交前检查 / Checklist
此PR由claude编写,本人已阅读并确认。