textbox - UWP - How to apply CharacterSpacing to PlaceholderText -


i want know there way apply characterspacing placeholdertext in textbox?

i tried edit textbox template , noticed contentpresenter showing placeholdertext, tried use characterspacing on it, did not work. also, tried fontstretch , again no result.

i tried edit textbox template , noticed contentpresenter showing placeholdertext, tried use characterspacing on it, did not work

the placeholdertext presented inside contentcontrol when use default style. , plaseholdertext value of content property. type of content property object, in meanwhile, charaterspacing property attribute string. seems reason why charaterspacing doesn't take effects. find controls text property such textbox,autosuggestbox , textblock can take effects on charaterspacing property since type of text property string.

how apply characterspacing placeholdertext

if want apply charaterspacing placeholdertext here, can use textbox control instead of contentcontrol placeholdertextcontentpresenter new style not influence placeholdertext feature. need changes appearence let seems same before. update code new textbox style follows:

  <textbox       x:name="placeholdertextcontentpresenter"       grid.row="1"       grid.columnspan="2"       margin="{templatebinding borderthickness}"       padding="{templatebinding padding}"       foreground="gray"       characterspacing="1000"       ishittestvisible="false"       borderthickness="0"       text="{templatebinding placeholdertext}" /> 

and result:

enter image description here


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -