public ZoomControlMargin(WpfHexViewHost wpfHexViewHost, HexEditorOperations editorOperations) { zoomControl = new TheZoomControl(this); this.wpfHexViewHost = wpfHexViewHost ?? throw new ArgumentNullException(nameof(wpfHexViewHost)); this.editorOperations = editorOperations ?? throw new ArgumentNullException(nameof(editorOperations)); wpfHexViewHost.HexView.Options.OptionChanged += Options_OptionChanged; // Need to set these explicitly so our themed styles are used zoomControl.SetResourceReference(FrameworkElement.StyleProperty, typeof(ComboBox)); zoomControl.SetResourceReference(ItemsControl.ItemContainerStyleProperty, typeof(ComboBoxItem)); zoomControl.MinHeight = 0; zoomControl.Margin = new Thickness(0); zoomControl.Width = 60; UpdateVisibility(); }
public ZoomControlMargin(WpfHexViewHost wpfHexViewHost, HexEditorOperations editorOperations) { if (wpfHexViewHost == null) throw new ArgumentNullException(nameof(wpfHexViewHost)); if (editorOperations == null) throw new ArgumentNullException(nameof(editorOperations)); zoomControl = new TheZoomControl(this); this.wpfHexViewHost = wpfHexViewHost; this.editorOperations = editorOperations; wpfHexViewHost.HexView.Options.OptionChanged += Options_OptionChanged; // Need to set these explicitly so our themed styles are used zoomControl.SetResourceReference(FrameworkElement.StyleProperty, typeof(ComboBox)); zoomControl.SetResourceReference(ItemsControl.ItemContainerStyleProperty, typeof(ComboBoxItem)); zoomControl.MinHeight = 0; zoomControl.Margin = new Thickness(0); zoomControl.Width = 60; UpdateVisibility(); }