Skip to content

Property Binding not working on ParameterTemplateSelector item #2699

@JhonH3avy

Description

@JhonH3avy

Current behavior

When using ParameterTemplateSelector, the moment I define a DataTemplate with a custom UserControl, the binding of the view model with the custom control is not working due to what if seems a reflection error, from the PropertyBindingHelper and this make the DataTemplate useless because the setted value in the custom control is never to the view model.

Expected behavior

The view model should bind without problem with the property on the custom control and get the notification to set a new value when the custom control sets a new value.

How to reproduce it (as minimally and precisely as possible)

Here is a repo that shows the problem:
https://github.com/JhonH3avy/DatePickerControl

Environment

Nuget Package:
Uno.UI -> 2.1.0-dev.1345

Package Version(s):

Affected platform(s):

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • macOS
  • Windows
  • Build tasks
  • Solution Templates

Visual Studio:

  • 2017 (version: )
  • 2019 (version: )
  • for Mac (version: )

Relevant plugins:

  • Resharper (version: )

Anything else we need to know?

The ParameterTemplateSelector is inside a ContentDialog (not sure if this can lead to the previously mentioned behavior) and when teh ContentDialog shows it sets the view model for the ParameterTemplateSelector.

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficulty/medium 🤔Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUIkind/bugSomething isn't workingproject/binding 🪢Categorizes an issue or PR as relevant to the binding engine

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions