예제 #1
0
        public ScrollContainer()
        {
            RectClipContent = true;

            Action <Range> ev = _scrollValueChanged;

            _hScrollBar = new HScrollBar {
                Visible = false
            };
            _vScrollBar = new VScrollBar {
                Visible = false
            };
            AddChild(_hScrollBar);
            AddChild(_vScrollBar);
            _hScrollBar.SetAnchorAndMarginPreset(LayoutPreset.BottomWide);
            _vScrollBar.SetAnchorAndMarginPreset(LayoutPreset.RightWide);
            _hScrollBar.OnValueChanged += ev;
            _vScrollBar.OnValueChanged += ev;
        }
예제 #2
0
        public ScrollContainer()
        {
            RectClipContent = true;

            Action <Range> ev = _scrollValueChanged;

            _hScrollBar = new HScrollBar
            {
                Visible             = false,
                SizeFlagsVertical   = SizeFlags.ShrinkEnd,
                SizeFlagsHorizontal = SizeFlags.Fill
            };
            _vScrollBar = new VScrollBar
            {
                Visible             = false,
                SizeFlagsVertical   = SizeFlags.Fill,
                SizeFlagsHorizontal = SizeFlags.ShrinkEnd
            };
            AddChild(_hScrollBar);
            AddChild(_vScrollBar);
            _hScrollBar.OnValueChanged += ev;
            _vScrollBar.OnValueChanged += ev;
        }
        public ScrollContainer()
        {
            MouseFilter     = MouseFilterMode.Pass;
            RectClipContent = true;

            Action <Range> ev = _scrollValueChanged;

            _hScrollBar = new HScrollBar
            {
                Visible             = false,
                VerticalAlignment   = VAlignment.Bottom,
                HorizontalAlignment = HAlignment.Stretch
            };
            _vScrollBar = new VScrollBar
            {
                Visible             = false,
                VerticalAlignment   = VAlignment.Stretch,
                HorizontalAlignment = HAlignment.Right
            };
            AddChild(_hScrollBar);
            AddChild(_vScrollBar);
            _hScrollBar.OnValueChanged += ev;
            _vScrollBar.OnValueChanged += ev;
        }