コード例 #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;
        }
コード例 #3
0
        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;
        }