Brows.Win32.PreviewHandler.Windows 1.0.0

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

Brows.Win32.Windows.PreviewHandler

A WPF control that displays files using the Windows shell preview handler registered for each file type.

The control hosts the native preview handler in a child window and runs its COM operations on a single-threaded apartment (STA) worker. It uses handlers installed and registered by Windows or other applications; this package does not include or register handlers.

Installation

dotnet add package Brows.Win32.Windows.PreviewHandler

The package targets net462, net48, net8.0-windows, and net10.0-windows. It requires Windows and WPF. Applications targeting .NET 8 or later should use a Windows TFM, such as net10.0-windows.

Usage

Add the Brows XAML namespace and bind PreviewHandlerSource to a file path:

<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:brows="http://schemas.brows.app/winfx/2026/xaml/presentation">
  <Grid>
    <brows:PreviewHandler PreviewHandlerSource="{Binding FilePath}" />
  </Grid>
</Window>

The file type must have a Windows shell preview handler registered on the machine. The handler's availability can depend on the installed applications and the process architecture.

Control properties and events

Member Description
PreviewHandlerSource File path to preview. Set to null or an empty string to clear the preview.
PreviewHandlerEnabled Enables or disables previewing. Defaults to true; disabling unloads the active handler.
PreviewHandlerRefresh Set to true to request a refresh; the control resets it to false.
PreviewHandlerLoading Read-only indicator that a preview is loading.
PreviewHandlerSuccess Read-only indicator that the current file was successfully previewed.
PreviewHandlerCLSIDChanged Raised when the handler class identifier is resolved. Set e.Override to use a different registered handler.
PreviewHandlerLoadingChanged Raised when PreviewHandlerLoading changes.
PreviewHandlerSuccessChanged Raised when PreviewHandlerSuccess changes.

To override the resolved handler, handle PreviewHandlerCLSIDChanged and assign the CLSID of another registered preview handler to e.Override.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed.  net10.0-windows7.0 is compatible. 
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 39 9/25/2026