0

I start develop for WP and, i need do simple think - add to text border.

Something like this

enter image description here

In Android i do this very simple

 @Override
    protected void onDraw(Canvas canvas) {

        final ColorStateList textColor = getTextColors();

        TextPaint paint = this.getPaint();

        paint.setStyle(Paint.Style.STROKE);
        paint.setStrokeJoin(Paint.Join.ROUND);
        paint.setStrokeMiter(10);
        this.setTextColor(getResources().getColor(R.color.gs_ColorWhite));
        paint.setStrokeWidth(48);

        super.onDraw(canvas);
        paint.setStyle(Paint.Style.FILL);

        setTextColor(textColor);
        super.onDraw(canvas);
    }

But, i can't find how to do this in Windows Phone platform.

Dmitry Nelepov
  • 7,246
  • 8
  • 53
  • 74

1 Answers1

0

I don't think that kind of outline is supported on Windows Phone.

See WP 8.1 Text-Outline question.,

However I think it's pretty easy to do with Win2D with their Canvas.Geometry from text. Win2D release note.

Basically create your own control with Win2D -> Create the Text Geometry with the text with the correct properties -> Paint on canvas -> Paint your other text.

Community
  • 1
  • 1
Chubosaurus Software
  • 8,133
  • 2
  • 20
  • 26