Ejemplo n.º 1
0
        /// <summary>
        /// Render the <see cref="DXButton"/> onto the screen.
        /// </summary>
        public override void Render(RenderEventArgs e)
        {
            base.Render(e);
            DrawIcon(e.ControlHost.Device);
            Rectangle rect = new Rectangle(PointToScreen(Point.Empty), this.Size);

            CustomPainters.DrawBoundingRectangle(e.ControlHost, rect, Color.White);
            D3DFont.DrawString(null, this.Text, rect, DrawStringFormat.VerticalCenter | DrawStringFormat.Center, this.ForeColor);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Renders the <see cref="DXMenuItem"/>.
        /// </summary>
        public override void Render(RenderEventArgs e)
        {
            base.Render(e);
            if (this.Hovered)
            {
                DrawHighlight(e.ControlHost.Device);
            }
            DrawIcon(e.ControlHost.Device);
            Point     origin = PointToScreen(Point.Empty);
            Point     start  = new Point(origin.X + 35, origin.Y + 10);
            Rectangle rect   = new Rectangle(start, new Size(this.Width - 35, this.Height));

            D3DFont.DrawString(null, this.Text, rect, 0, this.ForeColor);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Renders the <see cref="DXCheckBox"/>.
        /// </summary>
        public override void Render(RenderEventArgs e)
        {
            Rectangle boxRect  = new Rectangle(PointToScreen(Point.Empty), new Size(14, 14));
            Rectangle textRect = new Rectangle(boxRect.X + 25, boxRect.Y, this.Size.Width - 25, this.Size.Height);

            ShadeBox(e.ControlHost.Device);
            if (this.isChecked)
            {
                Vector2[] checkedVerts = new Vector2[] {
                    new Vector2(boxRect.Right - 2, boxRect.Top + 2),
                    new Vector2(boxRect.Left + 5, boxRect.Bottom - 2),
                    new Vector2(boxRect.Left + 2, boxRect.Bottom - 6)
                };

                e.ControlHost.DrawLine(checkedVerts, Color.White);
            }
            CustomPainters.DrawBoundingRectangle(e.ControlHost, boxRect, Color.White);
            D3DFont.DrawString(null, this.Text, textRect, this.textFormat, this.ForeColor);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Renders the <see cref="DXTextBox"/>.
 /// </summary>
 public override void Render(RenderEventArgs e)
 {
     base.Render(e);
     CustomPainters.DrawBoundingRectangle(e.ControlHost, this.ScreenBounds, Color.White);
     D3DFont.DrawString(null, this.Text, this.ScreenBounds, DrawStringFormat.Left, this.ForeColor);
 }