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

Update way handling of DataTemplateSelector with null values #2185

Merged

Conversation

marcelwgn
Copy link
Collaborator

@marcelwgn marcelwgn commented Mar 29, 2020

Description

This updates the handling of DataTemplateSelectors as discussed in #2170:

  1. Call SelectTemplate(IInspectable item)
  2. If we received a non nullptr, use that, otherwise try SelectTemplate(IInspectable item, DependencyObject container)
  3. Check if that got us a valid pointer, if so use that
  4. If we still got a nullptr, throw some exception like "No valid template returned"

Edit: @jtorjo FYI

Motivation and Context

Fixes #2170

How Has This Been Tested?

Add 2 new API tests for the cases

Screenshots (if appropriate):

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Mar 29, 2020
@ranjeshj
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Co-Authored-By: ItzLevvie <[email protected]>
@marcelwgn
Copy link
Collaborator Author

I think the test failures are a problem already tracked by #2160 . Maybe try rerun pipeline?

@ranjeshj
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranjeshj
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranjeshj ranjeshj added area-ItemsRepeater team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Mar 30, 2020
Copy link
Contributor

@StephenLPeters StephenLPeters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@kmahone
Copy link
Member

kmahone commented Apr 1, 2020

@chingucoding, we were hitting some issues with test execution. Please merge the latest from master to pick up the fixes. This should resolve the test failures that were being hit.

@marcelwgn
Copy link
Collaborator Author

This branch is up to date with master.

@ranjeshj
Copy link
Contributor

ranjeshj commented Apr 1, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranjeshj
Copy link
Contributor

ranjeshj commented Apr 1, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kmahone
Copy link
Member

kmahone commented Apr 3, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranjeshj
Copy link
Contributor

ranjeshj commented Apr 3, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@StephenLPeters StephenLPeters merged commit 7d42841 into microsoft:master Apr 3, 2020
@marcelwgn marcelwgn deleted the itemsrepeater-datatemplate-refact branch May 15, 2020 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-ItemsRepeater team-Controls Issue for the Controls team
Projects
None yet
5 participants