public XCoolForm() { // set control styles: this.SetStyle( ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer | ControlStyles.UserPaint | ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor, true ); this.FormBorderStyle = FormBorderStyle.None; this.MinimumSize = new Size(400, 400); this.Padding = new Padding(8); // initialize titlebar buttons: m_xTitleBar.TitleBarButtons.Add(new XTitleBarButton(XTitleBarButton.XTitleBarButtonType.Close)); m_xTitleBar.TitleBarButtons.Add(new XTitleBarButton(XTitleBarButton.XTitleBarButtonType.Maximize, Color.FromArgb(3, 63, 126), Color.FromArgb(119, 217, 246))); m_xTitleBar.TitleBarButtons.Add(new XTitleBarButton(XTitleBarButton.XTitleBarButtonType.Minimize, Color.FromArgb(124, 13, 2), Color.FromArgb(251, 164, 48))); // initialize mix: m_MenuIconMix.Add(Color.FromArgb(112, 106, 108)); m_MenuIconMix.Add(Color.FromArgb(56, 52, 53)); m_MenuIconMix.Add(Color.FromArgb(53, 49, 50)); m_MenuIconMix.Add(Color.FromArgb(71, 71, 71)); m_MenuIconMix.Add(Color.FromArgb(112, 106, 108)); m_xtbHolder = new XTitleBarIconHolder(this); }
public XCoolForm() { // set control styles: this.SetStyle( ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer | ControlStyles.UserPaint | ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor, true ); this.FormBorderStyle = FormBorderStyle.None; this.MinimumSize = new Size(400, 400); this.Padding = new Padding( 8 ); // initialize titlebar buttons: m_xTitleBar.TitleBarButtons.Add(new XTitleBarButton(XTitleBarButton.XTitleBarButtonType.Close)); m_xTitleBar.TitleBarButtons.Add(new XTitleBarButton(XTitleBarButton.XTitleBarButtonType.Maximize, Color.FromArgb(3, 63, 126),Color.FromArgb(119,217, 246))); m_xTitleBar.TitleBarButtons.Add(new XTitleBarButton(XTitleBarButton.XTitleBarButtonType.Minimize, Color.FromArgb(124, 13, 2),Color.FromArgb(251, 164, 48))); // initialize mix: m_MenuIconMix.Add(Color.FromArgb(112, 106, 108)); m_MenuIconMix.Add(Color.FromArgb(56, 52, 53)); m_MenuIconMix.Add(Color.FromArgb(53, 49, 50)); m_MenuIconMix.Add(Color.FromArgb(71, 71, 71)); m_MenuIconMix.Add(Color.FromArgb(112, 106, 108)); m_xtbHolder = new XTitleBarIconHolder(this); }