public HexBoxFileTabUIContext(HexDocument hexDocument, IMenuManager menuManager, IHexEditorSettings hexEditorSettings, IAppSettings appSettings, IHexBoxUndoManager hexBoxUndoManager) { this.hexDocument = hexDocument; this.dnHexBox = new DnHexBox(menuManager, hexEditorSettings); this.dnHexBox.Document = this.hexDocument; this.dnHexBox.InitializeStartEndOffsetToDocument(); this.scrollViewer = new ScrollViewer { Content = this.dnHexBox, CanContentScroll = true, HorizontalScrollBarVisibility = ScrollBarVisibility.Auto, VerticalScrollBarVisibility = ScrollBarVisibility.Auto, Focusable = false, }; this.appSettings = appSettings; this.hexBoxUndoManager = hexBoxUndoManager; appSettings.PropertyChanged += AppSettings_PropertyChanged; UpdateHexBoxRenderer(appSettings.UseNewRenderer_HexEditor); hexBoxUndoManager.Initialize(this.dnHexBox); }