wpf - Automatically adding a newline to TextBox in WP8.1 XAML -
i trying build windows phone 8.1 app , there bothering me: ![look @ this] http://i.imgur.com/xo7oomt.png
as can see textbox not creating , going new line when text reaches end. should do? tried googling couldn't find (i sure used wrong keywords new this).
anyways, here xaml code using (with things i've found on google didn't work)
look @ "contenttextbox":
<grid x:name="layoutroot" background="whitesmoke"> <grid.childrentransitions> <transitioncollection> <entrancethemetransition/> </transitioncollection> </grid.childrentransitions> <grid.rowdefinitions> <rowdefinition height="auto"/> <rowdefinition height="*"/> </grid.rowdefinitions> <!--todo: content should placed within following grid--> <grid grid.row="0" x:name="titleroot" margin="0,0,0,0"> <textbox x:name="titletextbox" text="title"/> </grid> <grid grid.row="1" x:name="contentroot" margin="0,0,0,0"> <stackpanel height="auto"> <textbox x:name="contenttextbox" text="" horizontalalignment="stretch" verticalalignment="top" acceptsreturn="true" width="auto"/> </stackpanel> </grid> </grid>
turning on textwrapping helps!
<textbox x:name="contenttextbox" textwrapping="wrap" text="" horizontalalignment="stretch" verticalalignment="top" acceptsreturn="true" width="auto" />
it means - when you're out of horizontal space, wrap row.
Comments
Post a Comment