コード例 #1
0
ファイル: TreeView.cs プロジェクト: prepare/HTML-Renderer
 SimpleBox panel; //panel 
 public TreeView(int width, int height)
     : base(width, height)
 {
     //panel for listview items
     this.panel = new SimpleBox(width, height);
     panel.ContentLayoutKind = BoxContentLayoutKind.VerticalStack;
     panel.BackColor = Color.LightGray;
     uiList = new UICollection(this);
     uiList.AddUI(panel);
 }
コード例 #2
0
ファイル: ListView.cs プロジェクト: prepare/HTML-Renderer
        public ListView(int width, int height)
            : base(width, height)
        {
            uiList = new UICollection(this);
            //panel for listview items
            //
            var simpleBox = new SimpleBox(width, height);
            simpleBox.ContentLayoutKind = BoxContentLayoutKind.VerticalStack;
            simpleBox.BackColor = Color.LightGray;
            simpleBox.MouseDown += panel_MouseDown;
            simpleBox.MouseDoubleClick += panel_MouseDoubleClick;
            simpleBox.AcceptKeyboardFocus = true;
            simpleBox.KeyDown += simpleBox_KeyDown;

            this.panel = simpleBox;
            uiList.AddUI(panel);
        }
コード例 #3
0
ファイル: 0_EaseBox.cs プロジェクト: prepare/HTML-Renderer
        public void AddChild(UIElement ui)
        {
            if (this.uiList == null)
            {
                this.uiList = new UICollection(this);
            }

            needContentLayout = true;
            this.uiList.AddUI(ui);
            if (this.HasReadyRenderElement)
            {
                primElement.AddChild(ui);
                if (this.panelLayoutKind != BoxContentLayoutKind.Absolute)
                {
                    this.InvalidateLayout();
                }
            }

            if (ui.NeedContentLayout)
            {
                ui.InvalidateLayout();
            }
        }