开发者

Set min height but not max

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜