Raisin.WPF.Base
2.0.0
dotnet add package Raisin.WPF.Base --version 2.0.0
NuGet\Install-Package Raisin.WPF.Base -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="Raisin.WPF.Base" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Raisin.WPF.Base" Version="2.0.0" />
<PackageReference Include="Raisin.WPF.Base" />
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 Raisin.WPF.Base --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Raisin.WPF.Base, 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 Raisin.WPF.Base@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=Raisin.WPF.Base&version=2.0.0
#tool nuget:?package=Raisin.WPF.Base&version=2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Raisin.WPF.Base
Shared WPF base library for .NET 8 desktop applications — MVVM foundation, window management, docking layout persistence, data grid behaviors, settings infrastructure, and dark theme support.
Features
MVVM
- ViewModelBase —
INotifyPropertyChangedbase withSetProperty, batch notification, and UI thread helpers - ToolWindowViewModel — Base for tabbed/dockable tool windows with title deduplication, visibility tracking, and close support
- RelayCommand — Simple
ICommandimplementation withCanExecutesupport
Window management
- WindowPlacementHelper — Capture, restore, and validate window position across monitor configurations
- DarkWindowHelper — Apply Windows 11 dark mode to window chrome (title bar, background) with WM_ERASEBKGND interception to prevent white flash
- DockLayoutHelper — Save and restore AvalonDock layouts to XML with atomic file writes
Data grid
- DataGridColumnBehavior — Attached behavior for auto-fit and persistent column widths with right-click context menu
- AdaptiveHeader — Column headers that switch between full and abbreviated text based on available width
- GridSettingsService — Persists column widths to JSON with in-memory cache
Settings infrastructure
- SettingDefinition — Declarative metadata for settings (category, editor type, bounds, choices)
- SettingItemViewModel hierarchy — Concrete view models for Bool, Int, Double, String, TimeOnly, Choice, IntList, and compound types (Offset, TimePair, IntPair, DoublePair)
- SettingItemFactory — Creates the right view model from a definition
- SettingItemTemplateSelector — WPF DataTemplateSelector for rendering each setting type
Other utilities
- LargeNumberConverter — IValueConverter formatting numbers as 1.5B, 2.3M, 4.7K
- NumericInputBehavior — Attached behavior restricting TextBox input to integers or decimals
Installation
dotnet add package Raisin.WPF.Base
Quick start
View model
public class MyViewModel : ViewModelBase
{
private string _title = "";
public string Title
{
get => _title;
set => SetProperty(ref _title, value, nameof(Title));
}
}
Dark window
protected override void OnSourceInitialized(EventArgs e)
{
base.OnSourceInitialized(e);
DarkWindowHelper.Apply(this);
}
Persistent column widths
<DataGrid local:DataGridColumnBehavior.GridId="MyGrid" ... />
Dependencies
- Raisin.Core — atomic file I/O, app paths
- Raisin.EventSystem — event bus
- Raisin.AvalonDock — docking framework
- MaterialDesignThemes — Material Design resources
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 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.
-
net8.0-windows7.0
- MaterialDesignThemes (>= 5.1.0)
- Raisin.AvalonDock (>= 4.72.1)
- Raisin.Core (>= 2.0.0)
- Raisin.EventSystem (>= 2.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.