Table of Contents

Class WindowFrameworkElement

Namespace
WindowSill.API
Assembly
WindowSill.API.dll

This class is used a workaround for this issue: https://github.com/microsoft/microsoft-ui-xaml/issues/4966 In WinUI, Window isn't a Control. This cause the source code generator to fail when trying to generate the code a x:Bind that use a Converter. It also causes ViewState to not work at all. We can use this class as a root element that is a UserControl and use it as the x:Bind source while exposing its associated window under the hood.

public class WindowFrameworkElement : UserControl, IEquatable<DependencyObject>, IAnimationObject, IVisualElement, IVisualElement2, IEquatable<UIElement>, IEquatable<FrameworkElement>, IEquatable<Control>, IWinRTObject, IUnmanagedVirtualMethodTableProvider, IDynamicInterfaceCastable, IEquatable<UserControl>
Inheritance
WindowFrameworkElement
Implements
IWinRTObject
Derived
Inherited Members
Extension Methods

Constructors

WindowFrameworkElement()

Initializes a new instance of the WindowFrameworkElement class.

public WindowFrameworkElement()

Properties

UnderlyingWindow

Gets the underlying WinUIEx.WindowEx instance associated with this framework element.

public WindowEx UnderlyingWindow { get; }

Property Value

WindowEx