Hi, I am rendering the FormattedText with different foreground color to different character(fore example first two red, next 2 yellow like..), now i have to display outline surrounded to this text. For apply outline(stroke) i have to convert this FormattedText into geometry and then draw geometry like
Geometry textGeometry = FormattedText.BuildGeometry(new Point(_xOffset, _yOffset)); drawingContext.DrawGeometry(null, new Pen(new SolidColorBrush(OutlineColor), storkeWidth),textGeometry);
but the problem is that it will render the FormattedText in red color and lost my formatting color. am I missing something or there is another way to outline the text.