Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[XAML] Fix for exception thrown in WholeItemsPanel #8839

Merged
merged 2 commits into from
Feb 29, 2024

Conversation

paulcam206
Copy link
Member

Looks like a simple mistake in the conversion to cppwinrt (as vs. try_as). The converted version would throw instead of quietly skipping the check...

original

if (SUCCEEDED(spChild.As(&spWholeItemPanel)))
{
RETURN_IF_FAILED(spWholeItemPanel->IsTruncated(&isChildTruncated));
if (isChildTruncated)
{
// No need to continue the iteration
*childTruncated = true;
return S_OK;
}
}

converted

if (auto childAsWholeItemPanel = child.as<winrt::WholeItemsPanel>())
{
if (childAsWholeItemPanel.IsTruncated())
{
return true;
}
}

@paulcam206 paulcam206 enabled auto-merge (squash) February 28, 2024 22:56
@beervoley
Copy link
Contributor

#8841 - this will have to go in before this PR :)

@paulcam206 paulcam206 merged commit e36e499 into main Feb 29, 2024
8 checks passed
@paulcam206 paulcam206 deleted the paulcam/fix-wholeitemspanel-exception branch February 29, 2024 21:08
paulcam206 added a commit that referenced this pull request Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants