Reputation: 4032
I want to create a Hex-Editor using XAML/WPF and C#, but I need somesort of Table-Control to display the File-Content. It should have a Textbox in each Column to view Address, view and edit Hex-Values and ASCII-Values.
Later I want to add additional Columns, like Unicode or something. The User should be able to view/hide Columns.
What Controls do I need to do that?
I thought of a ListView
, with a GridView
to define the Columns and a TextBox in each Column.
But ListView
is more of a Multi-Row
Control.
Can you give me a hint on which Control I sould use?
Upvotes: 3
Views: 5428
Reputation: 197
You can check my project. Wpf hexeditor. I think it can be help you :)
You can use it very easily in Wpf or WinForm application. Download the code and test the Wpf (C#, VB.NET) and WinForm (C#) samples.
https://github.com/abbaye/WPFHexEditorControl
<!-- XAML -->
<Control:HexaEditor/>
<Control:HexaEditor Width="NaN" Height="NaN"/>
<Control:HexaEditor Width="Auto" Height="Auto"/>
<Control:HexaEditor FileName={Binding FileNamePath} Width="Auto" Height="Auto"/>
Upvotes: 1
Reputation: 5966
EDIT: I'd agree with that comment though, if the existing Be.HexEditor control meets your needs, that would be the best option.
Otherwise, I might recommend the DataGrid for that sort of tabular viewing and entry. If you search google there are lots of examples and tutorials (like this one).
Upvotes: 2