Dreamine.UI.Wpf
1.0.1
dotnet add package Dreamine.UI.Wpf --version 1.0.1
NuGet\Install-Package Dreamine.UI.Wpf -Version 1.0.1
<PackageReference Include="Dreamine.UI.Wpf" Version="1.0.1" />
<PackageVersion Include="Dreamine.UI.Wpf" Version="1.0.1" />
<PackageReference Include="Dreamine.UI.Wpf" />
paket add Dreamine.UI.Wpf --version 1.0.1
#r "nuget: Dreamine.UI.Wpf, 1.0.1"
#:package Dreamine.UI.Wpf@1.0.1
#addin nuget:?package=Dreamine.UI.Wpf&version=1.0.1
#tool nuget:?package=Dreamine.UI.Wpf&version=1.0.1
Dreamine.UI.Wpf
Dreamine.UI.Wpf is the WPF foundation layer of the Dreamine UI stack.
It provides shared utilities consumed by all higher-level Dreamine UI packages:
- Value converters
- WPF behaviors
- Localization infrastructure
- Base LED control primitives
What this library solves
WPF UI packages need a shared foundation for:
- Binding converters reused across many XAML files
- XAML-attachable behaviors (drag, numeric range, etc.)
- Centralized multi-language text management
- Shared enumerations and primitives for LED controls
Without this layer, each UI package would duplicate converters and utilities, causing divergence and maintenance burden.
Key Features
- Converters: null-to-visibility, bool-to-int, LED geometry, value/unit combination, format-to-example, language-to-XML
- Behaviors:
WindowDragBehavior,NumericRangeBehavior - Localization:
DreamineLocalizationManager— multi-language text lookup with hot-reload support - LED primitives:
LedCornerenum shared across LED-related controls - Targets
net8.0-windows
Requirements
- Target Framework:
net8.0-windows - Dependencies:
Dreamine.MVVM.ViewModelsMicrosoft.Xaml.Behaviors.WpfSystem.Drawing.Common
Installation
NuGet
dotnet add package Dreamine.UI.Wpf
PackageReference
<PackageReference Include="Dreamine.UI.Wpf" />
Project Structure
Dreamine.UI.Wpf
├── Behaviors/
│ ├── NumericRangeBehavior.cs — clamp numeric input to min/max
│ └── WindowDragBehavior.cs — drag window by mouse-down on element
├── Controls/
│ └── LedCorner.cs — corner radius enum for LED controls
├── Converters/
│ ├── BoolToIntDynamicConverter.cs — bool → configurable int value
│ ├── FormatToExampleConverter.cs — input format → example string
│ ├── LedInnerDiameterConverter.cs — LED inner circle size (MultiBinding)
│ ├── LedPositionConverter.cs — LED dot offset within bounding box
│ ├── NullToVisibilityConverter.cs — null → Collapsed, non-null → Visible
│ └── ValueUnitCombinationConverter.cs — combine value + unit label
└── Localization/
├── DreamineLocalization.cs — XAML attached property entry point
└── DreamineLocalizationManager.cs — runtime text lookup and language switch
Architecture Role
Dreamine.MVVM.ViewModels
│
Dreamine.UI.Wpf ← this package
│
Dreamine.UI.Wpf.Controls
Dreamine.UI.Wpf.Equipment
Dreamine.UI.Wpf.Themes
All higher-level UI packages reference this package.
It must not reference them.
Quick Start
Converters in XAML
xmlns:conv="clr-namespace:Dreamine.UI.Wpf.Converters;assembly=Dreamine.UI.Wpf"
<conv:NullToVisibilityConverter x:Key="NullToVis" />
<TextBlock Visibility="{Binding Icon, Converter={StaticResource NullToVis}}" />
WindowDragBehavior
xmlns:b="clr-namespace:Dreamine.UI.Wpf.Behaviors;assembly=Dreamine.UI.Wpf"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
<Border Background="#FF2D2D2D">
<i:Interaction.Behaviors>
<b:WindowDragBehavior />
</i:Interaction.Behaviors>
</Border>
Localization
// Set language at startup
DreamineLocalizationManager.SetLanguage(Language.ko_KR);
xmlns:vsl="clr-namespace:Dreamine.UI.Wpf.Localization;assembly=Dreamine.UI.Wpf"
<TextBlock vsl:DreamineLocalization.Key="MainMenu.Title" />
Converter Reference
| Converter | Input | Output |
|---|---|---|
NullToVisibilityConverter |
object? |
Visibility |
BoolToIntDynamicConverter |
bool |
int (configurable) |
LedInnerDiameterConverter |
double, double (MultiBinding) |
double |
LedPositionConverter |
double, LedCorner (MultiBinding) |
double |
ValueUnitCombinationConverter |
string |
string |
FormatToExampleConverter |
InputFormat |
string |
Design Notes
- This package never references higher-level UI packages
- Converters are stateless and safe to use as static resources
DreamineLocalizationManagerloads text from XML files at runtime — the file path is configurableWindowDragBehaviorusesWindow.GetWindow(AssociatedObject).DragMove()internally
License
MIT License
| 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. |
-
net8.0-windows7.0
- Dreamine.UI.Abstractions (>= 1.0.1)
- Microsoft.Xaml.Behaviors.Wpf (>= 1.1.135)
- System.Drawing.Common (>= 8.0.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Dreamine.UI.Wpf:
| Package | Downloads |
|---|---|
|
Dreamine.UI.FullKit
All-in-one meta package for Dreamine UI libraries (WPF stack). Includes Abstractions, Wpf host, Controls, Equipment, and Themes. Blazor / MAUI / WinForms hosts must be installed separately due to framework differences. |
|
|
Dreamine.UI.Wpf.Controls
Custom WPF controls for the Dreamine UI library: DreamineButton, DreamineTextBox, MessageBox, Navigation, and more. |
|
|
Dreamine.UI.Wpf.Equipment
Equipment-grade WPF components: Virtual Keyboard, Blink Popup, Alarm Config. |
|
|
Dreamine.UI.Wpf.Themes
WPF style/theme ResourceDictionary files for Dreamine UI controls. |
GitHub repositories
This package is not used by any popular GitHub repositories.