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

Unable To Compile 'TextBox_themeresources.xaml' #7685

Closed
1 of 2 tasks
MajidAbuRmelah opened this issue Sep 4, 2022 · 5 comments
Closed
1 of 2 tasks

Unable To Compile 'TextBox_themeresources.xaml' #7685

MajidAbuRmelah opened this issue Sep 4, 2022 · 5 comments
Labels
area-XamlCompiler bug Something isn't working needs-triage Issue needs to be triaged by the area owners no-issue-activity product-winui3 WinUI 3 issues team-Markup Issue for the Markup team

Comments

@MajidAbuRmelah
Copy link

MajidAbuRmelah commented Sep 4, 2022

Describe the bug

When I copy and paste the content of the file /dev/CommonStyles/TextBox_themeresources.xaml into my resource dictionary file I get the following error:
Type 'ThemeResource' used after '{' must be a Markup Extension. Error code 0x03e9. 'My_Project_Name'

This error starts at the line 223 and continues to line 226 in that xaml file. This is the code that causes the issue:

<contract6Present:Setter Property="UseSystemFocusVisuals" Value="{ThemeResource IsApplicationFocusVisualKindReveal}" />
<contract7Present:Setter Property="ContextFlyout" Value="{StaticResource TextControlCommandBarContextFlyout}" />
<contract7Present:Setter Property="SelectionFlyout" Value="{StaticResource TextControlCommandBarSelectionFlyout}" />
<contract7Present:Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />

Steps to reproduce the bug

  1. Create a new resource dictionary file.
  2. Copy the code from /dev/CommonStyles/TextBox_themeresources.xaml.
  3. Replace the code in step 1 with the code in step 2.

Expected behavior

Be able to compile the app. The controls must look exactly as the control in the Win UI 3.

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.2 Experimental: 1.2.220727.1-experimental1

Windows app type

  • UWP
  • Win32

Device form factor

No response

Windows version

Windows 11 (22H2): Build 22621

Additional context

No response

@MajidAbuRmelah MajidAbuRmelah added the bug Something isn't working label Sep 4, 2022
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Sep 4, 2022
@bpulliam bpulliam added the product-winui3 WinUI 3 issues label Oct 12, 2022
@bpulliam bpulliam added team-Markup Issue for the Markup team area-XamlCompiler and removed needs-triage Issue needs to be triaged by the area owners labels Oct 29, 2022
@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 4, 2023
@dpaulino
Copy link
Contributor

I'm getting this as well. Anyone know why?

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Jan 26, 2024
@aquinn39
Copy link

aquinn39 commented Feb 8, 2025

Did anyone ever find a fix for this? I get this as well.

@ghost1372
Copy link
Contributor

Did anyone ever find a fix for this? I get this as well.

it seems that fixed in v1.7
#2556 (comment)

@aquinn39
Copy link

aquinn39 commented Feb 8, 2025

Hmm yeah looks like that's WinUI 3. Seems to still be broken in WinUI 2/UWP.

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 needs-triage Issue needs to be triaged by the area owners no-issue-activity product-winui3 WinUI 3 issues team-Markup Issue for the Markup team
Projects
None yet
Development

No branches or pull requests

5 participants