WpfHexEditorControl

Wpf Hexeditor is a powerful and fully customisable user control for editing file or stream as hexadecimal, decimal and binary. Can be used in Wpf or WinForm application

View project on GitHub

Dialog

User interface dialogs for find and replace operations in the hex editor.

πŸ“ Contents

This folder contains WPF dialog windows that provide interactive UI for search and replace functionality:

πŸ” Find Dialogs

  • FindWindow.xaml.cs - Basic find dialog
    • Search for byte sequences
    • Find First, Next, Last, All operations
    • Uses embedded HexEditor control for input
    • Binds to parent HexEditor for search results
  • FindReplaceWindow.xaml.cs - Combined find and replace dialog
    • Search for byte patterns
    • Replace found sequences with new bytes
    • Replace First, Next, All operations
    • Two embedded HexEditor controls (find/replace input)

πŸ”„ Replace Dialogs

  • ReplaceByteWindow.xaml.cs - Simple byte replacement dialog
    • Replace single byte value with another
    • Text input for byte values
    • Direct integration with HexEditor’s ReplaceByte method
  • GiveByteWindow.xaml.cs - Byte input dialog
    • Generic byte value input window
    • Used for fill operations and byte insertion
    • Validates hexadecimal input

🎯 Purpose

These dialogs provide a user-friendly interface for complex search and replace operations that would be difficult to perform directly in the hex view.

πŸ”— Integration

All dialogs:

  • Accept a HexEditor parent reference in constructor
  • Call methods on the parent HexEditor control
  • Use the FindReplaceService indirectly through HexEditor API
  • Follow WPF MVVM-lite pattern (code-behind for simplicity)

πŸŽ“ Usage Example

// Opening the Find dialog from HexEditor
var findWindow = new FindWindow(this, existingSearchBytes);
findWindow.ShowDialog();

// Opening Find/Replace dialog
var findReplaceWindow = new FindReplaceWindow(this);
findReplaceWindow.ShowDialog();

// Simple byte replacement
var replaceWindow = new ReplaceByteWindow(this);
replaceWindow.ShowDialog();

✨ Features

  • Embedded HexEditors: Use HexEditor control for byte pattern input
  • Live Search: Results appear immediately in parent HexEditor
  • Clear/Reset: Reset search patterns quickly
  • Validation: Input validation for hexadecimal values
  • Keyboard Support: Standard dialog keyboard shortcuts

✨ User-friendly dialogs for hex editor find and replace operations