Example #1
0
 public override void Draw(IDrawingGraphics g)
 {
     g.Style(this.Style);
     if (clickTimer != null){
     g.Bold(true);
     }
     g.DrawText(this.Text);
 }
Example #2
0
 public override void Draw(IDrawingGraphics g)
 {
     g.Style(this.Style);
     if (clickTimer != null)
     {
         g.Bold(true);
     }
     g.DrawText(this.Text);
 }
Example #3
0
        public override void Draw(IDrawingGraphics drawingGraphics)
        {
            drawingGraphics.Style(this.Style);

            switch (this.AutoSizeMode)
            {
                case AutoSizeModeOptions.None:
                case AutoSizeModeOptions.OneLineAutoHeight:
                    drawingGraphics.DrawText(this.text);
                    break;
                case AutoSizeModeOptions.WrapText:
                    drawingGraphics.DrawMultiLineText(this.text, this.Size.Width, this.Size.Height);
                    break;
            }
        }
Example #4
0
        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);
        }
Example #5
0
 public override void Draw(IDrawingGraphics g)
 {
     g.Style(this.Style);
     if (clickTimer != null){
     g.Bold(true);
     }
     g.DrawText(this.Text);
     /*
             g
             .DrawImage(icon, 10, 0, icon_width, icon_width)
             .PenWidth(3)
             .Style(HOBD.theme.PhoneTextNormalStyle)
             .MoveTo(icon_width + 10, 0)
             .DrawMultiLineText(alabel, g.Width - g.X)
             .MoveX(icon_width + 10)
             .Style(HOBD.theme.PhoneTextSmallStyle)
             .DrawText(value)
     */
 }
Example #6
0
        public override void Draw(IDrawingGraphics g)
        {
            g.Style(this.Style);
            if (clickTimer != null)
            {
                g.Bold(true);
            }
            g.DrawText(this.Text);

            /*
             *          g
             *          .DrawImage(icon, 10, 0, icon_width, icon_width)
             *          .PenWidth(3)
             *          .Style(HOBD.theme.PhoneTextNormalStyle)
             *          .MoveTo(icon_width + 10, 0)
             *          .DrawMultiLineText(alabel, g.Width - g.X)
             *          .MoveX(icon_width + 10)
             *          .Style(HOBD.theme.PhoneTextSmallStyle)
             *          .DrawText(value)
             */
        }
Example #7
0
        public override void Draw(IDrawingGraphics drawingGraphics)
        {
            if (this.needUpdate)
            {
                this.Relayout(drawingGraphics);
                this.needUpdate = false;
            }

            drawingGraphics.Style(this.Style);

            switch (this.AutoSizeMode)
            {
            case AutoSizeModeOptions.None:
            case AutoSizeModeOptions.OneLineAutoHeight:
                drawingGraphics.DrawText(this.text);
                break;

            case AutoSizeModeOptions.WrapText:
                drawingGraphics.DrawMultiLineText(this.text, this.Size.Width, this.Size.Height);
                break;
            }
        }
Example #8
0
        public override void Draw(IDrawingGraphics drawingGraphics)
        {
            var ctext = text;

            if (this.needUpdate)
            {
                DoRelayout(drawingGraphics);
                this.needUpdate = false;
            }

            drawingGraphics.Style(this.Style);

            /* WTF????
            if (this.AutoSizeMode == AutoSizeModeOptions.None ||
                this.AutoSizeMode == AutoSizeModeOptions.OneLineAutoHeightFixedWidth)
            {
                while (TextSize.Width.ToPixels() > this.Width)
                {
                    ctext = ctext.Substring(0, ctext.Length-3)+"..";
                    Relayout(drawingGraphics, ctext);
                }
            }
            */

            switch (this.AutoSizeMode)
            {
                case AutoSizeModeOptions.None:
                case AutoSizeModeOptions.OneLineAutoHeightFixedWidth:
                case AutoSizeModeOptions.OneLineAutoHeight:
                    drawingGraphics.DrawText(ctext);
                    break;
                case AutoSizeModeOptions.WrapText:
                    drawingGraphics.DrawMultiLineText(ctext, this.Size.Width, this.Size.Height);
                    break;
            }
        }