Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is this possible to support virtual bin file #119

Open
heartacker opened this issue May 19, 2022 · 4 comments
Open

is this possible to support virtual bin file #119

heartacker opened this issue May 19, 2022 · 4 comments

Comments

@heartacker
Copy link

hi, I'm an embed developer and I need to develop a tool that render the hex data in chip's memory.

and wpfhexeditoris a beautiful control and how could I use this to show variable-data

@abbaye
Copy link
Owner

abbaye commented May 19, 2022

Hello

I think you can use a stream object.

Bind it this to the hexedit.stream property.

You can also check samples project in code

@heartacker
Copy link
Author

thanks, and there are some questions, could you please help me clear

  1. can we show data in 64bit-hex,32bit-hex not only 8bit-hex.
  2. We need to quickly read the chip-memory and map it to the Stream Object. Is it possible to modify part of the stream object and the UI response quickly?

@ilmete
Copy link

ilmete commented Oct 9, 2024

Hi,

I want to implement a similar structure in my Form application.
I have a 48kB byte array and want to show and modify it on your hex editor.
My app also modifies the byte array.
How could I always keep synchronized the hex editor and the byte array?

I have tried to wrap the byte array with a memory stream and bind it to the stream property of the hex editor with no success;

hexEditorStream = new MemoryStream(byteArray_48K, 0, 48 * 1024, true, true);

System.Windows.Data.Binding b = new System.Windows.Data.Binding();
b.Mode = System.Windows.Data.BindingMode.TwoWay;
b.Source = this;
b.Path = new System.Windows.PropertyPath("hexEditorStream");

hexEditor.SetBinding(HexEditor.StreamProperty, b);

In this way,
The buffer of the memory stream is also not synchronized with the initial byte array.
Sometimes buffer of the memory stream reflects the hex editor, not stable.
Modifications on the editor don't reflect the memory stream buffer.
I'm also not sure if I did binding correctly.
If I call the SubmitChanges() method I get the closed memory stream error for the next time.

Is it possible to always synchronize the byte array with the editor?
What could be the implementation steps?
Is an example code possible?

Thanks in advance,
Regards

@abbaye
Copy link
Owner

abbaye commented Oct 10, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants