コード例 #1
0
ファイル: Pager.cs プロジェクト: groov0v/edriven-gui
        public override void Initialize()
        {
            base.Initialize();

            Layout = new HorizontalLayout
            {
                VerticalAlign = VerticalAlign.Middle,
                Gap = 2
            };
        }
コード例 #2
0
ファイル: Toolbar.cs プロジェクト: groov0v/edriven-gui
        /*private readonly TweenFactory _showEffect = new TweenFactory(
            new Sequence(
                new ToolbarShow()
            )
        );*/

        public Toolbar()
        {
            PercentWidth = 100;
            /*SetStyle("showBackground", true);
            SetStyle("backgroundColor", ColorMixer.FromHex(0x439dde).ToColor());*/
            //SetStyle("addedEffect", _showEffect);

            Layout = new HorizontalLayout
            {
                VerticalAlign = VerticalAlign.Middle,
                PaddingLeft = 10,
                PaddingRight = 10,
                PaddingTop = 10,
                PaddingBottom = 10,
                Gap = 10
            };
        }
コード例 #3
0
        private LayoutBase GetLayout(bool isVertical)
        {
            if (isVertical)
            {
                if (null == _vertCached) // create once
                {
                    _vertCached = new VerticalLayout
                    {
                        HorizontalAlign = HorizontalAlign.Center,
                        VerticalAlign = VerticalAlign.Middle
                    };
                }
                _vertCached.Gap = (int)GetStyle("gap"); /*Gap = (IconDisplay.Visible && null != LabelDisplay && !string.IsNullOrEmpty(LabelDisplay.Text)) ?  (int)GetStyle("gap") : 0*/
                _vertCached.PaddingLeft = (int)GetStyle("paddingLeft");
                _vertCached.PaddingRight = (int)GetStyle("paddingRight");
                _vertCached.PaddingTop = (int)GetStyle("paddingTop");
                _vertCached.PaddingBottom = (int)GetStyle("paddingBottom");
                return _vertCached;
            }

            if (null == _horizCached) // create once
            {
                _horizCached = new HorizontalLayout
                {
                    HorizontalAlign = HorizontalAlign.Center,
                    VerticalAlign = VerticalAlign.Middle
                };
            }
            _horizCached.Gap = (int)GetStyle("gap");
            _horizCached.PaddingLeft = (int)GetStyle("paddingLeft");
            _horizCached.PaddingRight = (int)GetStyle("paddingRight");
            _horizCached.PaddingTop = (int)GetStyle("paddingTop");
            _horizCached.PaddingBottom = (int)GetStyle("paddingBottom");
            return _horizCached;
        }