I use ItemsControlto display List<byte>in hexadecimal format. ItemsPanelTemplateis a UniformGridfixed number of columns:
<ItemsControl
HorizontalAlignment="Left"
VerticalAlignment="Top"
ItemsSource="{Binding}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="16"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding StringFormat='\{0:X2\}'}" Margin="5,5,5,0"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
I would like to prefix each line with the "Address" column, as you saw with the Notepad ++ HEX-Editor plugin.
That is, since I have 16 columns, each row should have a prefix like this:
0000 [00 01 02 .... 0F]
0010 [10 11 12 .... 1F]
0020 [20 21 22 .... 2F]
...
Any suggestions?
source
share