Esempio n. 1
0
 public CustomScrollBarAdapter(Orientation orientation, CustomScrollBarRenderer renderer)
 {
     switch(orientation)
     {
         case Orientation.Vertical:
             _scrollBar = new CustomVScrollbar() { Renderer = renderer };
             break;
         case Orientation.Horizontal:
             _scrollBar = new CustomHScrollbar() { Renderer = renderer };
             break;
         default:
             throw new ArgumentException("orientation");
     }
     _scrollBar.Scroll += OnScrollBarScroll;
     _scrollBar.ValueChanged += OnScrollBarValueChanged;
 }
Esempio n. 2
0
        public CustomScrollBarAdapter(Orientation orientation, CustomScrollBarRenderer renderer)
        {
            switch (orientation)
            {
            case Orientation.Vertical:
                _scrollBar = new CustomVScrollbar()
                {
                    Renderer = renderer
                };
                break;

            case Orientation.Horizontal:
                _scrollBar = new CustomHScrollbar()
                {
                    Renderer = renderer
                };
                break;

            default:
                throw new ArgumentException("orientation");
            }
            _scrollBar.Scroll       += OnScrollBarScroll;
            _scrollBar.ValueChanged += OnScrollBarValueChanged;
        }