Using Command and ComboBox is not working in SettingsExpander.Items
还没有人认领这个 Issue。
评估
调研方向
从提供的 WinUI 3 XAML 复现开始,重点关注 SettingsExpander.Items、嵌套的 ComboBox、EventTriggerBehavior 和 InvokeCommandAction。使用嵌套的 SettingsCard 复现选择更改,然后追踪为什么不会调用 ViewModel.IconPackChangedCommand。当 command 在此布局中的执行方式与没有 SettingsExpander.Items 时一致时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
if we use MvvM Command in ComboBox and SettingsExpander.Items, The command is not executed.
Steps to reproduce
this is my xaml:
<wuc:SettingsExpander Description="Choose Icon Pack to display for the season number"
Header="Icon Pack"
IsExpanded="True">
<wuc:SettingsExpander.Items>
<wuc:SettingsCard Description="Choose Icon Pack to display for the season number"
Header="Icon Pack"
HeaderIcon="{wuc:BitmapIcon Source=Assets/Fluent/iconPack.png}">
<ComboBox Name="cmbIconPack">
<ComboBoxItem Content="Glyph" Tag="Glyph" />
<ComboBoxItem Content="Fluent" Tag="Fluent" />
<i:Interaction.Behaviors>
<ic:EventTriggerBehavior EventName="SelectionChanged">
<ic:EventTriggerBehavior.Actions>
<ic:InvokeCommandAction Command="{x:Bind ViewModel.IconPackChangedCommand}" CommandParameter="{Binding ElementName=cmbIconPack}" />
</ic:EventTriggerBehavior.Actions>
</ic:EventTriggerBehavior>
</i:Interaction.Behaviors>
</ComboBox>
</wuc:SettingsCard>
</wuc:SettingsExpander.Items>
</wuc:SettingsExpander>
if i dont use SettingsExpander.Items everything is working normal, but if i use SettingsExpander.Items command is not working
### Expected behavior
command should be working!
### Screenshots
_No response_
### Code Platform
- [ ] UWP
- [X] WinAppSDK / WinUI 3
- [ ] Web Assembly (WASM)
- [ ] Android
- [ ] iOS
- [ ] MacOS
- [ ] Linux / GTK
### Windows Build Number
- [ ] Windows 10 1809 (Build 17763)
- [ ] Windows 10 1903 (Build 18362)
- [ ] Windows 10 1909 (Build 18363)
- [ ] Windows 10 2004 (Build 19041)
- [ ] Windows 10 20H2 (Build 19042)
- [ ] Windows 10 21H1 (Build 19043)
- [X] Windows 11 21H2 (Build 22000)
- [ ] Other (specify)
### Other Windows Build number
_No response_
### App minimum and target SDK version
- [ ] Windows 10, version 1809 (Build 17763)
- [ ] Windows 10, version 1903 (Build 18362)
- [ ] Windows 10, version 1909 (Build 18363)
- [ ] Windows 10, version 2004 (Build 19041)
- [ ] Other (specify)
### Other SDK version
_No response_
### Visual Studio Version
2022
### Visual Studio Build Number
_No response_
### Device form factor
Desktop
### Additional context
_No response_
### Help us help you
No, I'm unable to contribute a solution.
- 主要语言
- C#
- 星标
- 484
- 派生
- 89
- 平均合并
- 2 天 18 小时
- 30 天内合并 PR
- 1
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CommunityToolkit/Labs-Windows 的其他 Issue
-
bug :bug:
难度 1/5 1-3 小时 新手友好度 80/100
CommunityToolkit/Labs-Windows#815 ·
-
bug :bug:
难度 4/5 3-5 天 新手友好度 38/100
CommunityToolkit/Labs-Windows#816 ·
-
bug :bug:
难度 3/5 1-2 天 新手友好度 55/100
CommunityToolkit/Labs-Windows#814 ·
-
experiment :test_tube:
难度 4/5 3-5 天 新手友好度 48/100
CommunityToolkit/Labs-Windows#812 ·
-
ux :paintbrush:
难度 3/5 1-2 天 新手友好度 52/100
CommunityToolkit/Labs-Windows#808 · 1 条评论 ·
查看 CommunityToolkit/Labs-Windows 的全部 Issue
相似的 Issue
-
Backend enhancement
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
UI: money shows the minus sign next to the number, not before the currency (IL -3.0m, not -IL 3.0m)未关闭area: sim area: unity enhancement
难度 2/5 1-3 小时 新手友好度 78/100
eyalgolan/statecraft-israel#1107 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
dimitar-radenkov/Pointframe#271 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
qew21/Genshin-Subtitles#45 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
HoffmanEngineering/3d-print-log-api#274 ·
维护者通常 1 天内回复