You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Long story short, Window isn't a FrameworkElement and it breaks the WinUI Source Code Generator when we try to use a x:Bind with a Converter expression inside.
This issue took me 2 hours, mainly because I'm more used to WPF than WinUI and as someone said on the issue I linked above:
Yeah, I too keep getting tripped up that Window isn't a DependencyObject... it's a bit weird.
So here is a suggestion, if I may:
Make WindowEx inheriting from Page or UserControl and expose every Window properties/methods into it. So, for example, the Width property of this UserControl based WindowEx would not control the width of the UserControl, but the width of the underlying window, which can also be exposed as a property of WindowEx.
What do you think?
Thanks
The text was updated successfully, but these errors were encountered:
I can't really change the inheritance of Window. It needs to be a Window type, and WindowEx inherits from Window itself. This is on the Windows App SDK to fix.
Hi,
First, thank you for this cool library !
I just hurt myself with this WinUI issue: microsoft/microsoft-ui-xaml#4966
Long story short,
Window
isn't aFrameworkElement
and it breaks the WinUI Source Code Generator when we try to use ax:Bind
with aConverter
expression inside.A workaround is to do something like this:
and
MyUserControl
being:This issue took me 2 hours, mainly because I'm more used to WPF than WinUI and as someone said on the issue I linked above:
So here is a suggestion, if I may:
Make
WindowEx
inheriting fromPage
orUserControl
and expose everyWindow
properties/methods into it. So, for example, theWidth
property of thisUserControl
basedWindowEx
would not control the width of the UserControl, but the width of the underlying window, which can also be exposed as a property of WindowEx.What do you think?
Thanks
The text was updated successfully, but these errors were encountered: