SuGarToolkit.WinUI3.Controls.NativeLikeCaptionButton 1.0.0

dotnet add package SuGarToolkit.WinUI3.Controls.NativeLikeCaptionButton --version 1.0.0
                    
NuGet\Install-Package SuGarToolkit.WinUI3.Controls.NativeLikeCaptionButton -Version 1.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="SuGarToolkit.WinUI3.Controls.NativeLikeCaptionButton" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SuGarToolkit.WinUI3.Controls.NativeLikeCaptionButton" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="SuGarToolkit.WinUI3.Controls.NativeLikeCaptionButton" />
                    
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 SuGarToolkit.WinUI3.Controls.NativeLikeCaptionButton --version 1.0.0
                    
#r "nuget: SuGarToolkit.WinUI3.Controls.NativeLikeCaptionButton, 1.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 SuGarToolkit.WinUI3.Controls.NativeLikeCaptionButton@1.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=SuGarToolkit.WinUI3.Controls.NativeLikeCaptionButton&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=SuGarToolkit.WinUI3.Controls.NativeLikeCaptionButton&version=1.0.0
                    
Install as a Cake Tool

Native-like Caption Button for WinUI 3

Provides flexible and customizable title bar for WinUI 3 in Windows 11 native UWP style.

<img width="1880" height="367" alt="image" src="https://github.com/user-attachments/assets/38ceb971-8c39-444e-8c17-1831e4a3f8bd" />

Features

  • Every caption button can be disabled or hidden.
  • Title bar height can be set freely like many other xaml controls.
  • Supports custom content in title bar.

<img width="3885" height="1053" alt="image" src="https://github.com/user-attachments/assets/30687574-0b63-48bf-91d5-d060eb26e723" />

<img width="3653" height="289" alt="image" src="https://github.com/user-attachments/assets/30e6d3d1-8e8a-43c5-92ce-25b12da71c82" />

Drawbacks

  • Does not support Snap Layout on Windows 11.

<img width="3756" height="872" alt="image" src="https://github.com/user-attachments/assets/e7c4a38e-79b9-451e-b169-f34fed16ecd9" />

How to use

Remember to set OwnerWindow to ensure it can change the window state properly.

Here is part of the code from the sample app.

<my:NativeLikeTitleBar
    Height="42"
    BackButtonVisibility="{x:Bind ViewModel.IsBackButtonVisible, Converter={StaticResource BoolToVisibilityConverter}}"
    CloseButtonVisibility="{x:Bind ViewModel.IsCloseButtonVisible, Converter={StaticResource BoolToVisibilityConverter}}"
    IsBackButtonEnabled="{x:Bind ViewModel.IsBackButtonEnabled}"
    IsCloseButtonEnabled="{x:Bind ViewModel.IsCloseButtonEnabled}"
    IsMaximizeButtonEnabled="{x:Bind ViewModel.IsMaximizeButtonEnabled}"
    IsMinimizeButtonEnabled="{x:Bind ViewModel.IsMinimizeButtonEnabled}"
    IsPaneToggleButtonEnabled="{x:Bind ViewModel.IsPaneToggleButtonEnabled}"
    MaximizeButtonVisibility="{x:Bind ViewModel.IsMaxmizeButtonVisible, Converter={StaticResource BoolToVisibilityConverter}}"
    MinimizeButtonVisibility="{x:Bind ViewModel.IsMinmizeButtonVisible, Converter={StaticResource BoolToVisibilityConverter}}"
    OwnerWindow="{x:Bind OwnerWindow}"
    PaneToggleButtonClick="TitleBarAreaPaneToggleButtonClick"
    PaneToggleButtonVisibility="{x:Bind ViewModel.IsPaneToggleButtonVisible, Converter={StaticResource BoolToVisibilityConverter}}">

    <my:NativeLikeTitleBar.CustomHeader>
        
    </my:NativeLikeTitleBar.CustomHeader>

    <my:NativeLikeTitleBar.CustomFooter>
        
    </my:NativeLikeTitleBar.CustomFooter>

    
</my:NativeLikeTitleBar>

You can also try it in the sample app.

<img width="3040" height="1798" alt="image" src="https://github.com/user-attachments/assets/ace75151-331d-4e32-ad7c-c36f84014d29" />

Product Compatible and additional computed target framework versions.
.NET net8.0-windows10.0.19041 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
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
1.0.0 214 9/10/2025