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] Can't declare a string in Page.Resources with x:Name set #4437

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

Comments

@JaiganeshKumaran
Copy link
Contributor

Describe the bug
In C++/WinRT, you can't set a name for a string inside Page.Resources/UserControl.Resources/ContentDialog.Resource as the XAML compiler generates invalid code for the getter and setter. It uses winrt::System::String as the type for x:String in XAML markup instead winrt::hstring which is the right one.

Steps to reproduce the bug

Steps to reproduce the behavior:

  1. Define a string in Page.Resources with a name instead of UI
  2. Build the app
  3. See error

Expected behavior

XAML compiler will generate the correct getter and setter for string values.

Screenshots

Version Info

Package version: WinUI 2.6.0-prerelease.210217002
Visual Studio version: 16.9.0
Windows version: 20H2 Build 19042.804

NuGet package version:

Windows app type:

UWP Win32
Yes
Windows 10 version Saw the problem?
Insider Build (xxxxx)
October 2020 Update (19042) Yes
May 2020 Update (19041)
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Xbox
Surface Hub Yes
IoT
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Mar 7, 2021
@StephenLPeters StephenLPeters added area-XamlCompiler needs-winui-3 Indicates that feature can only be done in WinUI 3.0 or beyond. (needs winui 3) team-Markup Issue for the Markup team labels Mar 9, 2021
@StephenLPeters
Copy link
Contributor

@RealTommyKlein FYI @fabiant3

@evelynwu-msft evelynwu-msft added bug Something isn't working and removed needs-triage Issue needs to be triaged by the area owners labels Jul 21, 2021
@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 added product-winui3 WinUI 3 issues and removed needs-winui-3 Indicates that feature can only be done in WinUI 3.0 or beyond. (needs winui 3) needs-triage Issue needs to be triaged by the area owners no-issue-activity labels Feb 29, 2024
@JesseCol
Copy link

JesseCol commented Mar 1, 2024

Hi, does this repro in WinAppSDK / WinUI3? Thanks!

@JesseCol JesseCol added the needs-author-feedback Asked author to supply more information. label Mar 1, 2024
@JaiganeshKumaran
Copy link
Contributor Author

Hi, does this repro in WinAppSDK / WinUI3? Thanks!

Yes, it does.

@microsoft-github-policy-service microsoft-github-policy-service bot added needs-triage Issue needs to be triaged by the area owners and removed needs-author-feedback Asked author to supply more information. labels Mar 2, 2024
@codendone codendone removed the needs-triage Issue needs to be triaged by the area owners label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

7 participants