Oakrey.Applications.Help 3.0.3

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

Oakrey.Applications.Help

A WPF/.NET 10 library that provides a structured, interactive help system for desktop applications. It scans a directory of Markdown files, builds a hierarchical navigation tree, and exposes a ready-to-bind HelpViewModel with forward/back navigation history.

Main features

  • Recursive directory scan that builds a tree of Folder and MarkdownFile items (HelpLoader)
  • HelpService resolves the help root from IApplicationInfo.HelpPath and exposes the file tree
  • HelpViewModel implements INotifyPropertyChanged with Next / Prev commands and a full browsing history (ObservableCollection<Uri>)
  • BindableTreeView - a WPF TreeView subclass that exposes SelectedItem and PreviewSelectedItem as two-way bindable dependency properties
  • DI registration via a single IServiceCollection extension method
  • Integrated Oakrey.Log tracing on service start and dispose

Architecture

classDiagram
    IHelpService <|.. HelpService
    HelpService --> HelpLoader : uses
    HelpLoader --> FileSystemItem : produces
    FileSystemItem <|-- Folder
    FileSystemItem <|-- MarkdownFile
    HelpViewModel --> IHelpService : consumes
    HelpViewModel --> HelpLoader : fallback (default ctor)
    BindableTreeView --> HelpViewModel : binds SelectedItem
Class / Type Role
IHelpService Abstraction over the file tree; inject this in application code
HelpService Reads IApplicationInfo.HelpPath, builds the tree, implements IDisposable
HelpLoader Static recursive scanner; skips attachments subdirectories
FileSystemItem Abstract base for tree nodes
Folder Represents a subdirectory; contains child FileSystemItem nodes
MarkdownFile Represents a .md file; exposes Path for URI navigation
HelpViewModel INPC ViewModel; tracks current file, MdSource URI, and history stack
BindableTreeView WPF TreeView with bindable SelectedItem and PreviewSelectedItem
HelpConfigurationExtension Registers HelpViewModel and IHelpService with the DI container

Requirements

  • .NET 10 (Windows)
  • WPF host application
  • Oakrey.ViewModels >= 2.1.0
  • Oakrey.Applications (provides IApplicationInfo)

Installation

NuGet Package Manager

  1. Open your project in Visual Studio.
  2. Navigate to Tools > NuGet Package Manager > Manage NuGet Packages for Solution.
  3. Search for Oakrey.Applications.Help and click Install.

.NET CLI

dotnet add package Oakrey.Applications.Help

Package Manager Console

Install-Package Oakrey.Applications.Help

Configuration

Register the help services during application startup:

services.ConfigureHelpServices();

This registers:

  • IHelpService as HelpService (transient)
  • HelpViewModel (transient)

HelpService expects IApplicationInfo to be registered separately. It reads IApplicationInfo.HelpPath as the root directory for Markdown files.

Example usage

ViewModel binding

// Inject or resolve HelpViewModel
public class ShellViewModel
{
    public HelpViewModel Help { get; }

    public ShellViewModel(HelpViewModel help)
    {
        Help = help;
    }
}

XAML

<help:BindableTreeView
    ItemsSource="{Binding Help.Files}"
    SelectedItem="{Binding Help.File}" />

<WebBrowser Source="{Binding Help.MdSource}" />

<Button Command="{Binding Help.Prev}" Content="Back" />
<Button Command="{Binding Help.Next}" Content="Forward" />

Help directory layout

The help root directory should contain .md files and optional subdirectories. Subdirectories named attachments are automatically excluded from the tree.

Assets/
  Help.md              <- default landing file (matched by name "Help")
  GettingStarted.md
  Advanced/
    Configuration.md
    attachments/       <- excluded from tree
      diagram.png

Development notes

  • HelpViewModel has two constructors: a default constructor that reads from {BaseDirectory}/Assets/, and a DI constructor that accepts IHelpService. The DI constructor is used when the service is registered via ConfigureHelpServices().
  • Navigation history is maintained as an ObservableCollection<Uri>. Next and Prev commands are enabled/disabled automatically via RelayCommand predicates.
  • BindableTreeView works around the WPF TreeView limitation that SelectedItem is read-only by exposing a new bindable SelectedItem dependency property.
  • All HelpService lifecycle events are traced through Oakrey.Log.

Project information

Contributions are welcome! Feel free to open issues or submit pull requests to improve the package.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net10.0-windows7.0 is compatible. 
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
3.0.3 36 5/15/2026
3.0.2 116 3/13/2026
3.0.1 135 2/11/2026
3.0.0 457 11/18/2025
2.0.2 189 10/10/2025
2.0.1 239 9/29/2025
2.0.0 231 9/8/2025
1.1.0 236 7/1/2025
1.0.0 289 4/17/2025