Reputation: 1
I would like to have a wrap panel (or similar) with a bunch of names scale the text size to
Does anyone have any idea?
I tryed the following but i would manually have to set the size of the wrap pannel so it fits all the text.
<Viewbox x:Name="scaler" Stretch="UniformToFill" Width="{Binding ActualWidth, ElementName=window}">
<WrapPanel HorizontalAlignment="Left" x:Name="flpAnwesend" Orientation="Vertical" Height="309" Width="{Binding ActualWidth, ElementName=window}">
<Label Content="firstname lastname"/>
<Label Content="firstname lastname"/>
<Label Content="firstname lastname"/>
<Label Content="firstname lastname"/>
<Label Content="firstname lastname"/>
<Label Content="firstname lastname"/>
<Label Content="firstname lastname"/>
<Label Content="firstname lastname"/>
<Label Content="firstname lastname"/>
<Label Content="firstname lastname"/>
<!-- more names-->
</WrapPanel>
</Viewbox>
EDIT: Here is what it looks like with the first comment. image
And this is what I would like it to look like. (This was done by setting the size of the warplane but I haven’t figured out a good way to do this programmatically) image
Upvotes: 0
Views: 61