mirror of
https://github.com/microsoft/microsoft-ui-xaml.git
synced 2026-10-28 16:35:19 +08:00
TableView: unnamed visual cells are named by their column, not 'blank'
ReadDisplayName only checked for an unnamed visual (a ProgressBar, say) while a cell was being edited, because the display element exists only then. Check the cell's own content otherwise, so VerifyUnnamedVisualCellIsNotNamedBlank passes; cells showing only empty text still read 'blank'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b54b3a5d-2e82-43fa-9664-760e896cc4a3
This commit is contained in:
1 parent
32f8ff44af
commit
8504536eb7
1 file changed
+2
-1
@@ -418,7 +418,8 @@ winrt::hstring TableViewCellAutomationPeer::ReadDisplayName(winrt::TableView con
|
||||
if (valueText.empty())
|
||||
{
|
||||
// An unnamed visual (a ProgressBar, say) is not blank; name it by its column instead.
|
||||
if (display && !ShowsNoCellContent(display, 8))
|
||||
auto const content = display ? display : GetCellContentElement(Owner().try_as<winrt::FrameworkElement>());
|
||||
if (content && !ShowsNoCellContent(content, 8))
|
||||
{
|
||||
return GetColumnHeaderText(table);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user