SolidShineUi.Wpf.Windows11Interop 2.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package SolidShineUi.Wpf.Windows11Interop --version 2.0.0
                    
NuGet\Install-Package SolidShineUi.Wpf.Windows11Interop -Version 2.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SolidShineUi.Wpf.Windows11Interop" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SolidShineUi.Wpf.Windows11Interop" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="SolidShineUi.Wpf.Windows11Interop" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SolidShineUi.Wpf.Windows11Interop --version 2.0.0
                    
#r "nuget: SolidShineUi.Wpf.Windows11Interop, 2.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SolidShineUi.Wpf.Windows11Interop@2.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SolidShineUi.Wpf.Windows11Interop&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=SolidShineUi.Wpf.Windows11Interop&version=2.0.0
                    
Install as a Cake Tool

Solid Shine UI WPF Windows 11 Interop

This adds support for Windows 11's title bar customization to use with SolidShineUI's FlatWindow, via way of the Windows App SDK. This will allow you to use Windows 11's caption buttons in place of SolidShineUi's custom ones. (This also enables support for the Snap Layouts popup to appear when hovering over the Maximize button.)

Utilizing with FlatWindow

  1. Make sure your app's csproj file is targetting .NET 8 or later, and Windows 10 19041 or later (e.g., <TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>)
  2. Add an event handler for FlatWindow's SourceInitialized event.
  3. In that event handler, add in the line this.UseWindows11CaptionButtons();

I will also recommend you disable MRT Core in your WPF app if you're not using it. Also keep in mind how utilizing the Windows App SDK will affect how you package and distribute your app.

The end result should look like this:

In your app's csproj file:

MyProject.csproj

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
    

    <EnableCoreMrtTooling>false</EnableCoreMrtTooling>
    

    <RuntimeIdentifiers>win-x64;win-x86;win-arm64</RuntimeIdentifiers>
    

    
  </PropertyGroup>

  

  <ItemGroup>
    <PackageReference Include="SolidShineUi" Version="2.0.0" />
    
    <PackageReference Include="SolidShineUi.Wpf.Windows11Interop" Version="2.0.0" />
    

    
    <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.8.260804001" />
    
    
  </ItemGroup>

In your window's code-behind:

MyWindow.xaml.cs

    public MyWindow()
    {
        // other window setup/initialization code

        SourceInitialized += MyWindow_SourceInitialized;
    }

    private void MyWindow_SourceInitialized(object sender, EventArgs e)
    {
        this.UseWindows11CaptionButtons();
    }

Repeat the code-behind part for each window that you want to make this change for. This change is only opt-in for each individual window, not applied project wide.

Known Issues

Maximized window

By default, FlatWindow will add an extra gray frame around its edges when the window is maximized. This is to counteract some Windows design decision that cuts off the edges of a window when it is maximized. Usually, this gray frame is hidden as that is what gets cut off, and all is fine. However, when using this package to utilize Windows 11's title bar customization, this also somehow prevents the cutting off from occurring... meaning that the gray frame then becomes visible.

To solve this issue, a new property is being added in SolidShineUi 2.0.3 and 1.9.11 that will allow the gray frame to be hidden, called MaximizedWindowFrame. If you use versions 1.9.11 or 2.0.3 of this package, that fix will be automatically applied.

For earlier versions of SolidShineUi, you will need to create a custom style for FlatWindow or find a different way to go about hiding the frame or restoring the cutting-off behavior.

Resize handles / hit zones

I'm not sure why, but the hit/hover areas for the mouse to be in for resizing the window end up being outside the actual window itself. I don't know what the cause of this issue is, so I'm not quite sure yet how to solve it.

For now, you could add on extra resize grippers at the corners of the window to provide other areas where your users can resize the window.

Which version to use

Different versions of this package (SolidShineUi.Wpf.Windows11Interop) are intended to be used with different versions of SolidShineUi. See the below table to see which one you should use, based on which version of SolidShineUi you are using.

SSUI Version Use This Version
1.9.5 - 1.9.10 1.9.5.x
1.9.11 - 1.9.12 1.9.11.x
2.0.0 - 2.0.2 2.0.0.x
2.0.3 + 2.0.3.x

(If there are newer versions of this package than what's listed above, use the one that corresponds to the version of SolidShineUi you're using (e.g., use version 3.0 if you're using SSUI 3.0).)

Versions of Solid Shine UI prior to 1.9.5 aren't supported by this, because they are missing the ability to set the FlatWindow's CaptionDisplayType to None.

Avalonia support

Further investigation is being done as to what is needed for the Avalonia version of SSUI. It may be that this library is not needed for the Avalonia version at all.

License / About

This code is created by Jayke R. Huempfner (JaykeBird), the maintainer of Solid Shine UI. You can learn more about Solid Shine UI at my website, jaykebird.com, or view the code on GitHub.

This code is released under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net8.0-windows10.0.19041 is compatible.  net9.0-windows was computed.  net9.0-windows10.0.19041 is compatible.  net10.0-windows was computed.  net10.0-windows10.0.19041 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.3 79 9/24/2026
2.0.0 76 9/24/2026
1.9.5 86 9/24/2026