WPF: power in xaml
Asked Answered
H

2

6

I have text block with text "km2":

<TextBlock >Area(km2)</TextBlock>

How can I make "2" small and heigher such exponent I need view such on picture: enter image description here

Hydromagnetics answered 4/9, 2013 at 17:50 Comment(1)
WPF: Power in XAML - That's what I'm talking about.Recitative
I
3

You can create Inlines, and set Typography.Variants appropriately.

<TextBlock><Run>Area(km</Run><Run Typography.Variants="Superscript">2</Run><Run>)</Run></TextBlock>
Interfile answered 4/9, 2013 at 17:53 Comment(3)
a XAML sample would help =)Recitative
The name "Typography" does not exist in the namespace "schemas.microsoft.com/client/2007".Hydromagnetics
@YaroslavShabanov What version of phone? See: msdn.microsoft.com/en-us/library/windowsphone/develop/…Interfile
S
2
<TextBlock Text="Area(km²)"/>

Seems to work:

Selig answered 4/9, 2013 at 19:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.