Why FontStretch does not work in WPF?

后端 未结 5 1925
猫巷女王i
猫巷女王i 2020-12-31 05:23

I am trying setting FontStretch property on a TextBlock in WPF but it seems that it does not work. I tried Expanded, Condensed, etc. but the text appearance

5条回答
  •  一整个雨季
    2020-12-31 05:50

    To get a similar effect to FontStretch in a font that doesn't support it, you can use a LayoutTransform on the TextBlock:

    
      
      
    
    
    ...
    
    
    

    This can also be set in a style if you want to have all text in TextBlocks appear condensed:

    
    

提交回复
热议问题