Exemplo n.º 1
0
 public VerticalScrollBarMargin(HexScrollMapFactoryService scrollMapFactoryService, WpfHexViewHost wpfHexViewHost)
 {
     if (scrollMapFactoryService is null)
     {
         throw new ArgumentNullException(nameof(scrollMapFactoryService));
     }
     theScrollBar                   = new TheScrollBar(this);
     this.wpfHexViewHost            = wpfHexViewHost ?? throw new ArgumentNullException(nameof(wpfHexViewHost));
     scrollMap                      = scrollMapFactoryService.Create(wpfHexViewHost.HexView);
     theScrollBar.IsVisibleChanged += VerticalScrollBarMargin_IsVisibleChanged;
     wpfHexViewHost.HexView.Options.OptionChanged += Options_OptionChanged;
     theScrollBar.SetResourceReference(FrameworkElement.StyleProperty, typeof(ScrollBar));
     theScrollBar.HorizontalAlignment = HorizontalAlignment.Center;
     theScrollBar.Orientation         = System.Windows.Controls.Orientation.Vertical;
     theScrollBar.SmallChange         = 1;
     UpdateVisibility();
 }
Exemplo n.º 2
0
 VerticalScrollBarMarginProvider(HexScrollMapFactoryService scrollMapFactoryService) => this.scrollMapFactoryService = scrollMapFactoryService;