xaml - images does not display at run time -
i have come cross weird problem in windows phone 8 when set source of image in xaml shows correctly in designer view when run application no image appears have made new empty application.
<grid x:name="contentpanel" grid.row="1" margin="12,0,12,0"> <image visibility="visible" source="assets\tiles\flipcycletilemedium.png" horizontalalignment="left" height="321" margin="61,192,0,0" verticalalignment="top" width="359"/> </grid>
this xaml code have used now: replace mainpage.xaml code , run app. see image in app definitely. here's screenshot.

<phone:phoneapplicationpage x:class="phoneapp1.mainpage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:microsoft.phone.controls;assembly=microsoft.phone" xmlns:shell="clr-namespace:microsoft.phone.shell;assembly=microsoft.phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:ignorable="d" fontfamily="{staticresource phonefontfamilynormal}" fontsize="{staticresource phonefontsizenormal}" foreground="{staticresource phoneforegroundbrush}" supportedorientations="portrait" orientation="portrait" shell:systemtray.isvisible="true"> <grid x:name="layoutroot" background="transparent"> <grid.rowdefinitions> <rowdefinition height="auto"/> <rowdefinition height="*"/> </grid.rowdefinitions> <stackpanel x:name="titlepanel" grid.row="0" margin="12,17,0,28"> <textblock text="my application" style="{staticresource phonetextnormalstyle}" margin="12,0"/> <textblock text="page name" margin="9,-7,0,0" style="{staticresource phonetexttitle1style}"/> </stackpanel> <grid x:name="contentpanel" grid.row="1" margin="12,0,12,0"> <image visibility="visible" source="assets\tiles\flipcycletilemedium.png" horizontalalignment="left" height="321" margin="61,192,0,0" verticalalignment="top" width="359"/> </grid> </grid>
Comments
Post a Comment