Posted in xn--kfs74mzzid01b.com edit by admin on January 7th, 2009
Hello,
Can any one tell me how to make image buttons in xaml.
GauravThanks. What i really wanted was if i convert an image to button in blend, is it possible to dynamically pass the image and text in the same button? Try the following link: http://infosysblogs.com/microsoft/2007/04/wpf_assigning_icon_to_image_co.html :)Try the following link: http://infosysblogs.com/microsoft/2007/04/wpf_assigning_icon_to_image_co.html :)Use Expressions, the new MS suite.Thanks for the helpgaurav - no, that probably won't work. What you need to do is create a user control and register dependency properties for the image and text. Once you have done that, you will be able to use it in Blend to change the image, etc.
For example, here is a sample zip file for a user control that allows you to change the text and background color: http://www.kirupa.com/blend_wpf/code/CustomControl.zip Open the InfoRectangle.xaml/.cs files to see what I mean about registering dependency properties so that you can access them via Blend's Miscellaneous panel.
You can learn a bit more about user controls in a blog post I made yesterday: http://blog.kirupa.com/?p=126
:s:#If you have any other info about this subject , Please add it free.# |
|