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

New TitleBar control with PathIconSource as IconSource breaks the app #9784

Open
Diegorro98 opened this issue Jul 3, 2024 · 3 comments
Open
Labels
area-TitleBar Issues related to custom window title bars. bug Something isn't working team-Controls Issue for the Controls team

Comments

@Diegorro98
Copy link

Diegorro98 commented Jul 3, 2024

Describe the bug

By using the new experimental control TitleBar, and using a PathIconSource as IconSource, the app breaks.
Other types of IconSource works, but PathIconSource doesn't.

Steps to reproduce the bug

<TitleBar
    Title="PathIconSource TitleBar">
    <TitleBar.IconSource>
        <PathIconSource
             Data="M10.5495 2.53189C11.3874 1.82531 12.6126 1.82531 13.4505 2.5319L20.2005 8.224C20.7074 8.65152 21 9.2809 21 9.94406L21 19.2539C21 20.2204 20.2165 21.0039 19.25 21.0039H15.75C14.7835 21.0039 14 20.2204 14 19.2539L14 14.2468C14 14.1088 13.8881 13.9968 13.75 13.9968H10.25C10.1119 13.9968 9.99999 14.1088 9.99999 14.2468L9.99999 19.2539C9.99999 20.2204 9.2165 21.0039 8.25 21.0039H4.75C3.7835 21.0039 3 20.2204 3 19.2539V9.94406C3 9.2809 3.29255 8.65152 3.79952 8.224L10.5495 2.53189ZM12.4835 3.6786C12.2042 3.44307 11.7958 3.44307 11.5165 3.6786L4.76651 9.37071C4.59752 9.51321 4.5 9.72301 4.5 9.94406L4.5 19.2539C4.5 19.392 4.61193 19.5039 4.75 19.5039H8.25C8.38807 19.5039 8.49999 19.392 8.49999 19.2539L8.49999 14.2468C8.49999 13.2803 9.2835 12.4968 10.25 12.4968H13.75C14.7165 12.4968 15.5 13.2803 15.5 14.2468L15.5 19.2539C15.5 19.392 15.6119 19.5039 15.75 19.5039H19.25C19.3881 19.5039 19.5 19.392 19.5 19.2539L19.5 9.94406C19.5 9.72301 19.4025 9.51321 19.2335 9.37071L12.4835 3.6786Z"/>
    </TitleBar.IconSource>
</TitleBar>

You can create an app and use the above code, or you can use the above code at WinUI 3 Gallery's Scratchpad but you will need:

  1. cloning
  2. checkout the branch feature/TitleBarExperiment
  3. update to the latest Windows App SDK experimental NuGet package version (because at the moment I'm writing this, the current NuGet version is 1.6.240531000-experimental1)
  4. build the app & run
  5. Go to Scratchpad and paste the above code

Expected behavior

The app should run without problems and should display the path described at PathIconSource Path property.

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.6 Experimental 2: 1.6.240701003-experimental2

Windows version

Windows Insider Build (22635.3858) & Windows 11 (23H2): Build 22631

Additional context

No response

@Diegorro98 Diegorro98 added the bug Something isn't working label Jul 3, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Jul 3, 2024
@codendone codendone added team-Controls Issue for the Controls team area-TitleBar Issues related to custom window title bars. and removed needs-triage Issue needs to be triaged by the area owners labels Jul 3, 2024
@Diegorro98
Copy link
Author

This issue is still present at 1.7.241114004-experimental1

Btw, I never posted the error logs, so here they are:

13:00:27:925	Microsoft.UI.Xaml.dll!00007FFB51664B9D: 80070057 - E_INVALIDARG
13:00:27:925	Exception thrown at 0x00007FFCC8D1FE3C (KernelBase.dll) at WinUIGallery.exe: WinRT originate error - 0x80070057 : 'The parameter is incorrect.'.
13:00:27:925	Exception thrown at 0x00007FFCC8D1FE3C at WinUIGallery.exe: Microsoft C++ exception: winrt::hresult_invalid_argument at memory location 0x0000008A50B7A150.
13:00:27:925	Exception thrown at 0x00007FFCC8D1FE3C at WinUIGallery.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.

@ghost1372
Copy link
Contributor

Because 1.7-exp1 is exactly the same version as 1.6-exp

@Diegorro98
Copy link
Author

The issue is still present at 1.7.250208002-preview1

(And I don't know if it is the same version as 1.6-exp too)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-TitleBar Issues related to custom window title bars. bug Something isn't working team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

3 participants