![]() |
VOOZH | about |
dotnet add package WPFHexaEditor --version 3.4.5
NuGet\Install-Package WPFHexaEditor -Version 3.4.5
<PackageReference Include="WPFHexaEditor" Version="3.4.5" />
<PackageVersion Include="WPFHexaEditor" Version="3.4.5" />Directory.Packages.props
<PackageReference Include="WPFHexaEditor" />Project file
paket add WPFHexaEditor --version 3.4.5
#r "nuget: WPFHexaEditor, 3.4.5"
#:package WPFHexaEditor@3.4.5
#addin nuget:?package=WPFHexaEditor&version=3.4.5Install as a Cake Addin
#tool nuget:?package=WPFHexaEditor&version=3.4.5Install as a Cake Tool
A full-featured WPF hex editor UserControl for .NET 8.
Drop it into any WPF window ā no IDE, no plugin host, no external dependencies.
dotnet add package WPFHexaEditor
<Window
xmlns:hex="clr-namespace:WpfHexEditor.HexEditor;assembly=WpfHexEditor.HexEditor">
Both HexEditor and HexEditorSplitHost live in the same assembly ā one declaration covers both.
Single editor:
<hex:HexEditor x:Name="HexEdit" />
With built-in split view:
<hex:HexEditorSplitHost x:Name="HexEdit" />
The split button is built into the toolbar ā the user clicks it to open/close the second pane.
Access the underlying editor via HexEdit.PrimaryEditor.
// HexEditor
HexEdit.FileName = @"C:\path\to\file.bin";
// HexEditorSplitHost
HexEdit.OpenFile(@"C:\path\to\file.bin");
HexEdit.PrimaryEditor.FileName = @"C:\path\to\file.bin"; // equivalent
<hex:HexEditor ByteArray="{Binding MyBytes}" />
// Code-behind
HexEdit.ByteArray = new byte[] { 0x00, 0xFF, 0xDE, 0xAD };
// Async load (same result, returns Task.CompletedTask)
await HexEdit.OpenByteArrayAsync(myBuffer, readOnly: false);
// Retrieve the (possibly edited) buffer
byte[] modified = HexEdit.GetCurrentBytes();
// Save without a file ā fires the ByteArraySaved event
HexEdit.ByteArraySaved += (_, bytes) => ProcessBytes(bytes);
HexEdit.SaveByteArray(); // or Ctrl+S in byte-array mode
HexEdit.Stream = File.OpenRead("data.bin"); // HexEditor
HexEdit.OpenStream(File.OpenRead("data.bin")); // HexEditorSplitHost
// Read
byte b = HexEdit.GetByte(offset);
// Write (adds to undo stack)
HexEdit.SetByte(offset, 0xFF);
// Undo / redo
HexEdit.Undo();
HexEdit.Redo();
// Save
HexEdit.SubmitChanges(); // save to original file
HexEdit.SubmitChanges("out.bin"); // save to new file
Merge once in App.xaml so themes and brushes resolve correctly:
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/WpfHexEditor.HexEditor;component/Resources/Dictionary/Generic.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
ByteArray DependencyProperty ā bind a byte[] directly in XAML, no file requiredOpenByteArrayAsync(byte[], readOnly) ā programmatic loadGetCurrentBytes() ā snapshot of the current buffer including editsSaveByteArray() / ByteArraySaved event ā save-without-file workflowIsByteArrayMode ā flag to detect current backing modeIsDirty correctly tracks in-memory changesHexEditorSplitHost ā synchronized split-view host with built-in toolbar toggleHexEditorSettings ā auto-generated settings panel with live binding and JSON persistenceHexBreadcrumbBar ā visual structure navigatorHexScrollMarkerPanel ā overview of bookmarks, search hits, and changesIParsedFieldsPanel ā bridge interface for custom parsed-fields side panelsConnectParsedFieldsPanel() / DisconnectParsedFieldsPanel() ā attach/detach at runtimeGetByteProvider() ā access the raw byte provider for custom analysisFindSelect(position, length) ā jump to and select any byte rangeDependencyProperty API for programmatic controlByteToolTipDisplayMode, ByteToolTipDetailLevel, MouseWheelSpeed, FontSize, BytePerLine, and 30+ morebyte[] support ā bind or set ByteArray directly in XAML without a file (issue #253).OpenByteArrayAsync(byte[], readOnly) ā loads an in-memory buffer programmatically.GetCurrentBytes() ā retrieves the current buffer (including unsaved edits) as byte[].ByteArraySaved event ā fires on SaveByteArray() or Ctrl+S in byte-array mode; subscriber receives the full modified buffer.IsByteArrayMode property ā true when the editor is backed by a byte[] rather than a file.IsDirty no longer returns true for a freshly loaded byte-array document with no edits.SaveOrSaveAs) routes correctly through ByteArraySaved when in byte-array mode instead of opening a SaveFileDialog.ShowEntropyHeatmap dependency property; configure palette and block size from HexEditorSettings.HexEditorSettings entropy options page ā EntropyBlockSize, EntropyColorLow, EntropyColorHigh, theme-aware palette.whfmt.FileFormatCatalog ā 1.5.0 (856 format definitions, schema v3.1 with embeddedLanguages[] support).Ctrl+Z / Ctrl+Y no longer swallowed when the control is hosted outside a docking shell.IsDirty correctly resets to false after undoing all changes back to the original state.HexEditorLocalizedDictionary is now merged into UserControl.Resources ā resolves XamlParseException at startup when localization StaticResource keys are used outside the ContextMenu tree (standalone and IDE mode both affected).whfmt.FileFormatCatalog 1.3.2 (whfmt v3 GA) ā 799 format definitions, runtime expression engine, schema v3 canonical.HexEditorSplitHost ā drop-in split-view host wrapping a primary + optional secondary HexEditor; synchronized scrolling, mutations, and breadcrumb.HexEditorSettings ā auto-generated settings panel UserControl; exposes every HexEditor DependencyProperty with live binding, color picker, JSON export/import.IParsedFieldsPanel integration API ā ConnectParsedFieldsPanel() / DisconnectParsedFieldsPanel(), GetByteProvider(), FindSelect(position, length).MessageBox / IDialogService ā drop-in replacement for MessageBox.Show; injectable, themeable via DynamicResource, usable in any WPF host.Ctrl+G.UndoEngine ā Ctrl+Z/Ctrl+Y history now uses a shared undo engine; undo groups and coalescence work consistently across sessions.ShowColumnHighlight and ShowAsciiColumnHighlight now default to false to reduce visual noise out-of-the-box.HexBreadcrumbBar freeze ā Render-priority dispatcher guard prevents mouse re-dispatch loop during visual tree rebuild on rapid navigation.HexBreadcrumbBar double rebuild ā phantom empty row caused by XAML/code-behind duplication resolved; bookmark chip re-render only fires on actual bookmark set changes.ByteProvider extracted to WpfHexEditor.Core.ByteProvider standalone library..whfmt format definitions added (Groups CāJ) ā total now exceeds 600 definitions.FormatSchemaValidator wired ā .whfmt files are now validated against schema v3 at load time; violations are reported via FormatLoadFailure..whfmt schema bumped to v2.3 ā references and detection fields unified across all categories.ForensicPattern tolerant converter ā invalid pattern values no longer throw; fallback to null with log entry.InputFilter control ā reusable filter-bar UserControl for hex/byte input.HexStringToColorConverter ā XAML binding converter for hex color strings..whfmt files no longer crash the host application ā load failures are captured in FormatLoadFailure and surfaced in the StatusBar (ā N whfmt failed to load) instead of propagating exceptions.EmbeddedFormatCatalog singleton and lazy caches modernized ā LazyInitializer.EnsureInitialized replaces manual double-checked lock; GetAll() / GetCategories() now return IReadOnlySet<T> backed by FrozenSet<T> for better thread safety and lookup performance.MakeEntries(rethrow: true) / MakeCategories() exposed as public static factory methods ā enables LoadResourcesTest build gate.ROM_SNES_SRM (SNES save RAM)..whfmt references schema v2 standardized across Game and Archives categories.TechnicalDetails.SampleRate changed from int? to string?.MOBI.whfmt references structure corrected.GFX.whfmt, TIL.whfmt, CHR.whfmt Platform field corrected..whfmt files with invalid Strength values corrected.JsonSerializerOptions in ImportFromJson is now a static readonly field ā avoids 463+ allocations at startup.SignatureStrength enum now correctly deserialized ā was silently falling back to None(0), causing all TIER 1 strong-signature formats to be excluded from detection.Strong/Unique signatures.EmbeddedFormatCatalog.GetAll() fully thread-safe..whfmt block-comment headers removed (fixes #229).HexBreadcrumbBar ContextMenu fully opaque in standalone apps.ResourceReferenceKeyNotFoundException no longer thrown in standalone WPF apps (fixes #228).Breaking changes: .NET 8.0-windows only, namespace WPFHexaEditor ā WpfHexEditor.HexEditor, assembly renamed, modular architecture.
See full changelog in the GitHub repository.
All bundled inside the package ā zero external NuGet dependencies:
| Assembly | Purpose |
|---|---|
| WpfHexEditor.HexEditor | HexEditor UserControl ā main entry point |
| WpfHexEditor.Core | Byte providers, format detection, search, undo/redo |
| WpfHexEditor.Core.BinaryAnalysis | Cross-platform binary analysis (no WPF dependency) |
| WpfHexEditor.Core.Definitions | 856 embedded format definitions (.whfmt, schema v3.1) |
| WpfHexEditor.Editor.Core | Shared editor abstractions |
| WpfHexEditor.ColorPicker | Color picker control (settings panel) |
| WpfHexEditor.HexBox | Hex display rendering control |
| WpfHexEditor.ProgressBar | Progress bar control |
Localizations (28): ar-SA, cs-CZ, da-DK, de-DE, el-GR, es-419, es-ES, fi-FI, fr-CA, fr-FR, hi-IN, hu-HU, id-ID, it-IT, ja-JP, ko-KR, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, sv-SE, th-TH, tr-TR, uk-UA, vi-VN, zh-CN
GNU Affero General Public License v3.0 (AGPL-3.0)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 net8.0-windows7.0 is compatible. net9.0-windows net9.0-windows was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 2 NuGet packages that depend on WPFHexaEditor:
| Package | Downloads |
|---|---|
|
ColorVision.Solution
Package Description |
|
|
XX.AiMessage.WpfDev
Package Description |
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 |
|---|---|---|
| 3.4.5 | 36 | 6/18/2026 |
| 3.4.0 | 718 | 5/28/2026 |
| 3.3.2 | 410 | 5/18/2026 |
| 3.3.1 | 204 | 5/12/2026 |
| 3.3.0 | 256 | 5/6/2026 |
| 3.2.0 | 196 | 5/2/2026 |
| 3.1.4 | 201 | 4/28/2026 |
| 3.1.3 | 3,016 | 4/15/2026 |
| 3.1.2 | 155 | 4/14/2026 |
| 3.1.1.1 | 124 | 4/14/2026 |
| 3.1.1 | 112 | 4/14/2026 |
| 3.1.0 | 105 | 4/14/2026 |
| 3.0.5 | 132 | 4/14/2026 |
| 3.0.4 | 146 | 4/13/2026 |
| 3.0.3 | 155 | 4/13/2026 |
| 3.0.2 | 138 | 4/10/2026 |
| 3.0.1 | 122 | 4/10/2026 |
| 2.2.0 | 1,363 | 2/11/2026 |
| 2.1.7 | 56,228 | 6/10/2021 |
| 2.1.6 | 29,392 | 1/12/2021 |
3.4.5 ā First-class byte[] support (issue #253): ByteArray DependencyProperty for direct XAML binding; OpenByteArrayAsync() for async load without UI freeze; ByteArraySaved event for non-file save workflow; GetCurrentBytes() snapshot; IsByteArrayMode flag; SaveByteArray() public API; IsDirty correctly tracks in-memory changes. 3.4.0 ā Entropy heatmap: per-byte Shannon entropy rendered as a color overlay directly on the hex grid (options page + context menu toggle); updated to whfmt.FileFormatCatalog 1.5.0 (856 definitions, schema v3.1 + embeddedLanguages[]); undo/redo fully wired in standalone mode (Ctrl+Z/Y); IsDirty propagation fixed after undo to empty state. 3.3.2 ā Fix XamlParseException on startup: HexEditorLocalizedDictionary wired into UserControl.Resources. 3.3.1 ā Split-view polish + whfmt.FileFormatCatalog 1.3.2 (799 definitions). 3.3.0 ā HexEditorSplitHost; HexEditorSettings; IParsedFieldsPanel API; themed dialogs; +10 localizations (28 total).