xaml - Windows store app and TextBox stretch issue, responsive design -


i'm developing windows store application , have big issue textbox stretching. i'd have responsive design means i'm using lot of grids , verticalalignment="stretch" , horizontalalignment="stretch"

problem happens fontsize in textboxes same , not aligned center. reason why i'm using viewbox.

but viewbox not allowed stretch , fill space in grid cell.

<viewbox grid.row="1"      grid.column="1"      horizontalalignment="stretch"      verticalalignment="stretch" >     <textbox horizontalcontentalignment="stretch" verticalcontentalignment="stretch"         text="{binding name, mode=twoway}"          horizontalalignment="stretch"          verticalalignment="stretch"/> </viewbox> 

i use hardcoded sizes in various types of resolution makes me desperate make ui fitable types of devices.

i try count sizes according actual screen size approach cumbersome.

  • do have idea how solve issue?
  • what best way responsive design in windows store app?
  • dont know 3rd party textbox control better native winrt control?
  • is way use viewbox discrete control or better use viewbox whole screen , set hardcoded sizes?

stretching textbox control horizontally or vertically, doesn't lead stretching text inside it, causes control resizes fill available space , displays more text inside it. glyph size still depended on fontsize property only.

if want horizontally align textbox contents, set textalignment property horizontalalignment.center. if want vertically align textbox contents, unfortunately there not verticaltextalignment, can set verticalalignment verticalalignment.center (instead of stretch) textbox positions vertically in middle of it's container.

and designing app fit types of devices, may take @ guidelines in msdn:

my personal exprience designing multiple sizes not mean must not hardcore size @ all, or need stretch content of textbox. it's more matter of repositioning, hiding/showing elements, in different ways. take @ built-in windows metro apps (now universal) , how behave on different sizes.


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -