简体   繁体   中英

C#, XAML, Metro - How to make some word bigger than others in the same textblock/textbox

I'm trying to make a metro style news app and i want to make the first couple word in the news content bigger than the rest... Please...is there anyway to do that...? I'm thanking you in advance =]

You can do this for TextBlock :

<TextBlock>
   <TextBlock.Inlines>
     <Run FontWeight="Bold" FontSize="14" Text="Big and bold text " />
     <Run FontSize="10" Foreground="Red" Text="next to small red text. " />
  </TextBlock.Inlines>
</TextBlock>

However, TextBox doesn't support inlines, only a single text value, so this is not supported within a TextBox .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM