![]() |
VOOZH | about |
dotnet add package Oakrey.Applications.Help --version 6.0.0
NuGet\Install-Package Oakrey.Applications.Help -Version 6.0.0
<PackageReference Include="Oakrey.Applications.Help" Version="6.0.0" />
<PackageVersion Include="Oakrey.Applications.Help" Version="6.0.0" />Directory.Packages.props
<PackageReference Include="Oakrey.Applications.Help" />Project file
paket add Oakrey.Applications.Help --version 6.0.0
#r "nuget: Oakrey.Applications.Help, 6.0.0"
#:package Oakrey.Applications.Help@6.0.0
#addin nuget:?package=Oakrey.Applications.Help&version=6.0.0Install as a Cake Addin
#tool nuget:?package=Oakrey.Applications.Help&version=6.0.0Install as a Cake Tool
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.
Folder and MarkdownFile items (HelpLoader)HelpService resolves the help root from IApplicationInfo.HelpPath and exposes the file treeHelpViewModel 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 propertiesIServiceCollection extension methodOakrey.Log tracing on service start and disposeclassDiagram
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 |
Oakrey.ViewModels >= 2.1.0Oakrey.Applications (provides IApplicationInfo)NuGet Package Manager
Oakrey.Applications.Help and click Install..NET CLI
dotnet add package Oakrey.Applications.Help
Package Manager Console
Install-Package Oakrey.Applications.Help
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.
// Inject or resolve HelpViewModel
public class ShellViewModel
{
public HelpViewModel Help { get; }
public ShellViewModel(HelpViewModel help)
{
Help = help;
}
}
<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" />
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
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().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.HelpService lifecycle events are traced through Oakrey.Log.Contributions are welcome! Feel free to open issues or submit pull requests to improve the package.
This project is licensed under the MIT License. See the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows7.0 net10.0-windows7.0 is compatible. |
Showing the top 1 NuGet packages that depend on Oakrey.Applications.Help:
| Package | Downloads |
|---|---|
|
Oakrey.Applications.Base
A foundational .NET library for building modular WPF applications. Provides application lifecycle management, MVVM ViewModel resolution, structured logging, telemetry, and sequential or parallel service preloading with full unhandled-exception coverage. |
This package is not used by any popular GitHub repositories.