NuExt.Presentation.Wpf
0.9.1
Prefix Reserved
dotnet add package NuExt.Presentation.Wpf --version 0.9.1
NuGet\Install-Package NuExt.Presentation.Wpf -Version 0.9.1
<PackageReference Include="NuExt.Presentation.Wpf" Version="0.9.1" />
<PackageVersion Include="NuExt.Presentation.Wpf" Version="0.9.1" />
<PackageReference Include="NuExt.Presentation.Wpf" />
paket add NuExt.Presentation.Wpf --version 0.9.1
#r "nuget: NuExt.Presentation.Wpf, 0.9.1"
#:package NuExt.Presentation.Wpf@0.9.1
#addin nuget:?package=NuExt.Presentation.Wpf&version=0.9.1
#tool nuget:?package=NuExt.Presentation.Wpf&version=0.9.1
NuExt.Presentation.Wpf
NuExt.Presentation.Wpf is a lightweight, WPF-focused presentation library providing XAML helpers, control extensions, data-binding utilities, diagnostics, and templating helpers. It enables clean, reusable presentation code across WPF applications with minimal dependencies.
Highlights
- Control extensions —
TreeViewItemHelper,ComboBoxExtensions,VirtualizingStackPanelExtensions, andControlExtensionsprovide common WPF control operations. - Binding helpers —
BindingProxyandBindingProxy<T>expose binding sources across resource dictionaries, templates, and locations outside the normalDataContextinheritance chain. - Framework extensions —
FrameworkElementExtensions,DependencyObjectExtensions,WindowExtensionsfor element and window operations. - Visual and logical tree traversal — find visual children and parents, or resolve an ancestor through the visual tree with a logical-tree fallback.
- Dispatcher-safe access — read dependency properties and execute property accessors on the owning WPF dispatcher.
- Window placement —
WindowPlacementto save/restore window position, size, and state with minimal code. - Diagnostics —
BindingErrorTraceListenercaptures and displays WPF binding errors when data-binding tracing is enabled. - Templating —
ComboBoxItemTemplateSelectorand reusable XAML styles (TreeViewItem, etc.). - Minimal dependencies — depends only on
NuExt.Systemand WPF framework assemblies.
Compatibility
WPF on .NET 8/9/10 and .NET Framework 4.6.2+. The library is independent of any particular MVVM framework.
Quick Start
Binding outside the DataContext inheritance chain
<Window.Resources>
<local:BindingProxy x:Key="proxy" DataContext="{Binding}" />
</Window.Resources>
<Button Content="Actions">
<Button.ContextMenu>
<ContextMenu DataContext="{Binding Source={StaticResource proxy}, Path=DataContext}">
<MenuItem Header="Refresh" Command="{Binding RefreshCommand}" />
</ContextMenu>
</Button.ContextMenu>
</Button>
Enable binding error diagnostics
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
PresentationTraceSources.Refresh();
PresentationTraceSources.DataBindingSource.Switch.Level = SourceLevels.Warning;
PresentationTraceSources.DataBindingSource.Listeners.Add(new BindingErrorTraceListener());
}
Save/restore window placement
var placement = WindowPlacement.GetPlacement(windowHandle);
// ... later, restore
WindowPlacement.SetPlacement(windowHandle, placement);
Find TreeViewItem by data item
var treeView = ...;
var item = treeView.GetTreeViewItem(myDataItem);
if (item != null) item.IsSelected = true;
Why NuExt.Presentation.Wpf?
- Reusable — common presentation infrastructure shared across WPF applications.
- Minimal — focused APIs without an application framework or MVVM architecture dependency.
- Explicit — straightforward extensions and helpers with visible WPF behavior.
- Debuggable — built-in binding diagnostics and readable implementation paths.
Installation
Via NuGet:
dotnet add package NuExt.Presentation.Wpf
Or via Visual Studio:
- Go to
Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution.... - Search for
NuExt.Presentation.Wpf. - Click "Install".
Ecosystem
- NuExt.Minimal.Behaviors.Wpf
- NuExt.Minimal.Mvvm.SourceGenerator
- NuExt.Minimal.Mvvm.Wpf
- NuExt.Minimal.Mvvm.AvalonDock
- NuExt.Minimal.Mvvm.MahApps.Metro
- NuExt.System
- NuExt.System.Data
- NuExt.System.Data.SQLite
Contributing
Issues and PRs are welcome. Keep changes minimal and performance-conscious.
License
MIT. See LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net9.0-windows7.0 is compatible. net10.0-windows was computed. net10.0-windows7.0 is compatible. net11.0-windows7.0 is compatible. |
| .NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 is compatible. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.6.2
- System.Text.Json (>= 11.0.0)
-
.NETFramework 4.7.1
- System.Text.Json (>= 11.0.0)
-
net10.0-windows7.0
- No dependencies.
-
net11.0-windows7.0
- No dependencies.
-
net8.0-windows7.0
- No dependencies.
-
net9.0-windows7.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on NuExt.Presentation.Wpf:
| Package | Downloads |
|---|---|
|
NuExt.DevExpress.Mvvm
Provides extensions and utilities for the DevExpress MVVM Framework with a focus on asynchronous operations in WPF. Improves async workflow handling, enhances ViewModel infrastructure, and offers async‑aware services that simplify building responsive MVVM applications. |
|
|
NuExt.Minimal.Mvvm.Wpf
A lightweight WPF add-on for NuExt.Minimal.Mvvm, providing view resolution, dispatcher-aware UI services, dialogs, documents, window lifecycle management, settings, and deterministic cleanup. |
GitHub repositories
This package is not used by any popular GitHub repositories.