// public TitleBar() { // control button setup _minimizeEnable = true; _maximizeEnable = true; // img setup _normalImg = SvgPath8x8Mgr.Get(SvgPathBx8Constants.ControlButtons.Normal, 2, Brushes.Black, SmoothingMode.Default); _maximizeImg = SvgPath8x8Mgr.Get(SvgPathBx8Constants.ControlButtons.Maximized, 2, Brushes.Black, SmoothingMode.Default); _minimizeButton = new TitleBarControlButton { Image = SvgPath8x8Mgr.Get(SvgPathBx8Constants.ControlButtons.Minimize, 2, Brushes.Black, SmoothingMode.Default) }; _maximizeButton = new TitleBarControlButton { Image = _normalImg }; _closeButton = new TitleBarControlButton { Image = SvgPath8x8Mgr.Get(SvgPathBx8Constants.ControlButtons.Close, 2, Brushes.Black, SmoothingMode.Default) }; _textBrush = BrushCreator.CreateSolidBrush(); _hoverBrush = BrushCreator.CreateSolidBrush("#FFF0F0F0"); _controlButtonPen = PenCreator.Create(); DoubleBuffered = true; }
// public Table() { SetStyle(ControlStyles.SupportsTransparentBackColor, true); DoubleBuffered = true; // Colors = new TableColors(); // _headerRow = new List <Cell>(); _dataRows = new List <List <Cell> >(); _columns = new List <Column>(); // _selectedRows = new List <int>(); // _headerFont = new Font(Font.FontFamily, Font.Size + 2, FontStyle.Bold); _stringFormat = new StringFormat() { Alignment = StringAlignment.Near, LineAlignment = StringAlignment.Center }; // _dataBgSelectedBr = BrushCreator.CreateSolidBrush(Colors.DataBgSelected); _dataTextSelectedBr = BrushCreator.CreateSolidBrush(Colors.DataTextSelected); _dataBgBr = BrushCreator.CreateSolidBrush(Colors.DataBg); _dataTextBr = BrushCreator.CreateSolidBrush(Colors.DataText); _dataBgHoverBr = BrushCreator.CreateSolidBrush(Colors.DataBgHover); _dataTextHoverBr = BrushCreator.CreateSolidBrush(Colors.DataTextHover); _headerBgBr = BrushCreator.CreateSolidBrush(Colors.HeaderBg); _headerTextBr = BrushCreator.CreateSolidBrush(Colors.HeaderText); _verticalScrollThumbBgBr = BrushCreator.CreateSolidBrush(Colors.VerticalScrollThumbBg); _separateLinePen = PenCreator.Create(Colors.SeparatedDataLine); }
public VerticalLine() { _colors = new LineColors(); _linePen = PenCreator.Create(_colors.LineColor, 1); DoubleBuffered = true; SetStyle(ControlStyles.SupportsTransparentBackColor, true); Start = new Point(1, 0); LineWeight = 1; }
public HorizontalLine() { _lineColors = new LineColors(); _linePen = PenCreator.Create(_lineColors.LineColor, 1f); DoubleBuffered = true; SetStyle(System.Windows.Forms.ControlStyles.SupportsTransparentBackColor, true); start = new Point(0, 1); LineWeight = 1; }
public FlatButton() { SetStyle(ControlStyles.Selectable, false); SetStyle(ControlStyles.SupportsTransparentBackColor, true); DoubleBuffered = true; Height = 40; _iconPadding = 12; _iconSize = 16; _iconRect = new Rectangle(_iconPadding, _iconPadding, _iconSize, _iconSize); _borderPen = PenCreator.Create(Color.Black); }
public override void Draw(Graphics g, Rectangle r) { int step = GetStepNeeded(r.Width, r.Height, StepX, StepY); if (step == 0) { return; } int x = 0; int y = 0; for (int i = 0; i <= step; i++) { if (StepX != 0 && StepY != 0) { g.DrawLine( PenCreator.Create(Color, 1f), // Pen 0, y /*Point 1*/, x, 0 /*Point 2*/); if (Mirror) { g.DrawLine( PenCreator.Create(Color, 1f), // Pen r.Width, y /*Point 1*/, r.Width - x, 0 /*Point 2*/); } } else if (StepX == 0) { // ignore x, draw horizontal line g.DrawLine( PenCreator.Create(Color, 1f), // Pen 0, y /*Point 1*/, r.Width, y /*Point 2*/); } else { // ignore y, draw vertical line g.DrawLine( PenCreator.Create("40, 40, 40", 1f), // Pen x, 0 /*Point 1*/, x, r.Height /*Point 2*/); } x += StepX; y += StepY; } }
// public Button() { _colors = new ButtonColors(); // _borderPen = PenCreator.Create(Colors.Border, 2f); _borderPen.Alignment = PenAlignment.Inset; _backgroundBrush = BrushCreator.CreateSolidBrush(_colors.Bg); _textBrush = BrushCreator.CreateSolidBrush(_colors.Text); _textFormat = new StringFormat() { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center }; DoubleBuffered = true; SetStyle(ControlStyles.SupportsTransparentBackColor, true); }
// public NavigationBar() { _enableHighlightReveal = false; // _navBarItems = new List <NavBarItemWrapper>(); // // add collapse button _collapsingImage = SvgPath8x8Mgr.Get("M5 1v2h-5v2h5v2l3-3.03-3-2.97z" /*=>*/, 4, Brushes.Black, SmoothingMode.HighQuality); _expadingImage = SvgPath8x8Mgr.Get("M3 1l-3 3.03 3 2.97v-2h5v-2h-5v-2z" /*<=*/, 4, Brushes.Black, SmoothingMode.HighQuality); _collapseExpandItem = new NavBarItemWrapper(new NavBarItem { Icon = _expadingImage, Clicked = (s, e) => { _collapsing = !_collapsing; _collapseExpandItem.Icon = _collapsing ? _collapsingImage : _expadingImage; this.Width = _collapsing ? _itemHeight : _expandedWidth; UpdatePosition(); if (OnCollapseExpandStateChanged != null) { OnCollapseExpandStateChanged(this, EventArgs.Empty); } } }); _expandedWidth = 200; // _navBackgroundBrush = BrushCreator.CreateSolidBrush(); _navItemBackgroundBrush = BrushCreator.CreateSolidBrush(); _navClickedItemBrush = BrushCreator.CreateSolidBrush(); _navItemTextBrush = BrushCreator.CreateSolidBrush("255, 0, 0, 0"); _navItemBorderPen = PenCreator.Create(); DoubleBuffered = true; SetStyle(ControlStyles.SupportsTransparentBackColor, true); }
public override void Draw(Graphics g, Rectangle r) { g.DrawRectangle(PenCreator.Create("#0"), r); }