Ejemplo n.º 1
0
		public HorizontalScrollBarMargin(WpfHexViewHost wpfHexViewHost) {
			if (wpfHexViewHost == null)
				throw new ArgumentNullException(nameof(wpfHexViewHost));
			theScrollBar = new TheScrollBar(this);
			this.wpfHexViewHost = wpfHexViewHost;
			theScrollBar.IsVisibleChanged += HorizontalScrollBarMargin_IsVisibleChanged;
			wpfHexViewHost.HexView.Options.OptionChanged += Options_OptionChanged;
			theScrollBar.SetResourceReference(FrameworkElement.StyleProperty, typeof(ScrollBar));
			theScrollBar.VerticalAlignment = VerticalAlignment.Top;
			theScrollBar.Orientation = System.Windows.Controls.Orientation.Horizontal;
			theScrollBar.SmallChange = 12.0;
			theScrollBar.Minimum = 0;
			UpdateVisibility();
		}
Ejemplo n.º 2
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();
 }
Ejemplo n.º 3
0
 public HorizontalScrollBarMargin(WpfHexViewHost wpfHexViewHost)
 {
     if (wpfHexViewHost == null)
     {
         throw new ArgumentNullException(nameof(wpfHexViewHost));
     }
     theScrollBar                   = new TheScrollBar(this);
     this.wpfHexViewHost            = wpfHexViewHost;
     theScrollBar.IsVisibleChanged += HorizontalScrollBarMargin_IsVisibleChanged;
     wpfHexViewHost.HexView.Options.OptionChanged += Options_OptionChanged;
     theScrollBar.SetResourceReference(FrameworkElement.StyleProperty, typeof(ScrollBar));
     theScrollBar.VerticalAlignment = VerticalAlignment.Top;
     theScrollBar.Orientation       = System.Windows.Controls.Orientation.Horizontal;
     theScrollBar.SmallChange       = 12.0;
     theScrollBar.Minimum           = 0;
     UpdateVisibility();
 }