i trying add pinch zoom feature data bound listbox. efficient way this? have placed listbox inside grid control , made scrollable.
this current code.
<grid x:name="contentpanel" grid.row="1" margin="10,0,10,10" background="black" > <listbox name="lsttext" fontsize="24" foreground="white" selectionmode="single" margin="10,0,10,10" scrollviewer.verticalscrollbarvisibility="visible" > <listbox.itemtemplate> <datatemplate> <stackpanel > <textblock text="{binding text}" textwrapping="wrap"></textblock> </stackpanel> </datatemplate> </listbox.itemtemplate> </listbox> </grid> <toolkit:gestureservice.gesturelistener> <toolkit:gesturelistener tap="gesturelistener_tap" pinchcompleted="gesturelistener_pinchcompleted" flick="gesturelistener_flick"> </toolkit:gesturelistener> </toolkit:gestureservice.gesturelistener>
the listbox isn't designed zoomed (via pinching or other method).
if want implement must redraw content @ different zoom levels.
you'd have number of issues overcome though:
- how inform user can alter text size way?
- how avoid affecting standard behaviour scrolling , selecting items in listbox.
- how should scrolling behave regard wrapping , shown text?
- a list shouldn't used show large amounts of text on phone. if need show large amount of text, have short "title" in list , show detail in page. way text in list can displayed in way large enough never need changing , should readable.
- is genuine problem trying overcome or think nice have? phone won't used app why need if user still have use lists fixed text size in os , other apps.
- you'd have potential performance issues performance framework redraws in list when change size of text. @ use deferred loading have redraw shown on screen while zooming impact how determine top (and bottom) of shown sizes change.
summary: unnecessary , complicated , difficult well. if want try have go , post code problems.
Comments
Post a Comment