Bonjour
J'ai un viewbox avec du text qui s'adapate à la taille de la fenêtre.
j'aimerais quand le texte est en dessous d'une taille que la police augmente et qu'il fasse un retour à la ligne
Comment faire ?
En gros j'aimerais pouvoir dire que tout mon texte doit être capable de tenir dans un "block" où j'ai défini la taille.
Code XML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 <Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <StackPanel> <Viewbox Stretch="Uniform" MaxHeight="400" MinHeight="200"> <TextBlock VerticalAlignment="Bottom" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ipsum risus !" FontSize="75" TextWrapping="Wrap" /> </Viewbox> </StackPanel> </Window>
Merci
Partager