WPF HexEditor is a powerful, fully customizable hex editor control for .NET applications with modern service-based architecture. ✨ Features: • Binary file editing (hex, decimal, binary views) • 10 specialized services (Find, Undo/Redo, Clipboard, Selection, Highlight, ByteModification, Bookmark, TBL, Position, CustomBackground) • Search & Replace with intelligent caching • Unlimited Undo/Redo support • Custom character tables (TBL) for game hacking • Insert/Overwrite modes • 80+ unit tests for quality assurance • Localized in 6 languages (EN, FR, PL, PT, RU, ZH) • Comprehensive documentation with 19 README files 📦 Supports: .NET Framework 4.8 and .NET 8.0-windows 🎯 Use in: WPF and WinForms applications Perfect for: Binary analysis, ROM hacking, file patching, hex editing tools, data forensics
$ dotnet add package WPFHexaEditorA 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
dotnet add package WPFHexaEditor
<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();
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:
Works in both WPF and WinForms applications (via ElementHost).
// 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);
// Load TBL file for game hacking
HexEdit.LoadTblFile(@"C:\tables\pokemon_gen1.tbl");
// Now hex view shows game-specific characters
// 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!
// Add bookmark
HexEdit.SetBookMark(1000);
// Add custom highlighting
HexEdit.AddCustomBackgroundBlock(100, 50, Colors.Yellow);
Contributions welcome! Check out:
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