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

[Icon Extensions][Windows] Can't assign FontFamily on FontIcon extension #487

Closed
1 of 24 tasks
morning4coffe-dev opened this issue Aug 23, 2024 · 3 comments
Closed
1 of 24 tasks

Comments

@morning4coffe-dev
Copy link

morning4coffe-dev commented Aug 23, 2024

Describe the bug

When I specify the FontFamily on any FontIcon extension, I get an error that it Failed to assign to property 'CommunityToolkit.WinUI.FontIconExtension.FontFamily'. This is needed for the icon to render correctly on e.g. Android.
UnoCommunityToolkitExtBug.zip

Steps to reproduce

Specify the FontFamily on any FontIcon extension, as following:

HeaderIcon="{toolkit:FontIcon Glyph=, FontFamily={ThemeResource SymbolThemeFontFamily}}"

Expected behavior

Specifying the FontFamily should not throw an error on Windows as it does work well on other platforms.

Screenshots

No response

Code Platform

  • UWP
  • WinAppSDK / WinUI 3
  • Web Assembly (WASM)
  • Android
  • iOS
  • MacOS
  • Linux / GTK

Windows Build Number

  • Windows 10 1809 (Build 17763)
  • Windows 10 1903 (Build 18362)
  • Windows 10 1909 (Build 18363)
  • Windows 10 2004 (Build 19041)
  • Windows 10 20H2 (Build 19042)
  • Windows 10 21H1 (Build 19043)
  • Windows 10 21H2 (Build 19044)
  • Windows 10 22H2 (Build 19045)
  • Windows 11 21H2 (Build 22000)
  • Other (specify)

Other Windows Build number

No response

App minimum and target SDK version

  • Windows 10, version 1809 (Build 17763)
  • Windows 10, version 1903 (Build 18362)
  • Windows 10, version 1909 (Build 18363)
  • Windows 10, version 2004 (Build 19041)
  • Windows 10, version 2104 (Build 20348)
  • Windows 11, version 22H2 (Build 22000)
  • Other (specify)

Other SDK version

No response

Visual Studio Version

2022

Visual Studio Build Number

No response

Device form factor

No response

Additional context

No response

Help us help you

Yes, I'd like to be assigned to work on this item.

@MartinZikmund
Copy link
Contributor

I have hit this issue as well

@MartinZikmund
Copy link
Contributor

Please try using StaticResource and see if it helps

@morning4coffe-dev
Copy link
Author

@MartinZikmund You are right, this was the issue 🙃 the need for FontFamily on Uno targets should be resolved with unoplatform/uno#17591

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants