AddUI() public method

public AddUI ( UIElement ui ) : void
ui UIElement
return void
Beispiel #1
0
 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);
 }
Beispiel #2
0
        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);
        }