c# wpf superscript (not in XAML) -


i have question you. how can make superscript in textblock using c#? aim convert string dynamically (the count of '^' signs dynamically changed) it's not possible write in xaml (or don't know how it). tried code link - superscript of superscript in wpf. doesn't work :(

thanks!

i've found answer! textblock can changed dynamically in way:

run run1 = new run("this ");  run run2 = new run("bold"); run2.fontweight = fontweights.bold;  run run3 = new run(" , ");  run run4 = new run("italic"); run4.fontstyle = fontstyles.italic;  run run5 = new run("text.");  run run6 = new run("x");  run run7 = new run("2"); run7.baselinealignment = baselinealignment.subscript;  mytextblock.inlines.add(run1); mytextblock.inlines.add(run2); mytextblock.inlines.add(run3); mytextblock.inlines.add(run4); mytextblock.inlines.add(run5); mytextblock.inlines.add(run6); mytextblock.inlines.add(run7); 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -