新增「选中行文本」取值键;点击控件框必定同步控件属性

- ControlValueKeys 新增「选中行文本」:在列表容器上直接读当前选中行的文字
  (SelectionPattern 第一个选中项 → Value → Text → Name);没有选中行时明确报错
- 控件框点选回调:无论该节点是否在当前控件树里,都更新控件属性(SelectedObject +
  ShowNodeProperties + 下方 Path 横条),并在状态栏说明是否同时选中了树节点

实测(夹具列表,启动时选中第 2 行):列表行数=3、列数=2、选中项数=1、选中行文本=项目 2
回归 29/29 通过
This commit is contained in:
zimoyin
2026-10-13 19:28:07 +08:00
parent e5c896851a
commit 170790ff12
7 changed files with 909 additions and 36 deletions
+3 -1
View File
@@ -83,7 +83,8 @@ namespace PacsWinUia.RegressionTests
{
foreach (string key in new[]
{
ControlValueKeys.ListRowCount, ControlValueKeys.ListColumnCount, ControlValueKeys.ListSelectedCount
ControlValueKeys.ListRowCount, ControlValueKeys.ListColumnCount,
ControlValueKeys.ListSelectedCount, ControlValueKeys.SelectedRowText
})
{
Check.True(ControlValueKeys.For(ControlSourcePreference.Uia).Contains(key),
@@ -92,6 +93,7 @@ namespace PacsWinUia.RegressionTests
Check.Equal("列表行数", ControlValueKeys.ListRowCount, "Row count key name");
Check.Equal("列表选中项数", ControlValueKeys.ListSelectedCount, "Selected count key name");
Check.Equal("选中行文本", ControlValueKeys.SelectedRowText, "Selected row text key name");
}
private static void TextContentKeyOffered()