I have the following XAML code:
<DataTemplate x:Key="NewsDataTemplate">
<StackPanel Width="400" Height="100" Orientation="Horizontal" H开发者_如何学CorizontalAlignment="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?
Try the MinHeight property...
FrameworkElement.MinHeight Property
精彩评论