c# - Simplest way to create a wrapper class around some strings for a WPF DataGrid? -


I am creating a simple hex editor in C #, and I decide to display each cell in a datagrid Taken byte * I know that the data grid will take a list and display each object as a line in the list, and display the properties of each object as columns. I want to display the rows of 16 bytes for which Cover with 16 string properties will be required. While doing so, this is not the most elegant solution, is there any easy way? I have already tried to make a cover around a public string array of size 16, but it does not seem to be so.

Thank you

* The reason for this is that when I want to save my edited file, there are spaces between each byte, without touching everyone. Also it seems that labeling rows and columns will be easier.

I think about creating column Definitions in each cell and dynamic With a bundle of Textbox in the store, a regular grid in 16 columns, if you make it easy to navigate between the text box, but also for the databagrid's chambers, similarly would be required.

If you still want to use the DataGrade, pointing to item source should work in a 16-size array list. Create the code from DataGridTextColumns to each binding = new binding (string.format ("[{0}]", i)) , where i 0..15 Indexing property is just another asset and you can tie it easily. They do not need to be string arrays: use byte and create a iWALKC converter between the hex string and the byte. Oh, and close the Autogrentech column .


Comments