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

[C++/WinRT] Two way binding from String to IInspectable not compiling #4787

Open
JaiganeshKumaran opened this issue Apr 11, 2021 · 3 comments
Assignees
Labels
area-Binding area-XamlCompiler bug Something isn't working product-winui3 WinUI 3 issues team-Markup Issue for the Markup team

Comments

@JaiganeshKumaran
Copy link
Contributor

JaiganeshKumaran commented Apr 11, 2021

Describe the bug

Binding a string two way to a control where the property is actually an IInspectable and not an hstring doesn't seem to compile.

Steps to reproduce the bug

Steps to reproduce the behavior:

  1. Define a string in IDL and implement INotifyPropertyChanged
  2. Try binding it to a control's property where the type is an IInspectable and not a hstring
  3. See error

Expected behavior

Two way binding for string should work

Version Info
WinUI 3 - Project Reunion 0.5: 0.5.0

Windows app type:

UWP Win32
No Yes
Windows 10 version Saw the problem?
October 2020 Update (19042) Yes
Device form factor Saw the problem?
Desktop Yes

Additional context

The generated code seems to call winrt::to_hstring for bind back however winrt::to_hstring doesn't take an IInspectable. It should use unbox_value to get the boxed hstring value for the object.

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Apr 11, 2021
@StephenLPeters StephenLPeters added area-Binding team-Markup Issue for the Markup team product-winui3 WinUI 3 issues labels Apr 12, 2021
@StephenLPeters
Copy link
Contributor

@RealTommyKlein FYI

@evelynwu-msft evelynwu-msft added area-XamlCompiler bug Something isn't working labels Jul 31, 2021
@evelynwu-msft evelynwu-msft removed the needs-triage Issue needs to be triaged by the area owners label Jul 31, 2021
@JaiganeshKumaran
Copy link
Contributor Author

Can confirm that this issue also exists in WinUI 2 and Platform XAML.

@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2023
@bpulliam bpulliam reopened this Feb 29, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Feb 29, 2024
@bpulliam bpulliam removed needs-triage Issue needs to be triaged by the area owners no-issue-activity labels Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Binding area-XamlCompiler bug Something isn't working product-winui3 WinUI 3 issues team-Markup Issue for the Markup team
Projects
None yet
Development

No branches or pull requests

5 participants