dotMorten / WinUIEx

WinUI Extensions
https://dotmorten.github.io/WinUIEx
MIT License
602 stars 38 forks source link

InvalidCastException in DynamicInterfaceCastableHelpers #34

Closed terrycox closed 2 years ago

terrycox commented 2 years ago

An exception is thrown if casting WindowEx to Window, as shown in the WinUIExSample app. image

image

Repro: WinUIExZIssue.zip

dotMorten commented 2 years ago

Ran the sample and it ran fine.

Do you see this issue with a blank project that you didn't change to WindowEx? If so, do you have the correct tooling installed to be able to run as a single-project packaged app? (try the two-project one with a separate packing project as that generally causes fewer problems).

dotMorten commented 2 years ago

One more thing, you say "An exception is thrown if casting WindowEx to Window", but I don't see a cast anywhere in your repro.

terrycox commented 2 years ago

Sorry, I tried it with and without the cast. No joy either way. If it's not in your code, then it's in our setup, and we'll try repackaging. Thanks for looking at it. BTW, your sample contains the cast to Window.