Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > MarkupLabel Control
  New Posts New Posts RSS Feed - How to vertical center a text
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to vertical center a text

 Post Reply Post Reply
Author
Message
fjosesen View Drop Down
Groupie
Groupie
Avatar

Joined: 30 June 2008
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote fjosesen Quote  Post ReplyReply Direct Link To This Post Topic: How to vertical center a text
    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)
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 04 June 2010 at 11:35am
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

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.