Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

How to set indent of individual text in rich text box?

$
0
0

Hi

I want to set the alignment of text individually. I mean, when a user selects a combobox item, the text he is going to type should center align and must have 150 indent from left and right. I able to achieve center alignment but could not able to figure out a way to indent.

For center alignment, I am using,

richTextBox.Selection.ApplyPropertyValue(Paragraph.TextAlignmentProperty, TextAlignment.Center);

Now I want to set the indent. I am not sure but below code must have a solution which I cant able to figure out;

richTextBox.Selection.ApplyPropertyValue(Paragraph.TextIndentProperty, xxxxxxxxxxxxx);

Hope you understand my requirement.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>