Skip to content
abbaye edited this page Apr 16, 2026 · 7 revisions

Frequently Asked Questions


IDE Application

Q: How do I run the full IDE?

A: Clone the repository, open the solution, and run:

git clone https://github.com/abbaye/WpfHexEditorIDE.git

Open WpfHexEditorControl.sln in Visual Studio 2022, set WpfHexEditor.App as the startup project, and press F5.


Q: What .NET version is required?

A: .NET 8.0-windows exclusively.

  • .NET 8.0-windows — full performance: Span<T>, SIMD, PGO
  • ❌ .NET Framework 4.8 — dropped in V2 (Feb 2026)

The legacy V1 NuGet package (WPFHexaEditor) still supports .NET Framework 4.8 but is no longer maintained.


Q: Where are plugins installed?

A: WpfPluginHost discovers plugins from two locations (in order):

  1. %AppData%\WpfHexEditor\Plugins\<PluginId>\
  2. <IDE_EXE>\bin\Plugins\<PluginId>\

Each plugin folder must contain a manifest.json and the plugin .dll.


Q: How do I write a plugin?

A: Reference WpfHexEditor.SDK and implement IWpfHexEditorPluginV2:

public class MyPlugin : IWpfHexEditorPluginV2
{
    public string Id          => "com.example.myplugin";
    public string Name        => "My Plugin";
    public string Version     => "1.0.0";
    public string? Description => null;
    public int    LoadPriority => 50;

    public void Init(IIDEHostContext context)
    {
        context.UIRegistry.RegisterPanel("my-panel", "My Panel", () => new MyPanelView());
        context.EventBus.Subscribe<FileOpenedEvent>(e =>
            context.OutputService.WriteLine($"Opened: {e.FilePath}"));
    }

    public void Activate()   => /* show panels */ ;
    public void Deactivate() => /* hide panels */ ;
    public void Dispose()    => /* cleanup */ ;
}

Package with whxpack CLI → produces a .whxplugin archive.

👉 See Plugin System for the full guide.


Q: How do I open the terminal?

A: Ctrl+`` or Tools → Terminal. Type help for all available commands.

👉 See Terminal for command reference and scripting guide.


Q: How do I change the IDE theme?

A: Tools → Options → Theme — 8 built-in themes available, switches instantly with no restart.

Themes: Dark · Light · VS2022Dark · DarkGlass · Minimal · Office · Cyberpunk · VisualStudio


Q: How do I monitor plugin CPU and memory usage?

A: Tools → Plugin Monitoring — shows real-time per-plugin CPU% and memory charts.

👉 See Plugin Monitoring.


Q: How do I open a project or solution?

A: File → Open Project / Solution supports three formats:

  • .whsln / .whproj — native WpfHexEditor format
  • .sln / .csproj — Visual Studio solution (via SolutionLoader.VS)
  • Folder → creates a .whfolder marker (via SolutionLoader.Folder)

You can also drag files directly onto the IDE.


Q: How do I open a Visual Studio solution?

A: Use File → Open Project / Solution and select a .sln file. The SolutionLoader.VS plugin (priority 90) handles it automatically — no conversion required.


Q: How do I use the XAML Visual Designer?

A: Open any .xaml file. The IDE auto-routes to xaml-designer. You can also right-click a .xaml file → Open With → XAML Designer.

  • Split-pane: code on one side, live canvas on the other
  • 4 layout modes: Ctrl+1/2/3 or the layout dropdown in the toolbar
  • Toggle Design/Code: F7
  • Undo/Redo: Ctrl+Z / Ctrl+Y (overkill undo with history panel)

Q: Can I use the HexEditor control without the IDE?

A: Yes — WpfHexEditor.HexEditor is a standalone WPF UserControl:

<ProjectReference Include="..\WpfHexEditor.Core\WpfHexEditor.Core.csproj" />
<ProjectReference Include="..\WpfHexEditor.HexEditor\WpfHexEditor.HexEditor.csproj" />
<hex:HexEditor FileName="data.bin" />

Q: What is WpfHexEditor.Shell?

A: WpfHexEditor.Shell is the docking engine — renamed from WpfHexEditor.Docking.Wpf in v0.6.0. If you reference WpfHexEditor.Docking.Wpf in your project, update to WpfHexEditor.Shell. The namespace root is now WpfHexEditor.Shell.*.


Q: How do I trigger a build?

A: Ctrl+Shift+B or Build → Build Solution. The Build.MSBuild plugin handles it via dotnet build. Output appears in the Output panel; errors are routed to the Error Panel automatically.


HexEditor Control

Q: How do I load a file?

A:

hexEditor.FileName = @"C:\data\myfile.bin";

Or async (large files):

var progress = new Progress<double>(p => progressBar.Value = p);
await hexEditor.OpenAsync("large.bin", progress);

Q: How do I save changes?

A:

hexEditor.Save();       // In-place (modifications only: 100x faster)
hexEditor.SaveAs(path); // New file

Q: How do I search for a byte pattern?

A:

var pattern = new byte[] { 0xDE, 0xAD, 0xBE, 0xEF };
long position = hexEditor.FindFirst(pattern);     // Returns -1 if not found
var all = hexEditor.FindAll(pattern, highlight: true);

Q: How do I make the control read-only?

A:

hexEditor.ReadOnlyMode = true;

Q: How do I enable insert mode?

A:

hexEditor.AllowInsertMode = true;
// Press Insert key to toggle between Insert and Overwrite

Q: Can I highlight specific byte ranges?

A:

hexEditor.AddHighlight(0, 256, Colors.LightBlue, "File Header");
hexEditor.AddHighlight(0x1000, 2048, Colors.LightGreen, "Data Section");

Q: How do I use custom character tables (TBL)?

A:

hexEditor.LoadTBL(@"C:\tables\pokemon.tbl");
// Or via IDE: project item link (.bin ↔ .tbl)

Q: Can I open files > 1 GB?

A: Yes — WpfHexEditor uses lazy loading and only renders the visible viewport. For very large files, use OpenAsync() with a progress callback.


Q: Can I use this in WinForms?

A: Yes via ElementHost:

var host = new ElementHost { Dock = DockStyle.Fill };
host.Child = new WpfHexEditor.HexEditor.HexEditor();
this.Controls.Add(host);

Code Editor

Q: How do I enable CodeLens hints?

A: Tools → Options → Code Editor → Inline Hints — enable/disable CodeLens and configure which hints to show (references, test status).

Q: How do I use rect selection?

A: Hold Alt and drag to create a rectangular selection. Works in both Code Editor and Text Editor.

Q: What does Ctrl+Click do?

A: Go-to-definition — navigates to the declaration of the symbol under the cursor. Opens the file in a new tab if in another file, or scrolls to the location in the same file.


Search & Performance

Q: Why is search so fast?

A: Three layers of optimization:

flowchart LR
    Req["Search request"] --> LRU["LRU Cache\n10-100x for repeated searches"]
    LRU -->|miss| BM["Boyer-Moore-Horspool\nalgorithm"]
    BM -->|large file| Par["Parallel.For\nacross CPU cores\n2-4x faster"]
    BM -->|single byte| SIMD["SIMD AVX2/SSE2\n4-8x faster"]
Loading

Q: What is the LRU search cache?

A: SearchCacheService stores the last N search results. Repeating a search for the same pattern returns immediately from cache — no file scan.

Cache is automatically invalidated at all 11 edit points (modify, insert, delete, undo, redo, load, save…).


Troubleshooting

Q: A panel shows a blank placeholder after restart

A: This was a bug where BuildContentForItem() in MainWindow didn't handle all ContentId cases. Fixed in v0.5.x — all panels now restore correctly.


Q: Plugin Manager shows unstyled items

A: Ensure your theme file defines all PM_* brush keys. All 8 built-in themes include them. If using a custom theme, add the missing keys.


Q: The XAML Designer canvas is blank

A: Check that the XAML file has a valid root element. The designer requires a parseable XAML document. Syntax errors are shown in an error card overlaid on the canvas.


Q: Auto-scroll in Terminal goes too far

A: Fixed — BringIntoView() is now deferred with DispatcherPriority.Background and suppresses re-entry via _suppressAutoScrollPause.


Q: My plugin references WpfHexEditor.Docking.Wpf

A: Update to WpfHexEditor.Shell (v0.6.0 rename). The assembly name and namespace root changed:

  • Old: WpfHexEditor.Docking.WpfWpfHexEditor.Docking.Wpf.*
  • New: WpfHexEditor.ShellWpfHexEditor.Shell.*

Q: Changes aren't saving

A: Call Save() (V2 API) — not SubmitChanges() (V1 legacy, removed in V2.6.0).


Versions

Q: What version is current?

A: v0.6.4.75 (2026-04-15) — 690+ .whfmt definitions, Structure Editor, whfmt.FileFormatCatalog NuGet, AI Assistant, Tab Groups, Window Menu + Fullscreen, Git Integration UI.

See CHANGELOG for the full history.


Q: What was added in v0.6.0?

A: Major additions:

  • XAML Visual Designer (~70%) with bidirectional sync
  • Code Editor raised to ~90% (NavBar, CodeLens, Quick Info, rect selection, UndoEngine)
  • Shared Undo/Redo Engine (coalescing, transactions, save-point)
  • WpfHexEditor.Shell — docking engine rename
  • VS .sln/.csproj support + Open-Folder mode
  • Build System (IBuildAdapter + Build.MSBuild plugin)
  • Assembly Explorer plugin
  • NuGet Solution Manager panel
  • Synalysis Grammar support (IGrammarProvider)
  • IIDEEventBus — 21 typed domain events

Still have questions? GitHub Discussions

Navigation

Getting Started

IDE Documentation

HexEditor Control

Advanced

Development


v0.6.4.75 Highlights

  • whfmt.FileFormatCatalog v1.0.0 NuGet (cross-platform net8.0)
  • 690+ .whfmt definitions (schema v2.3)
  • Structure Editor — block DataGrid, drag-drop, validation, SmartComplete
  • WhfmtBrowser/Catalog panels — browse all embedded formats
  • AI Assistant (5 providers, 25 MCP tools)
  • Tab Groups, Document Structure, Lazy Plugin Loading
  • Window Menu + Win32 Fullscreen (F11)
  • Git Integration UI (changes, history, blame)
  • Shared Undo Engine (HexEditor ↔ CodeEditor)
  • Bracket pair colorization, sticky scroll, peek definition
  • Format detection hardening (thread-safe, crash guard)

Links

Clone this wiki locally