サイドドックパネルに2つのテキストブロックがあります。ブロックのサイズに合わせてフォントサイズを設定する必要があります。設定方法wpfの2つのテキストボックスに動的にフォントサイズを設定
<Border Grid.Row="0"
CornerRadius="2"
BorderBrush="White"
BorderThickness="2"
Background="Black"
Margin="2,0,0,1">
<DockPanel LastChildFill="True">
<TextBlock DockPanel.Dock="Bottom"
Text="{Binding TextWork}"
Style="{DynamicResource Label}"
HorizontalAlignment="Center"
VerticalAlignment="Bottom"
TextWrapping="Wrap"
FontSize=?
Foreground="White"
TextAlignment="Center"
Margin="0,0,0,2" />
<TextBlock DockPanel.Dock="Top"
Text="{Binding AwaitingWorkUI}"
Style="{DynamicResource Header}"
Margin="0,2,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="?"
Foreground="White"
TextAlignment="Center" />
</DockPanel>
</Border>
これはコントロールであり、制御がどのように多くの細胞
最も簡単で素早い方法で、 'ViewBox'でスラップしてください。 –
唯一の問題は、ビューボックスの最小の高さ我々は持っていない – user551445
ええ、何? ViewBoxはその親によって割り当てられたスペースを消費するので、あなたが何を意味するのか分かりません。 –