WPFHexaEditor 2.2.0
dotnet add package WPFHexaEditor --version 2.2.0
NuGet\Install-Package WPFHexaEditor -Version 2.2.0
<PackageReference Include="WPFHexaEditor" Version="2.2.0" />
<PackageVersion Include="WPFHexaEditor" Version="2.2.0" />
<PackageReference Include="WPFHexaEditor" />
paket add WPFHexaEditor --version 2.2.0
#r "nuget: WPFHexaEditor, 2.2.0"
#:package WPFHexaEditor@2.2.0
#addin nuget:?package=WPFHexaEditor&version=2.2.0
#tool nuget:?package=WPFHexaEditor&version=2.2.0
WPF HexEditor Control v2.2.0
A powerful, fully customizable hex editor control for .NET applications with modern service-based architecture.
Version 2.2.0 - Major architecture update with 10 services, 80+ unit tests, and comprehensive documentation
🚀 Quick Start
Installation
dotnet add package WPFHexaEditor
Basic Usage
<Window xmlns:hex="clr-namespace:WpfHexaEditor;assembly=WPFHexaEditor">
<hex:HexEditor x:Name="HexEdit" Width="Auto" Height="Auto"/>
</Window>
// Load a file
HexEdit.FileName = @"C:\data\file.bin";
// Search for pattern
byte[] pattern = new byte[] { 0x48, 0x65, 0x6C, 0x6C, 0x6F }; // "Hello"
var positions = HexEdit.FindAll(pattern, true); // Find and highlight
// Modify bytes
HexEdit.SelectionStart = 100;
HexEdit.SelectionStop = 200;
HexEdit.FillWithByte(0xFF);
// Save changes
HexEdit.SubmitChanges();
✨ Key Features
- Binary File Editing - Full read/write support for files and streams
- Multiple Views - Hexadecimal, decimal, and binary display modes
- Service Architecture - 10 specialized, testable services
- Search & Replace - Pattern matching with intelligent caching (10-100x faster)
- Undo/Redo - Unlimited history management
- Custom Character Tables - TBL file support for game hacking and ROM editing
- Insert/Overwrite Modes - Dynamic file size modification
- 80+ Unit Tests - Comprehensive test coverage with xUnit
- 6 Languages - Localized UI (EN, FR, PL, PT, RU, ZH)
- Well Documented - 19 README files + complete wiki
🏗️ Modern Architecture
The control uses a service-based architecture that separates business logic from UI:
HexEditor Control (UI Layer)
├── ClipboardService - Copy/paste operations
├── FindReplaceService - Search with caching
├── UndoRedoService - History management
├── SelectionService - Selection validation
├── HighlightService - Visual byte marking
├── ByteModificationService - Insert/delete/modify
├── BookmarkService - Bookmark management
├── TblService - Character table handling
├── PositionService - Position calculations
└── CustomBackgroundService - Background colors
Benefits:
- ✅ Testable components (80+ unit tests)
- ✅ Reusable services (use without UI in console apps, APIs, etc.)
- ✅ Maintainable codebase (separation of concerns)
- ✅ Performance optimized (intelligent caching, memory-mapped files)
🎯 Common Use Cases
- Binary Analysis - Inspect and modify binary files
- ROM Hacking - Edit game ROMs with custom character tables
- File Patching - Apply binary patches to executables
- Data Forensics - Analyze file structures and hidden data
- Debugging Tools - Build hex viewing/editing tools
- Save File Editing - Modify game save files
📦 Framework Support
- ✅ .NET Framework 4.8 - For Windows desktop applications
- ✅ .NET 8.0-windows - Latest .NET with modern C# features
Works in both WPF and WinForms applications (via ElementHost).
📚 Documentation
- GitHub Wiki - Complete documentation
- Getting Started Guide - Installation and examples
- API Reference - Complete API documentation
- Architecture Overview - Service layer design
- 8 Sample Applications - Working examples
- FAQ - Common questions
🎓 Advanced Examples
Search and Replace
// Find all occurrences
var findPattern = new byte[] { 0x00, 0x00 };
var positions = HexEdit.FindAll(findPattern, true);
// Replace all
var replaceWith = new byte[] { 0xFF, 0xFF };
HexEdit.ReplaceAll(findPattern, replaceWith);
Custom Character Tables (TBL)
// Load TBL file for game hacking
HexEdit.LoadTblFile(@"C:\tables\pokemon_gen1.tbl");
// Now hex view shows game-specific characters
Using Services Without UI
// Use services in console app, API, or background worker
var provider = new ByteProvider("file.bin");
var service = new FindReplaceService();
var position = service.FindFirst(provider, pattern, 0);
var allPositions = service.FindAll(provider, pattern); // Cached!
Bookmarks and Highlighting
// Add bookmark
HexEdit.SetBookMark(1000);
// Add custom highlighting
HexEdit.AddCustomBackgroundBlock(100, 50, Colors.Yellow);
🧪 Quality Assurance
- 80+ Unit Tests - All services comprehensively tested
- xUnit Framework - Modern testing approach
- CI/CD Ready - Automated testing support
- Test Coverage - SelectionService, FindReplaceService, HighlightService, and more
🎉 What's New in v2.2.0
🏗️ Service-Based Architecture
- 10 Specialized Services - Complete separation of business logic from UI
- 6 Stateless + 4 Stateful - Optimized for testability and performance
- Service APIs - Use services independently in console apps, APIs, background workers
🧪 Comprehensive Testing
- 80+ Unit Tests - xUnit test coverage for all service components
- Testable Design - Services can be tested in isolation without UI
- Quality Assurance - SelectionService, FindReplaceService, HighlightService fully tested
📚 Complete Documentation
- GitHub Wiki - 6+ comprehensive pages (Getting Started, Architecture, FAQ, Contributing)
- 19 README Files - Every major folder documented with examples
- Learning Path - Beginner to advanced progression guide
- Sample Apps - 8 working examples including Service Usage console app
🐛 Critical Bug Fixes
- Search Cache - Fixed invalidation after data modifications
- Accurate Results - Search now properly cleared at all 11 modification points
- Cache Performance - 10-100x faster repeated searches with intelligent caching
⚡ Performance Improvements
- Intelligent Caching - FindReplaceService with optimized result storage
- Memory Optimization - Stateless services reduce memory footprint
- Large Files - Memory-mapped file support for multi-GB files
🔧 Enhanced Compatibility
- .NET 8.0-windows - Full support with modern C# features
- .NET Framework 4.8 - Maintained for legacy applications
- 100% Backward Compatible - No breaking changes to public API
🤝 Contributing
Contributions welcome! Check out:
📜 License
Apache 2.0 - See LICENSE
Copyright 2016-2026 Derek Tremblay and contributors
✨ Ready to start? Check out the Getting Started Guide!
Created by Derek Tremblay • Contributors: ehsan69h, Janus Tida, Claude Sonnet 4.5
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net10.0-windows was computed. |
| .NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- No dependencies.
-
net8.0-windows7.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on WPFHexaEditor:
| Package | Downloads |
|---|---|
|
ColorVision.Solution
Package Description |
|
|
XX.AiMessage.WpfDev
Package Description |
GitHub repositories (3)
Showing the top 3 popular GitHub repositories that depend on WPFHexaEditor:
| Repository | Stars |
|---|---|
|
Squalr/Squalr-Sharp
Squalr Memory Editor - Game Hacking Tool Written in C#
|
|
|
SapphireServer/ffxivmon
A FFXIV Network Analysis Tool
|
|
|
sandermvanvliet/ProtobufDecoder
A Google Protocol Buffers (Protobuf) payload decoder/analyzer
|
| Version | Downloads | Last Updated |
|---|---|---|
| 2.2.0 | 108 | 2/11/2026 |
| 2.1.7 | 45,276 | 6/10/2021 |
| 2.1.6 | 24,465 | 1/12/2021 |
| 2.1.5 | 933 | 12/23/2020 |
| 2.1.3 | 771 | 12/16/2020 |
| 2.1.2 | 836 | 12/12/2020 |
| 2.1.1 | 863 | 11/17/2020 |
| 2.1.0 | 794 | 11/12/2020 |
| 2.0.3 | 943 | 10/11/2020 |
| 2.0.2 | 2,883 | 12/23/2019 |
| 1.9.1 | 4,809 | 9/28/2019 |
| 1.7.5 | 1,515 | 5/25/2019 |
| 1.6.3 | 1,195 | 3/4/2019 |
Version 2.2.0 (2026) - Major Architecture Update:
🏗️ New Architecture:
• Complete service-based architecture with 10 specialized services
• Separation of concerns: UI layer vs business logic layer
• 6 stateless + 4 stateful services for maximum flexibility
🧪 Quality & Testing:
• 80+ unit tests for all service layer components (xUnit)
• Test coverage for SelectionService, FindReplaceService, HighlightService
• Services are testable in isolation without UI dependencies
📚 Documentation:
• Complete GitHub Wiki with 6+ comprehensive pages
• 19 README files covering every major folder
• Getting Started, Architecture, FAQ, Contributing guides
• Learning path from beginner to advanced
🐛 Critical Bug Fixes:
• Fixed search cache not being invalidated after data modifications
• Cache properly cleared at all 11 modification points
• Users now receive accurate search results after editing
⚡ Performance:
• Intelligent caching in FindReplaceService (10-100x faster repeated searches)
• Optimized memory usage with stateless services
• Memory-mapped files for large file support
✨ New Features:
• Service Usage Sample - Use services without UI in console apps
• NuGet package with comprehensive README
• 8 sample applications demonstrating all features
🔧 Compatibility:
• Full .NET 8.0-windows support alongside .NET Framework 4.8
• No breaking changes - 100% backward compatible API
• Works in WPF and WinForms applications
📖 Documentation: https://github.com/abbaye/WpfHexEditorControl/wiki