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

Cannot use PathIconSource for TabViewItem.IconSource #2495

Closed
Hanzalah-Adalan opened this issue May 20, 2020 · 7 comments
Closed

Cannot use PathIconSource for TabViewItem.IconSource #2495

Hanzalah-Adalan opened this issue May 20, 2020 · 7 comments
Labels

Comments

@Hanzalah-Adalan
Copy link

When I use SymbolIconSource or FontIconSource for TabViewItem.IconSource, the application is happy.. but when I use PathIconSource for example:
<MUXC:TabViewItem Header="Bookmarks" IsClosable="False"> <MUXC:TabViewItem.IconSource> <MUXC:PathIconSource Data="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"/> </MUXC:TabViewItem.IconSource> </MUXC:TabViewItem>

then I got an exception: "The parameter is incorrect.\r\n\r\nThe parameter is incorrect.\r\n" System.Exception {System.ArgumentException}

Version Info

NuGet package version:
[Microsoft.UI.Xaml 2.4.2]

Windows 10 version Saw the problem?
Insider Build (xxxxx)
November 2019 Update (18363)
May 2019 Update (18362) Yes
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Mobile
Xbox
Surface Hub
IoT
@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label May 20, 2020
@StephenLPeters StephenLPeters added area-TabView team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels May 20, 2020
@StephenLPeters
Copy link
Contributor

To be sure, does this same PathIconSource work outside of a Tabview, like in a grid?

@StephenLPeters StephenLPeters added the needs-author-feedback Asked author to supply more information. label May 20, 2020
@Hanzalah-Adalan
Copy link
Author

yes it does work outside of a Tabview.. in my case it works fine in NavigationViewItem..

@msft-github-bot msft-github-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 May 21, 2020
@ranjeshj ranjeshj removed the needs-triage Issue needs to be triaged by the area owners label May 27, 2020
@marcelwgn
Copy link
Collaborator

I would like to look into this.

@marcelwgn
Copy link
Collaborator

I think I found the issue, the PathIcon(Source).Data property is causing us problems here as it can't be shared, see #827. A possible solution would be to set the icon sources data to null while the TabViewItem consumes it. This of course is not ideal though. Another option would be to copy the data, however I am not quite sure how we would do this.

@marcelwgn
Copy link
Collaborator

While not ideal, I think the "clearing" approach might be the best here given that it can not be shared anyway. If we are not choosing that approach, I would open a PR to at least catch PathIcons and skip them to not cause crashes.
@stmoy What are your thoughts on this?

@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
@mikernet
Copy link

mikernet commented Aug 13, 2023

Just ran into this. Is there a workaround I can use to get it working? This shouldn't be closed, it's still a problem.

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

No branches or pull requests

6 participants