I have two controls on a form, they contain textblocks with text set from databinding, and they autosize to fill the available space.
What I want is for these two textblocks to use the same font size, so with two equally sized controls, if one has a longer string than the other, autosize means that the longer string will have a smaller font to fit. I want to set the other control to that font size so that they look visually consistent.
Is this acheivable?
For reference this is what I have, with databinding replaced with example strings:
<Button HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="1">
<Button.ContentTemplate>
<DataTemplate>
<Viewbox>
<TextBlock Margin="10,10,10,10">Much Longer String</TextBlock>
</Viewbox>
</DataTemplate>
</Button.ContentTemplate>
</Button>
<Button HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="1" Grid.Row="1">
<Button.ContentTemplate>
<DataTemplate>
<Viewbox>
<TextBlock Margin="10,10,10,10">Small</TextBlock>
</Viewbox>
</DataTemplate>
</Button.ContentTemplate>
</Button>