question

JimJupiter-5178 avatar image
0 Votes"
JimJupiter-5178 asked HuiLiu-MSFT commented

Round corners for a paragraph in a flow document without border lines

Hi

my flow document works but I would like to put round corners around my paragraph

How to do it?

Found this - but don't know how to do it - and it isn't exactly what I want

how-can-i-make-a-paragraph-corners-round



This is my code:

  Paragraph h1 = new Paragraph();
             h1.FontSize = 30;
             h1.Background = Brushes.LightGray;
             h1.TextAlignment = TextAlignment.Center;
             h1.Inlines.Add(new Run(">>>   Content   <<<"));
             doc.Blocks.Add(h1);


dotnet-csharpwindows-wpf
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,@ JimJupiter-5178. Paragraph is not a control but a TextElement. According to the definition of the Paragraph class, it seems that the angle cannot be set directly.
And we often use Border to set rounded corners. Therefore, it is difficult to set rounded corners for borderless paragraphs.

0 Votes 0 ·

Is it an editable or read-only document?

0 Votes 0 ·

Read Only

0 Votes 0 ·

Hi, @ JimJupiter-5178. Is there any progress on your problem? I can reproduce the code in SO, it seems the result is good. What do you mean by "it isn't exactly what I want", what result do you want? Could you show a picture with the desired effect?

0 Votes 0 ·

0 Answers