Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to set FontSize of a Textblock, which is in a Viewbox
    text
    copied!<p>I can't set the <code>FontSize</code> of the <code>Text</code> in a <code>TextBlock</code>, since the <code>TextBox</code> is in a <code>Viewbox</code>. Why?</p> <pre><code>&lt;Grid Margin="35,30,35,0" ShowGridLines="False" &gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition MinWidth="270 px" Width="2*"/&gt; &lt;ColumnDefinition Width="5*"/&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition /&gt; &lt;RowDefinition /&gt; &lt;RowDefinition /&gt; &lt;RowDefinition /&gt; &lt;/Grid.RowDefinitions&gt; &lt;Border Grid.Row="0" Grid.Column="0" BorderBrush="Black" BorderThickness="1,1,1,0" /&gt; &lt;Viewbox&gt; &lt;TextBlock Margin="10,5,0,5" Grid.Row="0" Grid.Column="0"&gt;Team:&lt;/TextBlock&gt; &lt;/Viewbox&gt; &lt;Border Grid.Row="1" Grid.Column="0" BorderBrush="Black" BorderThickness="1,1,1,0" /&gt; &lt;TextBlock Margin="10,5,0,5" Grid.Row="1" Grid.Column="0"&gt;Beschreibung:&lt;/TextBlock&gt; &lt;Border Grid.Row="2" Grid.Column="0" BorderBrush="Black" BorderThickness="1,1,1,0" /&gt; &lt;TextBlock Margin="10,5,0,5" Grid.Row="2" Grid.Column="0"&gt;Milestone:&lt;/TextBlock&gt; &lt;Border Grid.Row="3" Grid.Column="0" BorderBrush="Black" BorderThickness="1,1,1,1" /&gt; &lt;TextBlock Margin="10,5,0,5" Grid.Row="3" Grid.Column="0"&gt;Status:&lt;/TextBlock&gt; &lt;Border Grid.Row="0" Grid.Column="1" BorderBrush="Black" BorderThickness="0,1,1,0" /&gt; &lt;TextBlock x:Name="tb_Team_dyn" Margin="10,5,0,5" Grid.Row="0" Grid.Column="1" FontWeight="Bold" Text="{Binding Data.Team}" TextWrapping="Wrap"&gt;&lt;/TextBlock&gt; &lt;Border Grid.Row="1" Grid.Column="1" BorderBrush="Black" BorderThickness="0,1,1,0" /&gt; &lt;TextBlock x:Name="tb_Descr_dyn" Margin="10,5,0,5" Grid.Row="1" Grid.Column="1" FontWeight="Bold" Text="{Binding Data.Description}" TextWrapping="Wrap"/&gt; &lt;Border Grid.Row="2" Grid.Column="1" BorderBrush="Black" BorderThickness="0,1,1,0" /&gt; &lt;TextBlock x:Name="tb_Milestone_dyn" Margin="10,5,0,5" Grid.Row="2" Grid.Column="1" FontWeight="Bold" Text="{Binding Data.Milestone}" TextWrapping="Wrap"/&gt; &lt;Border Grid.Row="3" Grid.Column="1" BorderBrush="Black" BorderThickness="0,1,1,1" /&gt; &lt;StackPanel Margin="10,5,0,5" Grid.Row="3" Grid.Column="1" Orientation="Horizontal"&gt; &lt;Image x:Name="imgSmile" MaxWidth="38" Source="{Binding Data.Smiley}" /&gt; &lt;TextBlock x:Name="tb_Status_dyn" Margin="{Binding Data.SmileyMargin}" Foreground="{Binding Data.Col}" FontWeight="Bold" Text="{Binding Data.Status}" TextWrapping="Wrap"&gt;&lt;/TextBlock&gt; &lt;/StackPanel&gt; &lt;/Grid&gt; </code></pre> <p>I can set the <code>FontSize</code>s of all of the <code>TextBlock</code>s but not of the <code>TextBlock</code> which is in the <code>Viewbox</code>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload