windows phone 8 - How to set a background to a textBlock that changes its content -



windows phone 8 - How to set a background to a textBlock that changes its content -

background

i'm trying set textblock command @ bottom of screen (with little margin below it), , wish set background it, no matter shown behind textblock, easy read.

on android, set background it, , tell have width , height wrap_content, take space needs, can't find similar thing on wp8.

current status

this xaml i've created:

... <grid > <image x:name="fullscreenimage" stretch="fill" visibility="collapsed" /> <textblock horizontalalignment="center" verticalalignment="bottom" margin="0,0,0,200" fontsize="40" x:name="picturelabel" textwrapping="wrap" foreground="#ff000000" /> </grid> the problem

since textblock doesn't have background property, had utilize wraps it. however, since content changes dynamically, can't set size it.

the question

for now, set background color.

i appreciate if possible utilize rounded corners rectangle background, or 9-patch image.

how can accomplish setting background textblock?

the solution simple. set hirizontalalignment left. hope work in case.

<stackpanel horizontalalignment="left"> <border background="#66ffffff"> <textblock/> </border> </stackpanel>

background windows-phone-8 textblock

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -