public override void Draw(IDrawingGraphics drawingGraphics) { drawingGraphics.Color(MetroTheme.PhoneAccentBrush); drawingGraphics.FillRectangle(0, 0, this.Size.Width, this.Size.Height); m_Icon.Draw(drawingGraphics.CreateChild(m_Icon.Location, m_Icon.TransformationScaling, m_Icon.TransformationCenter)); m_Text.Draw(drawingGraphics.CreateChild(m_Text.Location, m_Text.TransformationScaling, m_Text.TransformationCenter)); }
public override void Draw(IDrawingGraphics drawingGraphics) { // field border drawingGraphics.Color(MetroTheme.PhoneAccentBrush); drawingGraphics.FillRectangle(0, 0, Size.Width, Size.Height); // font example drawingGraphics.Style(new TextStyle(_textStyle.FontFamily, _textStyle.FontSize, _textStyle.Foreground)); drawingGraphics.MoveRelX(4).DrawText(Caption()); base.Draw(drawingGraphics); }
public override void Draw(IDrawingGraphics drawingGraphics) { drawingGraphics.Color(MetroTheme.PhoneTextBoxBrush); drawingGraphics.FillRectangle(0, 0, Size.Width, Size.Height); drawingGraphics.Color(MetroTheme.PhoneTextBoxBorderBrush); drawingGraphics.PenWidth(MetroTheme.PhoneBorderThickness.BorderThickness.Pixels); drawingGraphics.DrawRectangle(0, 0, Size.Width, Size.Height); drawingGraphics.Style(this.Style); if (MultiLine) drawingGraphics.DrawMultiLineText(this._text, this.Size.Width, this.Size.Height); else drawingGraphics.DrawText(this._text); }
public override void Draw(IDrawingGraphics drawingGraphics) { drawingGraphics.Color(Color.Gray); drawingGraphics.FillRectangle(0, 0, Size.Width, Size.Height - 10); base.Draw(drawingGraphics); }
public override void Draw(IDrawingGraphics drawingGraphics) { if (m_pressed) { drawingGraphics.Color(this.BorderColor); drawingGraphics.FillRectangle(0, 0, 40, 40); } else if (m_checked) { drawingGraphics.Color(this.BorderColor); drawingGraphics.PenWidth(2); drawingGraphics.DrawRectangle(0, 0, 40, 40); drawingGraphics.FillRectangle(5, 5, 35, 35); } else { // unchecked unpressed drawingGraphics.Color(this.BackgroundColor); drawingGraphics.FillRectangle(0, 0, 40, 40); drawingGraphics.Color(this.BorderColor); drawingGraphics.PenWidth(2); drawingGraphics.DrawRectangle(0, 0, 40, 40); } drawingGraphics.Style(this.Style); switch (this.AutoSizeMode) { case AutoSizeModeOptions.None: case AutoSizeModeOptions.OneLineAutoHeight: drawingGraphics.MoveX(60).DrawText(m_text); break; case AutoSizeModeOptions.WrapText: drawingGraphics.MoveX(60).DrawMultiLineText(m_text, this.Size.Width, this.Size.Height); break; } }
public override void Draw(IDrawingGraphics drawingGraphics) { if (m_pressed) { drawingGraphics.Color(BorderColor); drawingGraphics.FillRectangle(0, 0, this.Size.Width, this.Size.Height); drawingGraphics.Style(new TextStyle(Style.FontFamily, Style.FontSize, BackgroundColor)); } else { drawingGraphics.Color(BackgroundColor); drawingGraphics.FillRectangle(0, 0, this.Size.Width, this.Size.Height); drawingGraphics.Color(this.BorderColor); drawingGraphics.PenWidth(3); drawingGraphics.DrawRectangle(0, 0, this.Size.Width, this.Size.Height); drawingGraphics.PenWidth(1); drawingGraphics.Style(this.Style); } switch (this.AutoSizeMode) { case AutoSizeModeOptions.None: case AutoSizeModeOptions.OneLineAutoHeight: { int width = drawingGraphics.CalculateTextWidth(m_text); drawingGraphics.MoveX((this.Size.Width - width) / 2).DrawText(m_text); break; } case AutoSizeModeOptions.WrapText: drawingGraphics.DrawMultiLineText(m_text, this.Size.Width, this.Size.Height); break; } }
public override void Draw(IDrawingGraphics drawingGraphics) { drawingGraphics.Color(MetroTheme.PhoneTextBoxBrush); drawingGraphics.FillRectangle(0, 0, Size.Width, Size.Height); drawingGraphics.Color(MetroTheme.PhoneTextBoxBorderBrush); drawingGraphics.PenWidth(MetroTheme.PhoneBorderThickness.BorderThickness.Pixels); drawingGraphics.DrawRectangle(0, 0, Size.Width, Size.Height); base.Draw(drawingGraphics); }
private void DrawColor(IDrawingGraphics drawingGraphics, object arg) { drawingGraphics.Color(((ColorItem) arg).Color); drawingGraphics.FillRectangle(1, 9, 35, 44); }