c# - wpf forms not displaying images -
i using vs 2013 , designing wpf form. problem when design button image displays when run project isn't displaying images on button.
code
<button x:name="btncommunication" margin="428,138,448,338" click="btncommunication_click" width="auto" foreground="#ff007eff"> <button.style> <style targettype="{x:type button}"> <setter property="background" value="purple"/> <setter property="template"> <setter.value> <controltemplate targettype="{x:type button}"> <border background="{templatebinding background}"> <contentpresenter horizontalalignment="center" verticalalignment="center"/> </border> </controltemplate> </setter.value> </setter> <style.triggers> <trigger property="ismouseover" value="true"> <setter property="background" value="greenyellow"/> </trigger> </style.triggers> </style> </button.style> <grid verticalalignment="center" horizontalalignment="left" height="236" width="350"> <grid.columndefinitions> <columndefinition width="auto"/> <columndefinition width="auto"/> </grid.columndefinitions> <image grid.column="0" margin="0,0,-80,41" source="images/communication.png" width="135" height="195" horizontalalignment="center" verticalalignment="center" rendertransformorigin="0.525,0.37" /> <textblock grid.column="1" margin="0,174,-128,30" text="communication mode" horizontalalignment="center" verticalalignment="center" foreground="white" fontsize="28" grid.columnspan="2"/> </grid> </button>
hope !!
i cleared margin , ok me!
using margin not way layering! layering it's better use layering elements.such stackpanel , etc.
Comments
Post a Comment