C# Orientation in Windows Phone -
C# Orientation in Windows Phone -
i'm amateur in windows phone, how can auto alter size orientation in landscape mode , portrait mode?
in c# winforms can utilize dock or anchor , totally works fine in windows phone can't.
here xaml code, possible help me?
<phone:phoneapplicationpage 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" xmlns:toolkit="clr-namespace:microsoft.phone.controls;assembly=microsoft.phone.controls.toolkit" xmlns:local="clr-namespace:testapp" x:class="testapp.dlpage" fontfamily="{staticresource phonefontfamilynormal}" fontsize="{staticresource phonefontsizenormal}" foreground="{staticresource phoneforegroundbrush}" supportedorientations="portraitorlandscape" orientation="portrait" mc:ignorable="d" background="#ff262626" shell:systemtray.isvisible="false" > <toolkit:transitionservice.navigationintransition> <toolkit:navigationintransition> <toolkit:navigationintransition.backward> <toolkit:turnstiletransition mode="backwardin" /> </toolkit:navigationintransition.backward> <toolkit:navigationintransition.forward> <toolkit:turnstiletransition mode="forwardin" /> </toolkit:navigationintransition.forward> </toolkit:navigationintransition> </toolkit:transitionservice.navigationintransition> <toolkit:transitionservice.navigationouttransition> <toolkit:navigationouttransition> <toolkit:navigationouttransition.backward> <toolkit:turnstiletransition mode="backwardout" /> </toolkit:navigationouttransition.backward> <toolkit:navigationouttransition.forward> <toolkit:turnstiletransition mode="forwardout" /> </toolkit:navigationouttransition.forward> </toolkit:navigationouttransition> </toolkit:transitionservice.navigationouttransition> <scrollviewer horizontalalignment="left" verticalalignment="top"> <grid x:name="gridorg" horizontalalignment="left" verticalalignment="top" width="480" height="800" > <grid x:name="gridpanel" horizontalalignment="left" height="780" margin="10,10,0,0" verticalalignment="top" width="460" background="#ff3e3e3e"> <ellipse x:name="elp" horizontalalignment="left" height="455" margin="4,4,0,0" stroke="black" verticalalignment="top" width="453" tap="elp_tap"/> <textblock x:name="txttitle" horizontalalignment="left" margin="6,478,0,0" textwrapping="wrap" verticalalignment="top" height="162" width="447"/> <textblock x:name="cntdl" horizontalalignment="left" margin="6,662,0,0" textwrapping="wrap" verticalalignment="top" height="52" width="447"/> </grid> <local:loadingcontrol x:name="pb" horizontalalignment="left" margin="10,377,0,0" verticalalignment="top" width="460"/> </grid> </scrollviewer> </phone:phoneapplicationpage>
i seek set width in auto controls didn't work.
thanks
if understand correctly, want ui same no matter screen size or ratio it's launched on. utilize canvas controll , place elements of interface within it, reply should go is: don't utilize hard-coded values, utilize stars , auto instead. ui going great on every screen. your columns/rows going stretch/shrink fit height , width of user’s phone.
more info , examples: multi-resolution apps windows phone 8
c# windows-phone-8 windows-phone
Comments
Post a Comment