HexView.Wpf
HexView.Wpf copied to clipboard
Change view offset via binding?
First of all, I love this control!!
I want to be able to move the viewer to a predefined position when I press a button. I thought the Offset dependency property would do the job here:
<Button Command="{Binding JumpToOffsetCommand}"/>
<hv:HexViewer x:Name="hexViewer" DataSource="{Binding MemoryReader}" Offset="{Binding MemoryOffset}"/>
[ObservableProperty]
private long _memoryOffset;
[RelayCommand]
public void JumpToOffset() => MemoryOffset = 0x192;
The command is working and MemoryOffset is firing a property-changed notification as per the Community MVVM Toolkit docs, but the hex viewer doesn't move.
However, if I set the Offset
property directly on the control, it works:
hexViewer.Offset = 0x192;
Is there something going on with the OffsetProperty
dependency property here?