๐Ÿค Contributing to WpfHexEditor

April 1, 2026 ยท View on GitHub

Contributions are welcome and appreciated! This guide covers everything you need to get started.


Getting Started

Prerequisites

  • Visual Studio 2022 (recommended) or Rider 2024+
  • .NET 8.0 SDK โ€” download
  • Windows (WPF platform requirement)

Fork & Clone

git clone https://github.com/YOUR_USERNAME/WpfHexEditorIDE.git
cd WpfHexEditorIDE

Open WpfHexEditorControl.sln in Visual Studio 2022.

Set WpfHexEditor.App as the startup project and press F5 to verify everything builds and runs.


Project Structure

Sources/
โ”œโ”€โ”€ WpfHexEditor.App/              โ† IDE application (startup project)
โ”œโ”€โ”€ WpfHexEditor.Core/             โ† ByteProvider, services, data layer
โ”œโ”€โ”€ WpfHexEditor.HexEditor/        โ† HexEditor WPF control (partial classes by feature)
โ”‚   โ””โ”€โ”€ PartialClasses/
โ”‚       โ”œโ”€โ”€ Core/                  โ† File ops, stream ops, events, async
โ”‚       โ””โ”€โ”€ Features/              โ† Search, TBL, bookmarks, format detection, ...
โ”œโ”€โ”€ WpfHexEditor.Editor.Core/      โ† IDocumentEditor, IEditorFactory contracts
โ”œโ”€โ”€ WpfHexEditor.Editor.TblEditor/ โ† TBL editor (standalone, IDocumentEditor)
โ”œโ”€โ”€ WpfHexEditor.Editor.JsonEditor/โ† JSON editor (standalone, IDocumentEditor)
โ”œโ”€โ”€ WpfHexEditor.Editor.TextEditor/โ† Text editor (standalone, IDocumentEditor)
โ”œโ”€โ”€ WpfHexEditor.Panels.IDE/       โ† SolutionExplorer, Properties, ErrorPanel
โ”œโ”€โ”€ WpfHexEditor.Panels.BinaryAnalysis/ โ† ParsedFields, DataInspector, StructureOverlay
โ”œโ”€โ”€ WpfHexEditor.Docking.Wpf/      โ† VS-style docking engine
โ”œโ”€โ”€ WpfHexEditor.ProjectSystem/    โ† Solution/Project management
โ”œโ”€โ”€ WpfHexEditor.HexBox/           โ† Standalone hex input control
โ”œโ”€โ”€ WpfHexEditor.BarChart/         โ† Byte distribution chart
โ””โ”€โ”€ WpfHexEditor.Tests/            โ† Unit tests (xUnit)

Branch Conventions

BranchPurpose
masterStable, release-ready
developmentActive development โ€” target this for PRs
feature/my-featureFeature branches (off development)
fix/issue-123Bug fix branches

Always branch from development, not master.


Code Standards

Architecture Patterns

  • MVVM โ€” ViewModels must not reference Views; use Commands and bindings
  • Partial classes โ€” HexEditor features are split into PartialClasses/Features/*.cs; follow this pattern for new features
  • Services โ€” Business logic belongs in services (WpfHexEditor.Core/Services/), not in the control
  • Interfaces โ€” New panel types must implement the relevant interface in WpfHexEditor.Editor.Core

Coding Style

  • C# 13, nullable reference types enabled
  • PascalCase for public members, _camelCase for private fields
  • Async methods suffixed with Async; always accept CancellationToken
  • XML doc comments on all public API members

Adding a New Editor

  1. Create a new project WpfHexEditor.Editor.YourEditor
  2. Implement IDocumentEditor (from WpfHexEditor.Editor.Core)
  3. Create an IEditorFactory and register it: EditorRegistry.Instance.Register(new YourEditorFactory())
  4. Add a stub entry to the Editors table in README.md and FEATURES.md

Adding a New Panel

  1. Create the UserControl in the appropriate WpfHexEditor.Panels.* project
  2. Define the interface in WpfHexEditor.Editor.Core
  3. Add Panel_* and your panel-specific theme keys to all 8 Colors.xaml files
  4. Connect in WpfHexEditor.App/MainWindow.xaml.cs via DockHost.ActiveItemChanged

Theme Keys

Every new UI color must be a DynamicResource key defined in all 8 theme Colors.xaml files: Dark ยท Light ยท VS2022Dark ยท DarkGlass ยท Minimal ยท Office ยท Cyberpunk ยท VisualStudio


Running Tests

dotnet test Sources/WpfHexEditor.Tests/
dotnet test Sources/WpfHexEditor.BinaryAnalysis.Tests/
dotnet test Sources/WpfHexEditor.Docking.Tests/

Submitting a Pull Request

  1. Branch from development: git checkout -b feature/my-feature development
  2. Make your changes โ€” keep commits focused and descriptive
  3. Run the tests โ€” all tests must pass
  4. Push your branch and open a PR targeting development
  5. Describe what you changed and why in the PR description

PR checklist:

  • Targets development branch
  • Tests pass
  • New theme keys added to all 8 Colors.xaml (if any UI color added)
  • Public API has XML doc comments
  • README / FEATURES updated if a new editor or panel was added

Reporting Issues


Thank you for contributing! ๐Ÿ™