FlexiPane 1.0.0

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

FlexiPane.WPF

NuGet Version NuGet Downloads .NET Build and NuGet Publish License: MIT

A modern and flexible WPF screen splitting library for dynamic pane management. Create resizable, dockable panels with intuitive split controls and visual feedback.

<div align="center"> <img src="images/Screenshot1.png" alt="FlexiPane Split Layout" width="49%" /> <img src="images/Screenshot2.png" alt="FlexiPane Split Mode" width="49%" />

Left: Multiple panels with complex split layout | Right: Interactive split mode with visual guides </div>

✨ Features

  • 🎯 Dynamic Screen Splitting - Split panels vertically or horizontally at runtime
  • 🎨 Visual Split Mode - Interactive split overlay with guide lines and custom content
  • 🔄 Smart Panel Management - Automatic structure simplification when panels are removed
  • 🎮 Programmatic Control - Built-in methods for splitting selected panels
  • 🎯 Focus & Selection - Automatic focus tracking and visual selection indicators
  • 📐 Flexible Layouts - Support for complex nested split arrangements
  • 💾 Layout Persistence - Save and load complete layouts to XML files
  • 🎨 Fully Customizable - XAML templates for complete visual customization
  • High Performance - Pure WPF implementation with optimized rendering
  • 🔌 Event-Driven Architecture - Rich event system for custom behaviors
  • 🎛️ Content Factory System - Pluggable content creation for different panel types
  • ⌨️ Full Keyboard Support - Complete keyboard navigation and shortcuts
  • 💾 Zero Configuration - Works out of the box with sensible defaults

📦 Installation

Package Manager Console

Install-Package FlexiPane.WPF

.NET CLI

dotnet add package FlexiPane.WPF

PackageReference

<PackageReference Include="FlexiPane.WPF" Version="1.0.0" />

🚀 Quick Start

Add the namespace to your XAML:

xmlns:flexiPane="clr-namespace:FlexiPane.Controls;assembly=FlexiPane"

Use the simplest possible configuration:

<flexiPane:FlexiPanel />

That's it! The panel will automatically initialize with default content and be ready for splitting.

Programmatic Splitting

Split the selected panel programmatically:

// Split vertically at 50%
flexiPanel.SplitSelectedVertically(0.5);

// Split horizontally with custom content
var customContent = new TextBlock { Text = "New Panel" };
flexiPanel.SplitSelectedHorizontally(0.3, customContent);

Handling Events

Customize behavior through events:

// Provide custom content for new panels
flexiPanel.PaneSplitRequested += (s, e) => {
    e.NewContent = CreateCustomContent();
};

// Validate panel closing
flexiPanel.PaneClosing += (s, e) => {
    if (HasUnsavedChanges(e.Pane)) {
        e.Cancel = MessageBox.Show("Discard changes?", "Confirm", 
            MessageBoxButton.YesNo) == MessageBoxResult.No;
    }
};

// Handle last panel scenario
flexiPanel.LastPaneClosing += (s, e) => {
    e.Cancel = MessageBox.Show("Close last panel?", "Confirm",
        MessageBoxButton.YesNo) == MessageBoxResult.No;
};

Architecture

Core Components

  • FlexiPanel - Root container managing the entire pane structure
  • FlexiPaneItem - Individual panels containing user content
  • FlexiPaneContainer - Split containers holding two children with GridSplitter
  • FlexiPaneManager - Static manager handling split/remove operations

Tree Structure

The library uses a binary tree structure for managing panels:

FlexiPanel
└── RootContent
    ├── FlexiPaneItem (leaf node)
    └── FlexiPaneContainer (branch node)
        ├── FirstChild
        └── SecondChild

Advanced Features

Split Mode UI

Enable visual split mode for interactive splitting:

flexiPanel.IsSplitModeActive = true;
flexiPanel.ShowCloseButtons = true;

Users can then:

  • Click on panels to split them visually
  • See guide lines showing where the split will occur
  • Close panels with the X button
  • Press ESC to exit split mode

Layout Persistence

Save and load complete layouts:

// Save current layout to file
flexiPanel.SaveLayoutToFile("my-layout.flexilayout");

// Load layout from file
flexiPanel.LoadLayoutFromFile("my-layout.flexilayout");

// Clear all panels
flexiPanel.Clear();

Custom Split Guide Content

Provide custom content for the split overlay:

<flexiPane:FlexiPaneItem>
    <flexiPane:FlexiPaneItem.SplitGuideContent>
        <TextBlock Text="Click to split this panel" />
    </flexiPane:FlexiPaneItem.SplitGuideContent>
    
</flexiPane:FlexiPaneItem>

Content Factory System

Register content creators for different panel types:

// Register content creators
flexiPanel.RegisterContentCreator("editor", (paneInfo) => new TextEditor());
flexiPanel.RegisterContentCreator("browser", (paneInfo) => new WebBrowser());

// Set default content creator
flexiPanel.SetDefaultContentCreator((paneInfo) => new DefaultPanel());

Selection and Focus

The library automatically tracks the selected panel:

// Get the currently selected panel
var selected = flexiPanel.SelectedItem;

// Set selection programmatically
somePane.IsSelected = true;

🛠️ Requirements

  • .NET 9.0 or later
  • Windows platform (WPF dependency)
  • WPF application project

📚 Documentation

🎮 Demo Application

Check out the FlexiPane.Samples.DefaultApp project for a complete working example demonstrating:

  • ✨ Interactive panel splitting with visual feedback
  • 🎮 Event handling and custom behaviors
  • 🎨 Multiple content types (editor, terminal, explorer)
  • 💾 Layout save/load functionality
  • 🎛️ Content factory system usage
  • ⌨️ Keyboard shortcuts and navigation
  • 🎯 Programmatic control APIs

To run the demo:

git clone https://github.com/iyulab/FlexiPane.WPF.git
cd FlexiPane.WPF
dotnet run --project src/FlexiPane.Samples.DefaultApp/

🤝 Contributing

Contributions are welcome! Please feel free to:

  1. 🐛 Report bugs by opening an issue
  2. 💡 Suggest features for future versions
  3. 🔧 Submit pull requests with improvements
  4. 📖 Improve documentation or add examples
  5. Star the repository if you find it useful!

Please read our contributing guidelines before submitting PRs.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

⭐ Credits

Developed by iyulab

Built with modern WPF best practices and inspired by proven splitting mechanisms from advanced development environments.

🚀 Release Status

Production Ready - The library is stable and ready for production use. Semantic versioning is followed for all releases.

Current Version: v1.0.0

  • ✅ Complete core functionality
  • ✅ Comprehensive event system
  • ✅ Layout persistence
  • ✅ Full XAML theming support
  • ✅ Demo application with examples
  • ✅ NuGet package available
Product Compatible and additional computed target framework versions.
.NET net9.0-windows7.0 is compatible.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0-windows7.0

    • No dependencies.

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 191 8/8/2025
1.0.0-dev.13 109 9/1/2025
1.0.0-dev.9 116 8/13/2025
1.0.0-dev.8 118 8/12/2025
1.0.0-dev.6 114 8/10/2025