NLog.WPF 1.2.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package NLog.WPF --version 1.2.3
                    
NuGet\Install-Package NLog.WPF -Version 1.2.3
                    
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="NLog.WPF" Version="1.2.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NLog.WPF" Version="1.2.3" />
                    
Directory.Packages.props
<PackageReference Include="NLog.WPF" />
                    
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 NLog.WPF --version 1.2.3
                    
#r "nuget: NLog.WPF, 1.2.3"
                    
#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 NLog.WPF@1.2.3
                    
#: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=NLog.WPF&version=1.2.3
                    
Install as a Cake Addin
#tool nuget:?package=NLog.WPF&version=1.2.3
                    
Install as a Cake Tool

NLog.WPF

This package is an extension to NLog.

NLog.WPF is a simple WPF-control to show NLog-logs. It's heavily inspired by NLog.Windows.Forms and this blog.

How to use?

Add a namespace to your Window, like this:

    xmlns:nlog ="clr-namespace:NLog.WPF;assembly=NLog.WPF"

then add the control

     <nlog:NlogListView x:Name="logCtrl" TimeWidth="auto" LoggerNameWidth="0" LevelWidth="auto" ExceptionWidth="auto" MessageWidth="auto" />

or

    <nlog:NlogRichTextBox x:Name="logCtrlNlogRichTextBox1"/>
    

clear NlogRichTextBox

    <Button Content="ClearLog" CommandTarget="{Binding ElementName=logCtrlNlogRichTextBox1}"  Command="{x:Static nlog:NlogRichTextBox.ClearCommand}" />

To setup NlogViewer as a target, add the following to your Nlog.config.

  <extensions>
    <add assembly="NLog.WPF" />
  </extensions>
  <targets>
    <target xsi:type="NLog.WPF" name="ctrl" />
  </targets>
  <rules>
    <logger name="*" minlevel="Trace" writeTo="ctrl" />
  </rules>

publish packget

dotnet nuget push <packageName> --api-key <apikey> --source https://api.nuget.org/v3/index.json
Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.0-windows was computed.  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.
  • net6.0-windows7.0

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.3.0 197 6/6/2026
1.2.6 1,688 4/25/2024
1.2.5 358 1/24/2024
1.2.4 339 8/10/2023
1.2.3 293 8/9/2023
1.2.2 317 7/20/2023
1.2.1 335 7/20/2023