Scotec.Revit.Wpf
2027.4.0-dev.4
See the version list below for details.
dotnet add package Scotec.Revit.Wpf --version 2027.4.0-dev.4
NuGet\Install-Package Scotec.Revit.Wpf -Version 2027.4.0-dev.4
<PackageReference Include="Scotec.Revit.Wpf" Version="2027.4.0-dev.4" />
<PackageVersion Include="Scotec.Revit.Wpf" Version="2027.4.0-dev.4" />
<PackageReference Include="Scotec.Revit.Wpf" />
paket add Scotec.Revit.Wpf --version 2027.4.0-dev.4
#r "nuget: Scotec.Revit.Wpf, 2027.4.0-dev.4"
#:package Scotec.Revit.Wpf@2027.4.0-dev.4
#addin nuget:?package=Scotec.Revit.Wpf&version=2027.4.0-dev.4&prerelease
#tool nuget:?package=Scotec.Revit.Wpf&version=2027.4.0-dev.4&prerelease
Scotec.Revit.Wpf
WPF base classes for Autodesk Revit add-in user interfaces.
Overview
Scotec.Revit.Wpf provides WPF-aware base types for Revit add-in windows, pages, and user controls. These base classes handle correct WPF resource dictionary loading when assemblies are loaded in isolated AssemblyLoadContext instances, ensuring that styles, templates, and resources resolve correctly regardless of how the add-in assembly is loaded into the process.
Key Features
- RevitWindow: Window subclass that resolves merged resource dictionaries safely within an isolated AssemblyLoadContext. Use instead of Window directly in Revit add-in modal windows.
- RevitPage: Page subclass with the same resource dictionary safety for page-based navigation UI.
- RevitUserControl: UserControl subclass for custom controls in an isolated add-in assembly.
Why This Matters
When a Revit add-in is loaded into a custom AssemblyLoadContext (via Scotec.Revit.Isolation), WPF's standard pack://application URI resolution can fail because it targets the default load context. These base classes apply the correct resource loading strategy for isolated assemblies, preventing XamlParseException and missing-style errors at runtime.
Getting Started
Install the NuGet package:
dotnet add package Scotec.Revit.Wpf
Your project must target net8.0-windows or net10.0-windows.
Replace Window with RevitWindow in your add-in:
public partial class MyToolWindow : RevitWindow
{
public MyToolWindow(MyViewModel viewModel)
{
DataContext = viewModel;
InitializeComponent();
}
}
Related Packages
- Scotec.Revit https://www.nuget.org/packages/Scotec.Revit/
- Scotec.Revit.Ui https://www.nuget.org/packages/Scotec.Revit.Ui/
- Scotec.Revit.Isolation https://www.nuget.org/packages/Scotec.Revit.Isolation/
License
MIT License https://licenses.nuget.org/MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows7.0 is compatible. |
-
net10.0-windows7.0
- Scotec.Revit (>= 2027.4.0-dev.4)
- Scotec.Revit.Isolation (>= 2027.4.0-dev.4)
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 |
|---|---|---|
| 2027.4.0-dev.9 | 34 | 7/3/2026 |
| 2027.4.0-dev.4 | 57 | 6/20/2026 |
| 2027.3.4 | 104 | 6/15/2026 |
| 2027.3.3 | 98 | 6/10/2026 |
| 2026.4.0-dev.9 | 31 | 7/3/2026 |
| 2026.4.0-dev.4 | 54 | 6/20/2026 |
| 2026.3.4 | 113 | 6/15/2026 |
| 2026.3.3 | 97 | 6/10/2026 |
| 2025.4.0-dev.9 | 32 | 7/3/2026 |
| 2025.4.0-dev.4 | 50 | 6/20/2026 |
| 2025.3.4 | 89 | 6/15/2026 |
| 2025.3.3 | 97 | 6/10/2026 |