I want to reduce the width of the tab character in a TextBlock. The tabs are the equivalent of about 8 characters. I want to reduce to approximately 4 spaces.
TextBlock textBlock = new TextBlock
{
Text = "Some text\r\n\tLine with tab.\r\n\tAnother line",
};
What I see:
Some text
Line with tab.
Another line
What I want:
Some text
Line with tab.
Another line
How about replacing each occurrence of
\twith four (or a number of your choice)spaces?This approach could be implemented by modifying the code to