Setting the same font size across multiple viewboxes
问题 Let's say I have two viewboxes with two textblocks inside them. They both have the same Width and Height, but the text won't be the same length. How could I make them have the same font size, regardless of the number of characters? Code example: <Viewbox x:Name="vb1"> <TextBlock Text="Some text" /> </Viewbox> <Viewbox x:Name="vb2"> <TextBlock Text="Some bigger text" /> </Viewbox> Here's what I would like: 回答1: Place both TextBlock controls in the same ViewBox : <Viewbox> <Grid> <TextBlock