I have a "hero/vertical" button (with an image inside) defined by this Style:
<ControlTemplate TargetType="{x:Type controls:ImageButton}">
<Grid MinHeight="{TemplateBinding MinHeight}" Background="{TemplateBinding Background}" Width="Auto" SnapsToDevicePixels="True">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<!-- Image -->
<Viewbox x:Name="ViewBoxInternal" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" IsEnabled="{TemplateBinding IsEnabled}"
Stretch="Uniform" StretchDirection="Both" Effect="{x:Null}"
Width="{TemplateBinding MaxSize}" Height="{TemplateBinding MaxSize}"
MaxHeight="{TemplateBinding MaxSize}" MaxWidth="{TemplateBinding MaxSize}">
<ContentPresenter ContentSource="{TemplateBinding Content}" Width="Auto" Height="Auto"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Viewbox>
<!-- Text -->
<TextBlock x:Name="TextBlockInternal" Grid.Row="1"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="3,2,3,3"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Text="{TemplateBinding Text}"
TextWrapping="Wrap" Effect="{TemplateBinding Effect}" TextAlignment="Center"/>
</Grid>
</ControlTemplate>
Usage:
<controls:ImageButton Text="Webcam Recording" Content="{StaticResource Vector.Camera.New}"
Margin="0" Height="70" MaxSize="30">
MaxSize controls the maximum size of the image inside the control.
Example image:
Expected image:
My Problem:
All of my vertical buttons have a MaxWidth of 60, that's okay for English, the problem starts with other languages, when 60px is too small, so the button should grow bigger sideways, but still use all of the height.
So, How can I make the TextBlock use all available height before expanding the width?
TextWrapping only works when there's no width available, like when I set the Width to 60.


Interesting question. Without knowing the width of the widest word, you will not know how to define the width of the TextBox to get the automatic wrapping you want. To go all out on this, you could make use of some Language API and use its wordbreakers. For what I believe is an isolated case in your code, perhaps you can do this yourself and let the TextBox auto-size itself, centered, and achieve the result you want.
Write a Converter to force breaks between words. I threw this together to demonstrate the technique...you will want to adapt is appropriately to your solution of course.
Code
XAML
Result