Skip to content

Support complex types in datatype #18379

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

Merged
merged 3 commits into from
Mar 8, 2025
Merged

Conversation

maxkatz6
Copy link
Member

@maxkatz6 maxkatz6 commented Mar 6, 2025

What does the pull request do?

In 11.1 and 11.2 we greatly improved XAML type resolver scenarios, including nested types, generics and more.
Unfortunately, there are still some use cases containing bugs, like this one:

x:DataType="{x:Type vm:MainWindowViewModel+TestItem, x:TypeArguments=x:String}"

In this example, x:Type works as expected, and correct generic type is resolved. Unfortunately, DataType itself for some reason wasn't expecting any complex markup extension, and thus failing this case.

Checklist

This comment #391 (comment)

@maxkatz6 maxkatz6 added bug area-xaml backport-candidate-11.2.x Consider this PR for backporting to 11.2 branch labels Mar 6, 2025
@maxkatz6 maxkatz6 marked this pull request as ready for review March 6, 2025 01:06
Copy link
Member

@MrJul MrJul left a comment

Choose a reason for hiding this comment

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

LGTM!

@MrJul MrJul added this pull request to the merge queue Mar 8, 2025
Merged via the queue into master with commit 8232988 Mar 8, 2025
11 checks passed
@MrJul MrJul deleted the support-complex-types-in-datatype branch March 8, 2025 17:18
MrJul pushed a commit that referenced this pull request Mar 29, 2025
* Fix XamlTypeExtensionNode not being handled on the x:DataType transformer

* Add testt with complex DataType

* Make vm:MainWindowViewModel+TestItem nested type generic on BindingDemo
@MrJul MrJul added backported-11.2.x and removed backport-candidate-11.2.x Consider this PR for backporting to 11.2 branch labels Mar 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants