Windowscommunitytoolkit: FindDescendantByName("...") suddenly returns null

Created on 1 Dec 2020  路  5Comments  路  Source: windows-toolkit/WindowsCommunityToolkit

Describe the bug

I used this function to get a control with specific name. It worked before. But today suddenly it only returns NULL?

  • [ ] Is this bug a regression in the toolkit? If so, what toolkit version did you last see it work:

I used the 6.0.0 before. When I found out it returned null, I upgraded it to 6.1.1. But still it returns null again.

Steps to Reproduce

  • [ ] Can this be reproduced in the Sample App? (Either in a sample as-is or with new XAML pasted in the editor.) If so, please

No. But I will try to provide it.

Expected behavior

It returns the control that it is supposed to find.

Screenshots

https://i.imgur.com/iq28iz5.png

Environment


```
NuGet Package(s):

Package Version(s):

Windows 10 Build Number:
May 2020 Update (19041)

App min and target version:

  • 1809

Device form factor:

  • Desktop

Visual Studio

  • 2019 (version: 16.6.0)
bug helpers need more info

All 5 comments

Hello jeansusgodney, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 馃檶

@jeansusgodney thanks for the report, we haven't heard of other cases like this, so I think we're going to need more details. These functions don't change much release to release.

What version were you using before 6.0.0 where you believe these worked? Have you tried the latest 7.0.0-preview4 release as well?

Can you clarify in your example where the item is in the tree? Is it part of the StackPanel within ListView?

It'd be easier for us to have an isolated repro project where we can see the same issue you're seeing, as without more context, we won't be able to reproduce the issue on our side, find any potential bug, and create a new test case to guard against the scenario.

This may also be related to updates we want and clarifications to behavior in #3487. @Sergio0694 was that something you're working on or would you be looking to get some assistance from others in the community on that issue?

@michael-hawker I'm not currently working on that yet, no. I was mostly waiting for confirmation from the team as well, as making those changes would be very much a breaking change for current consumers of the API. Also I was waiting for confirmation on the actual points listed in that issue (eg. what behavior we want to use as the standard one to converge all the APIs towards) 馃檪

Hi guys, there was just a problem with our database. Turned out some of the ComboBoxes don't have any SelectedItem.

@jeansusgodney glad to hear you resolved your issue, thanks for letting us know!

Was this page helpful?
0 / 5 - 0 ratings