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

Posted by Joel on Stack Overflow See other posts from Stack Overflow or by Joel
Published on 2010-05-18T01:29:43Z Indexed on 2010/05/18 5:00 UTC
Read the original article Hit count: 207

Filed under:
|
|
|
|

I'm building a simple hex editor in C#, and I've decided to use each cell in a DataGrid to display a byte*. I know that DataGrid will take a list and display each object in the list as a row, and each of that object's properties as columns. I want to display rows of 16 bytes each, which will require a wrapper with 16 string properties. While doable, it's not the most elegant solution. Is there an easier way? I've already tried creating a wrapper around a public string array of size 16, but that doesn't seem to work.

Thanks

*The rational for this is that I can have spaces between each byte without having to strip them all out when I want to save my edited file. Also it seems like it'll be easier to label the rows and columns.

© Stack Overflow or respective owner

Related posts about wpf

Related posts about c#