Justify Text on Windows Phone

Asked

Viewed 146 times

0

I have an application that the text is displayed in a textBlock and I want to make this text justified, I tried to put the alignment of the text as justified, but it was not, says that the method is not supported.

I have been answered before with the link to this article ( https://msdn.microsoft.com/en-us/library/system.windows.controls.richtextbox(v=vs.95). aspx? Cs-save-lang=1&Cs-lang=csharp#code-snippet-4 ), but it didn’t work.

There is another component for Windows Phone that accepts justified text, if someone knows how to help me I will be very grateful, I need to fix it in my app ;(.

Thank you very much. Thank you

1 answer

0


I don’t know much about xaml, but according to the answer in Soen

You can use a RichTextBox to achieve the desired effect:

<RichTextBox TextAlignment="Justify" IsReadOnly="True">
    <Paragraph>
        Coloque o seu texto aqui
    </Paragraph>
</RichTextBox>

Note that in Desktop applications the problem seems not to occur with the TextBox

<TextBlock Text="Coloque o seu texto aqui"
           TextWrapping="Wrap"
           TextAlignment="Justify"></TextBlock>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.