/// <summary> /// Initializes a new instance of the <see cref="Button"/> class. /// </summary> /// <param name="controlHost"></param> /// <param name="parent"></param> public DXButton(IDirectXControlHost controlHost, DXControl parent) : base(controlHost, parent) { this.ForeColor = Color.White; this.BackColor = Color.LightGray; this.BackColor2 = Color.DarkSlateGray; }
/// <summary> /// Initializes a new instance of the <see cref="DXListBox"/> control. /// </summary> /// <param name="controlHost"></param> /// <param name="parent"></param> public DXListBox(IDirectXControlHost controlHost, DXControl parent) : base(controlHost, parent) { this.BackColor = Color.White; this.BackColor2 = Color.LightGray; this.ForeColor = Color.Black; }
/// <summary> /// Initializes a new instance of the <see cref="DXMenuItem"/> class. /// </summary> /// <param name="controlHost"></param> /// <param name="parent"></param> public DXMenuItem(IDirectXControlHost controlHost, DXControl parent) : base(controlHost, parent) { this.parentMenu = (DXMenu)parent; this.BackColor = Color.DarkGray; this.BackColor2 = Color.DarkGray; this.ForeColor = Color.White; }
/// <summary> /// Initializes a new instance of the <see cref="DXComboBox"/> class. /// </summary> /// <param name="controlHost"></param> /// <param name="parent"></param> public DXComboBox(IDirectXControlHost controlHost, DXControl parent) : base(controlHost, parent) { this.BackColor = Color.White; this.ForeColor = Color.Black; this.scrollbar = new DXScrollBar(controlHost, parent); this.ControlHost.MouseActionPerformed += new EventHandler <DXMouseEventArgs>(ControlHost_MouseActionPerformed); }
/// <summary> /// Initializes a new instance of the <see cref="DXMenu"/> class. /// </summary> /// <param name="controlHost"></param> /// <param name="parent"></param> public DXMenu(IDirectXControlHost controlHost, DXControl parent) : base(controlHost, parent) { this.menuItems = new DXControlCollection(); this.menuItems.CollectionChanged += new CollectionChangeEventHandler(MenuItemsCollectionChanged); this.BackColor = Color.Tan; this.BackColor2 = Color.Tan; this.ForeColor = Color.White; }
void MenuItemsCollectionChanged(object sender, CollectionChangeEventArgs e) { int height = this.menuItems.Count * 32; this.Height = height; DXControl ctl = (DXControl)e.Element; if (e.Action == CollectionChangeAction.Add) { int width = CalcItemWidth(ctl.Text); if (width > this.Width) { this.Width = width; } ctl.Location = new Point(0, this.Height - 32); ctl.Size = new Size(this.Width, 32); ctl.Parent = this; this.Controls.Add(ctl); } else { this.Controls.Remove(ctl); } }
/// <summary> /// Initializes a new instance of the <see cref="DXScrollBar"/> class. /// </summary> /// <param name="controlHost"></param> /// <param name="parent"></param> public DXScrollBar(IDirectXControlHost controlHost, DXControl parent) : base(controlHost, parent) { }
/// <summary> /// Initializes a new instance of the <see cref="DXContainerControl"/> class. /// </summary> /// <param name="controlHost"></param> /// <param name="parent"></param> public DXContainerControl(IDirectXControlHost controlHost, DXControl parent) : base(controlHost, parent) { this.controls = new DXControlCollection(); }
/// <summary> /// Initializes a new instance of the <see cref="DXControl"/> class. /// </summary> /// <param name="controlHost"></param> /// <param name="parent"></param> public DXControl(IDirectXControlHost controlHost, DXControl parent) : this(controlHost) { this.parent = parent; }
/// <summary> /// Initializes a new instance of the <see cref="DXCheckBox"/> control. /// </summary> /// <param name="controlHost"></param> /// <param name="parent"></param> public DXCheckBox(IDirectXControlHost controlHost, DXControl parent) : base(controlHost, parent) { this.ForeColor = SystemColors.ControlText; this.textFormat = DrawStringFormat.Left; }
/// <summary> /// Initializes a new instance of the <see cref="DXLinkLabel"/> class. /// </summary> /// <param name="controlHost"></param> /// <param name="parent"></param> public DXLinkLabel(IDirectXControlHost controlHost, DXControl parent) : base(controlHost, parent) { this.ForeColor = Color.Blue; this.hoverColor = Color.Red; }
/// <summary> /// Initializes a new instance of the <see cref="DXListControl"/> class. /// </summary> /// <param name="controlHost"></param> /// <param name="parent"></param> protected DXListControl(IDirectXControlHost controlHost, DXControl parent) : base(controlHost, parent) { }
/// <summary> /// Initializes a new instance of the <see cref="DXLabel"/> class. /// </summary> /// <param name="controlHost"></param> /// <param name="parent"></param> public DXLabel(IDirectXControlHost controlHost, DXControl parent) : base(controlHost, parent) { this.ForeColor = Color.White; this.TextAlignment = TextAlign.Left; }
/// <summary> /// Initializes a new instance of the <see cref="DXPanel"/> class. /// </summary> /// <param name="controlHost"></param> /// <param name="parent"></param> public DXPanel(IDirectXControlHost controlHost, DXControl parent) : base(controlHost, parent) { InitializeComponent(); }