VansFannel
VansFannel

Reputation: 45941

Set min height but not max

I have the following XAML code:

<DataTemplate x:Key="NewsDataTemplate">
    <StackPanel Width="400" Height="100" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
        <TextBlock x:Name="NewsText" Text="{Binding Text}" Margin="8,4" TextWrapping="Wrap" Width="384" Style="{StaticResource PhoneTextGroupHeaderStyle}" />
    </StackPanel>
</DataTemplate>

I want to NewsText TextBlock can be as height as it needs but also I want to set a minimum height: NewsText will have 100 or higher height.

How can I do that?

Upvotes: 0

Views: 180

Answers (1)

Jared Harding
Jared Harding

Reputation: 4992

Try the MinHeight property...

FrameworkElement.MinHeight Property

Upvotes: 2

Related Questions