0

3 行のグリッドを持つ ItemsControl で使用される DataTemplate があります。

            <Grid Margin="12,0,0,4">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="80" />
                    <ColumnDefinition Width="330" />
                    <ColumnDefinition Width="30"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <TextBlock Text="{Binding Due}" 
                           Foreground="CornflowerBlue" 
                           FontSize="28"
                           HorizontalAlignment="Center" />
                <TextBlock Text="{Binding Expected.Value}" 
                           Foreground="Red" 
                           FontSize="16"
                           Grid.Row="1"
                           Grid.RowSpan="2"
                           HorizontalAlignment="Center" />
                <TextBlock Text="{Binding Destination}" 
                           Grid.Column="1" 
                           FontSize="28"
                           TextWrapping="Wrap"
                           HorizontalAlignment="Left" />
                <TextBlock Text="{Binding Via}" 
                           Grid.Column="1" 
                           Grid.Row="1" 
                           Foreground="Gray"
                           FontSize="16"
                           HorizontalAlignment="Left" />
                <TextBlock Text="{Binding Status}" 
                           Grid.Column="1" 
                           Grid.Row="2" 
                           FontSize="16"
                           HorizontalAlignment="Left" />
                <TextBlock Text="{Binding Platform.Value}" 
                           Grid.Column="2"
                           Grid.RowSpan="3"
                           FontSize="40"
                           VerticalAlignment="Top"
                           HorizontalAlignment="Center" />
            </Grid>

一部のアイテムでは、Via バインディングに空の文字列が含まれ、WP7 では中央の行が折りたたまれます。しかし、プロジェクトを WP8 に変換すると、動作が異なり、テキストがないにもかかわらず、textblox 用のスペースを予約しているかのように空の行が表示されます。

このシナリオで WP8 に WP7 と同じ動作を強制するにはどうすればよいですか?

4

1 に答える 1