c# - Data Sharing In between Xaml pages -
c# - Data Sharing In between Xaml pages -
i developing first windows phone app , weather app.i have list in main page display country name , current temperature.now when click on 1 country in list page navigated xaml page show detailed info weather conditions.
but problem facing when navigate xaml page there should give me detailed contents of next country in list in same format previous.
can know how possible pretty new in field.
thanks in advance
code list
<phone:longlistselector x:name="mainlonglistselector" datacontext="{binding listdata}" isgroupingenabled="false" > <phone:longlistselector.itemtemplate> <datatemplate> <stackpanel orientation="horizontal" grid.column="0"> <image name="condition" source="{binding imagetype}" height="80" /> <grid horizontalalignment="center" > <stackpanel grid.column="1" horizontalalignment="center" tap="stackpanel_tap" height="100" width="270" > <textblock name="countryname" text="{binding country}" fontfamily="times new roman" textwrapping='wrap' style="{staticresource phonetextextralargestyle}" fontsize="25" width="250" height="30"/> <textblock name="temp" text="{binding temp}" fontfamily="times new roman" textwrapping="wrap" style="{staticresource phonetextextralargestyle}" fontsize="20" width="250" height="25" ></textblock> </stackpanel> </grid> <grid horizontalalignment="right" > <stackpanel orientation="horizontal" horizontalalignment="right" grid.column="3"> <image name="button" source="{binding remove}" height="75" width="75" stretch="none" horizontalalignment="right" tap="button_tap"/> </stackpanel> </grid> </stackpanel> </datatemplate> </phone:longlistselector.itemtemplate> </phone:longlistselector>
code detailed xaml page
<textblock horizontalalignment="left" margin="60,432,0,0" textwrapping="wrap" text="{binding windspeed}" verticalalignment="top"/> <textblock horizontalalignment="left" text="{binding temperature}" fontfamily="segoewplight" fontsize="240" margin="44.791,43.086,0,0" textwrapping="wrap" verticalalignment="top" width="374.478" height="363.881" rendertransformorigin="0.5,0.5" uselayoutrounding="false" d:layoutrounding="auto"> <textblock.rendertransform> <compositetransform skewy="0.314" translatey="0.741"/> </textblock.rendertransform> </textblock> <image horizontalalignment="left" height="37" margin="25,370,0,0" verticalalignment="top" width="30"/> <image horizontalalignment="left" height="37" margin="157,370,0,0" verticalalignment="top" width="46"/> <image horizontalalignment="left" height="37" margin="303,370,0,0" verticalalignment="top" width="48"/> </grid> </stackpanel> <!--contentpanel - place additional content here--> <grid x:name="contentpanel" grid.row="1" margin="12,32,12,0" grid.rowspan="2"> <grid.rowdefinitions> <rowdefinition height="3*"/> <rowdefinition/> </grid.rowdefinitions> <!-- <stackpanel margin="12,0,12,0" grid.rowspan="2">--> <scrollviewer verticalscrollbarvisibility ="disabled" horizontalscrollbarvisibility="hidden" margin="-10,0,10,0" grid.row="1"> <grid name="weeklyupdate" verticalalignment="top" horizontalalignment="left" width="1652" height="233"> <!-- <image name="image12" source="/images/menuicons/w_thunder_cloud_rain.100.png" height="102" width="130" horizontalalignment="left" verticalalignment="top" margin="1430,0,0,102" mouseenter="image12_mouseenter"/>--> <grid.columndefinitions> <columndefinition width="235*"/> <columndefinition width="231*"/> <columndefinition width="235*"/> <columndefinition width="230*"/> <columndefinition width="235*"/> <columndefinition width="230*"/> <columndefinition width="240*"/> <columndefinition width="0*"/> </grid.columndefinitions> <!-- <image name="image12" source="/images/menuicons/w_thunder_cloud_rain.100.png" height="102" width="130" horizontalalignment="left" verticalalignment="top" margin="1430,0,0,102" mouseenter="image12_mouseenter"/>--> <image x:name="image1" source="w_cloud_rain.100.png" height="102" width="130" horizontalalignment="left" verticalalignment="top" margin="54,50,0,0" /> <image x:name="image2" source="w_sun_cloud_wind.180.png" height="102" width="130" horizontalalignment="left" verticalalignment="top" margin="48,50,0,0" grid.column="1" /> <image x:name="image3" source="w_cloud_rain.180.png" height="102" width="130" horizontalalignment="left" verticalalignment="top" margin="60,50,0,0" grid.column="2"/> <image x:name="image4" source="w_sun_cloud_wind.100.png" height="102" width="130" horizontalalignment="left" verticalalignment="top" margin="70,50,0,0" grid.column="3"/> <image x:name="image5" source="w_sun_cloud_wind.140.png" height="102" width="130" horizontalalignment="left" verticalalignment="top" margin="74,50,0,0" grid.column="4"/> <image x:name="image6" source="w_sun_cloud_wind.180.png" height="102" width="130" horizontalalignment="left" verticalalignment="top" margin="68,50,0,0" grid.column="5"/> <image x:name="image7" source="w_thunder_cloud_rain.100.png" height="102" width="130" horizontalalignment="left" verticalalignment="top" margin="63,50,0,0" grid.column="6"/> <textblock horizontalalignment="left" margin="25,18,0,0" textwrapping="wrap" verticalalignment="top" text="{binding max1}"/> <textblock horizontalalignment="left" margin="175,18,0,0" textwrapping="wrap" text="{binding min1}" verticalalignment="top"/> <textblock horizontalalignment="left" margin="69,152,0,0" textwrapping="wrap" text="tomorrow" verticalalignment="top"/> <textblock grid.column="1" horizontalalignment="left" margin="34,18,0,0" textwrapping="wrap" verticalalignment="top" text="{binding max2}"/> <textblock grid.column="1" horizontalalignment="left" margin="161,18,0,0" textwrapping="wrap" verticalalignment="top" text="{binding min2}"/> <textblock grid.column="1" horizontalalignment="left" margin="84,152,0,0" textwrapping="wrap" text="friday" verticalalignment="top"/> <textblock horizontalalignment="left" margin="44,18,0,0" textwrapping="wrap" text="{binding max3}" verticalalignment="top" grid.column="2" /> <textblock horizontalalignment="left" margin="168,18,0,0" textwrapping="wrap" text="{binding min3}" verticalalignment="top" grid.column="2"/> <textblock horizontalalignment="left" textwrapping="wrap" text="saturday" verticalalignment="top" grid.column="2" margin="87,152,0,0"/> <textblock horizontalalignment="left" textwrapping="wrap" text="{binding max4}" verticalalignment="top" grid.column="3" margin="38,18,0,0"/> <textblock horizontalalignment="left" textwrapping="wrap" text="{binding min4}" verticalalignment="top" grid.column="3" margin="161,18,0,0"/> <textblock horizontalalignment="left" textwrapping="wrap" text="sunday" verticalalignment="top" grid.column="3" margin="84,152,0,0"/> <textblock horizontalalignment="left" textwrapping="wrap" text="{binding max5}" verticalalignment="top" grid.column="4" margin="34,18,0,0"/> <textblock horizontalalignment="left" textwrapping="wrap" text="{binding min5}" verticalalignment="top" grid.column="4" margin="178,18,0,0"/> <textblock horizontalalignment="left" textwrapping="wrap" text="monday" verticalalignment="top" grid.column="4" margin="101,152,0,0"/> <textblock horizontalalignment="left" textwrapping="wrap" text="{binding max6}" verticalalignment="top" grid.column="5" margin="38,18,0,0"/> <textblock horizontalalignment="left" textwrapping="wrap" text="{binding min6}" verticalalignment="bottom" grid.column="5" margin="173,0,0,190"/> <textblock horizontalalignment="left" textwrapping="wrap" text="tuesday" verticalalignment="top" grid.column="5" margin="82,152,0,0"/> <textblock horizontalalignment="left" textwrapping="wrap" text="{binding max7}" verticalalignment="top" grid.column="6" margin="39,18,0,0"/> <textblock horizontalalignment="left" textwrapping="wrap" text="{binding min7}" verticalalignment="top" grid.column="6" margin="143,18,0,0"/> <textblock horizontalalignment="left" textwrapping="wrap" text="wednesday" verticalalignment="top" grid.column="6" margin="63,152,0,0"/> </grid> </scrollviewer>
i want xaml page changed according list , swipe control.kindly help me.
thanks
basically pass info url when moving new page illustrated in how pass values (parameters) between xaml pages? question made here earlier.
or store info in singleton, , update & read different places shown in passing info page page question.
c# xaml windows-phone-8
Comments
Post a Comment