xaml - Image in button is rendering in the designer but not the windows phone emulator (Windows App Developement) -


the designer loads image button emulator loads without image. can conjecture might 'image rendering beyond screen' issue. suggestions code appreciated.

the designer visible 2 images dividing screen(supposedly buttons), while emulator shows half screen black , rest of grey divided horizontally.

<grid>         <grid.rowdefinitions>             <rowdefinition height=".5*"/>             <rowdefinition height=".5*"/>         </grid.rowdefinitions>          <button              x:name="cricketbutton" grid.row="0"             height="auto" width="auto"             horizontalalignment="stretch"              margin="-5" verticalalignment="stretch"               click="cricketbutton_click"             fontsize="25" requestedtheme="light" opacity="0.9" borderthickness="0">                 <image source="assets\cricket-hd-wallpapers.jpg" stretch="fill" opacity="0.7"/>                 <!--<textblock text="cricket" horizontalalignment="right"  verticalalignment="bottom"  foreground="white"                             fontsize="72"/>-->         </button>          <button              x:name="football" grid.row="1"             horizontalalignment="stretch"              height="auto" width="auto"             margin="-5"             verticalalignment="stretch"             click="football_click"             fontsize="25"              requestedtheme="light" opacity="0.9" background="#ffc7c7c7" borderthickness="0">                 <image source="assets\real-madrid-granada.jpg" opacity="0.9" stretch="fill"/>         </button>     </grid> 

it not able resolve file location during run time. need make sure include image in build.

http://www.wpfsharp.com/2012/01/23/using-relative-path-images-included-as-content-with-wpf/


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -