Set TextBlock to preserve white space at the beginning and at the end?

后端 未结 3 1262
不思量自难忘°
不思量自难忘° 2021-02-05 05:45

EDIT:

The code below actually works as I want - this question a little misleading. Please ignore it.


Normally when I set Text property of <

3条回答
  •  走了就别回头了
    2021-02-05 06:26

    Re: "I just hope you are not using this to align your text. There are many other more elegant methods to do so."

    Sounds like you might want to use the Padding property: http://msdn.microsoft.com/en-us/library/system.windows.controls.textblock.padding(VS.85).aspx.

    See also the various alignment & margin properties.

提交回复
热议问题