CanOz Blog

Neil Knobbe's Blog at vbCity

This blog hosted by:
http://blogs.vbcity.com      
  Home :: Syndication  :: Login

MarApril 2008May
SMTWTFS
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

Archives

Image Galleries

vbCity Blogs

Thursday, April 24, 2008 #

Ok, let’s call this page 22,492 in the book of things I did not know about Visual Studio 2005.

I was reading something the other day, if I can remember or find it I will post up a link, and was surprised that I had missed this little bit before. 

(I have recently been reading “WPF for those who know Windows Forms” that can be found here  and watching webcasts by William Steele on his WPF Soup To Nuts series so it could have could have come from one of those.)

What was mentioned was having both text and an image on a button.  I knew it was possible, but I didn’t know just how easy it was to do.

By default when you add an image to the button the text of the button is overlays the image.

There is a property of a button which helps us set the relation of the text to the image.  This name of this property is TextImageRelation.


The TextImageRelation property has five options:

  • Overlay
  • Image over text
  • Text over image
  • Image before text
  • Text before image

The options are pretty much self explanatory.  Below are screen shots showing the different positions.

Image over text:

Text over image:

Image before text:

and lastly

Text before image:

posted @ 7:17 PM | Feedback (0)