I have been attempting to build 2 text segments into a text fragment, and I’d like to bold the 1st segment only. (The resultant segment should be thus; Label: Data ) When applying bold to a segment as such, it is not working on output. And if I apply bolding to the fragment, it will bold both segments in the fragment, which is not the desired output.
var labelAndValueFragment = new TextFragment();
TextSegment firstSegment = new TextSegment();
labelAndValueFragment.Segments.Add(firstSegment);
firstSegment.Text = stackedColumnProperty.ColumnText.Trim() + ": ";
firstSegment.TextState.ForegroundColor = Color.Parse("#000000");
firstSegment.TextState.FontStyle = FontStyles.Bold;
labelAndValueFragment.Margin.Bottom = 2;
TextSegment secondSegment = new TextSegment(propertyValue.Text);
labelAndValueFragment.Segments.Add(secondSegment);
cell.Paragraphs.Add(labelAndValueFragment);