WpfxCustomControls.DrawerWindow 0.1.0-alpha.2

This is a prerelease version of WpfxCustomControls.DrawerWindow.
dotnet add package WpfxCustomControls.DrawerWindow --version 0.1.0-alpha.2
                    
NuGet\Install-Package WpfxCustomControls.DrawerWindow -Version 0.1.0-alpha.2
                    
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="WpfxCustomControls.DrawerWindow" Version="0.1.0-alpha.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WpfxCustomControls.DrawerWindow" Version="0.1.0-alpha.2" />
                    
Directory.Packages.props
<PackageReference Include="WpfxCustomControls.DrawerWindow" />
                    
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 WpfxCustomControls.DrawerWindow --version 0.1.0-alpha.2
                    
#r "nuget: WpfxCustomControls.DrawerWindow, 0.1.0-alpha.2"
                    
#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 WpfxCustomControls.DrawerWindow@0.1.0-alpha.2
                    
#: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=WpfxCustomControls.DrawerWindow&version=0.1.0-alpha.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=WpfxCustomControls.DrawerWindow&version=0.1.0-alpha.2&prerelease
                    
Install as a Cake Tool

DrawerWindow custom control

WPF custom control built entirely in C# with WPFX.

DrawerWindow

Custom window control with a side drawer, based on the standard WPF Window.

Properties

  • Content (object), inherited from Window
  • DrawerContent (object)
  • DrawerSide (DrawerSide), Default: DrawerSide.Right
  • DrawerLength (double), Default: 400
  • DrawerBackground (Brush), Default: Brushes.LightGray
  • IsDrawerVisible (bool)
  • IsDrawerPinned (bool)
  • IsDrawerClosed (bool)
Notes

If a Button is used to open the drawer (see example app below), IsDrawerClosed is useful for binding to Button.IsEnabledProperty to act as a 'gate' to prevent repeat-setting the state IsDrawerVisible=true during the drawer open animation.

When the drawer is open, clicking on any part of the DrawerWindow client area that is not part of the drawer surface, will close the drawer.

Example demo app

[0] Template part: PART_Drawer, VisualState: Collapsed

WPF demo app showing a DrawerWindow Closed


[1] Template part: PART_Drawer, VisualState: Visible
  • DrawerSide = DrawerSide.Left
  • DrawerLength = 400

WPF demo app showing a DrawerWindow Open Left


[2] Template part: PART_Drawer, VisualState: Visible
  • DrawerSide = DrawerSide.Top
  • DrawerLength = 200

WPF demo app showing a DrawerWindow Open Top


[3] Template part: PART_Drawer, VisualState: Visible
  • DrawerSide = DrawerSide.Right
  • DrawerLength = 400

WPF demo app showing a DrawerWindow Open Right


[4] Template part: PART_Drawer, VisualState: Visible
  • DrawerSide = DrawerSide.Bottom
  • DrawerLength = 200

WPF demo app showing a DrawerWindow Open Bottom


Example demo app source code

The demo app uses WPFX to create the UIElement tree.

The DrawerWindow has two dependency properties for content:

  • Content: The client area content
  • DrawerContent: The drawer content
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
using WpfxCustomControls;
using WpfxCustomControls.DrawerWindowTypes;

namespace Demo_DrawerWindow;

public class MainWindow : DrawerWindow
{
    private Button? _button;

    public MainWindow()
    {
        Title = "Demo DrawerWindow";
        Width = 800;
        Height = 500;
        Content = Build();
        DrawerContent = BuildDrawer();
    }

    private UIElement Build() { ... }

    private UIElement BuildDrawer() { ... }
}
Product Compatible and additional computed target framework versions.
.NET net10.0-windows7.0 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
0.1.0-alpha.2 54 9/13/2026
0.1.0-alpha.1 77 8/30/2026