.net - Windows Phone 8 fullscreen page -
i have following page defined in xaml windows phone 8
<phone:phoneapplicationpage x:class="mangarack.view.phone.view.chapterview" 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" shell:systemtray.isvisible="false"> <grid background="white"> <button borderthickness="0" name="imagebutton" padding="0"> <image name="image" /> </button> </grid> </phone:phoneapplicationpage> the grid defines white background applied on entire screen, contents of grid not near edge of window, there observable margin/padding between image , edge of window. how can ensure image directly against window edge?
try setting image stretch property:
<image name="image" stretch="uniformtofill"/> for more information see msdn pages regarding image stretching.
also, button add 'padding' around image. avoid this, have change template. replace template 1 renders content:
<button> <button.template> <controltemplate targettype="button"> <stackpanel x:name="stackpanel" orientation="horizontal"> <contentpresenter verticalalignment="bottom"/> </stackpanel> </controltemplate> </button.template> <image name="image" stretch="uniformtofill"/> </button> although, if entirely removing button 'chrome' may use image directly , handle tap / click events on image.
Comments
Post a Comment