How to vertical center a text |
Post Reply |
Author | |
fjosesen
Groupie Joined: 30 June 2008 Status: Offline Points: 49 |
Post Options
Thanks(0)
Posted: 04 June 2010 at 5:52am |
Hi,
Due to the bug with the disabling of a checkbox, I'm trying to simulate it with an image and a text at the side. I'm trying to define a text vertically centered with this code without success:
<TextBlock Height="26" VerticalAlignment='Center'>
Is there any way I can perform this drawing?
Regards,
Jose
|
|
Products: Suite Pro (ActiveX) v18.0.1
Toolkit Pro (MFC) v18.0.1 Platform: Windows 10 (64bit) Language: VC++ 2013 (MFC) |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
I tried that code in the MarkupPad and the text is vertically centered - unless the TextBlock is the child of another tag (for example, a StackPanel), and then I had to set the VerticalAlignment attribute to Center for the parent as well.
If you are still unable to get the TextBlock vertically centered, can you post your complete XAML so I can see if I can figure out why it's not centering? |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |