admob - How to keep a page open in the background when starting a new page in windows phone? -
i have 1 simple application have few pages.
on first page have addmob, , working fine. on page have button contact page. when open contact page , return main page, addmob refreshes.
i not want that. how can put first page in background without starting again when user returns contact page?
no. design, in windows phone, can have 1 page active (visible) @ time. ad controls unload , refresh automatically when navigate between pages. have no control on behaviour.
in experience, don't think have worry ads refreshing if navigation infrequent. long expect user stay on page 20 30 seconds on average, suggest not worry refresh. in fact, (again, in personal experience) receive more clicks implementation having 1 static ad control refreshing @ fixed interval.
but if still have avoid ad refresh, here couple of workarounds.
option 1: embed "contact page" contentcontrol/usercontrol inside main page. show , hide contact control required. below basic xaml design demonstrate this.
<grid> <grid.rowdefinition> <rowdefinition height="auto" /> <rowdefinition /> </grid.rowdefinition> <adcontrol grid.row="0" height="80" /> <grid name="mainpage" grid.row="1"> <!-- main page content --> </grid> <view:contactpage name="contacts" grid.row="1" visibility="collapsed"> <!-- contact page content --> </view:contactpage> </grid> also, remember handle backbuttonpress if going approach. user expect pressing button, when content page visible, take them main page.
option 2: if application design allow, use panaroma or pivot control show main , contact pages. sample below,
<grid> <grid.rowdefinition> <rowdefinition height="auto" /> <rowdefinition /> </grid.rowdefinition> <adcontrol grid.row="0" height="80" /> <controls:pivot grid.row="1"> <controls:pivotitem header="main page"> <!-- main page content --> </controls:pivotitem> <controls:pivotitem header="contacts"> <!-- contact page content --> </controls:pivotitem> </controls:pivot> </grid>
Comments
Post a Comment