Thursday 15 March 2012

c# - Is it possible to use a custom alert message in all pages by designing it in a single page in Windows Phone 8? -



c# - Is it possible to use a custom alert message in all pages by designing it in a single page in Windows Phone 8? -

in windows phone 8 application,there 45 pages. want display alert message(customized) in pages of application. possible design in single page , phone call in other pages?

xaml design alert message:

<canvas x:name="expirypopup_container" visibility="collapsed" margin="0,0,0,0" background="transparent" width="800" height="768"> <canvas x:name="expirypopup" background="#ffffffff" height="180" canvas.left="410" canvas.top="320" grid.row="1" width="300"> <canvas background="{staticresource leftnavbackground}" height="48" width="300"> <textblock fontsize="26" textalignment="center" fontfamily="/assets/fonts/opensans-regular.ttf#open sans regular" text="alert" width="300" canvas.top="10" height="28"/> </canvas> <textblock text=" session has expired." fontsize="22" fontfamily="/assets/fonts/opensans-regular.ttf#open sans regular" textalignment="center" foreground="{staticresource bluetext}" canvas.top="71" width="300"/> <canvas x:name="okbutton" background="{staticresource buttonbackground}" height="32" width="56" canvas.left="122" canvas.top="120" tap="okbutton_tap"> <textblock textalignment="center" text="ok" fontsize="24" fontfamily="/assets/fonts/opensans-regular.ttf#open sans regular" width="49" height="26" canvas.top="2" canvas.left="3"/> </canvas> </canvas> </canvas>

per above comments, want navigate. anywhere in app, can do:

(app.current app).rootframe.navigate(...)

i caution against using canvas (anywhere!) becuase if ever move beingness universal app (windows , windows phone 8.1) layout wrong on larger-screen devices. or if decide back upwards landscape orientation, matter.

un-parented popups won't rotate rest of app; in portrait mode. code pointed blog shows mechanism host mutual ui within root frame don't need utilize popup (look @ app.xaml , applycustomframetemplate method in .cs file).

c# xaml windows-phone-8

No comments:

Post a Comment