Xaml WP8控件未显示

Xaml WP8控件未显示,xaml,windows-phone-8,grid,Xaml,Windows Phone 8,Grid,我有一个WP8 Pivot应用程序,试图在Pivot项中插入一个ProgressBar和一个TextBlock,但它似乎没有显示出来 <phone:PivotItem Header="Tweets"> <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <Grid.Resources> <DataTemplate x:Ke

我有一个WP8 Pivot应用程序,试图在
Pivot项中插入一个
ProgressBar
和一个
TextBlock
,但它似乎没有显示出来

<phone:PivotItem Header="Tweets">
    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <Grid.Resources>
                <DataTemplate x:Key="tweetlist">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>

                       <!-- I would like to have the Progress bar here -->
                       <!-- I would like to have the textblock here -->

                        <Rectangle Fill="Aqua" Height="50" Width="50" Grid.Row="0" Grid.Column="0"
                                   VerticalAlignment="Top" Margin="0,7,7,0"
                                   Grid.RowSpan="2">

                        </Rectangle>
                        <Image Height="50" Width="50" Grid.Row="0" Grid.Column="0"
                               VerticalAlignment="Top" Margin="0,7,7,0"
                               Grid.RowSpan="2" Source="{Binding Image}">

                        </Image>
                        <TextBlock Text="{Binding DateOfTweet}" Grid.Row="0" Grid.Column="1"
                                   Foreground="{StaticResource PhoneAccentBrush}" VerticalAlignment="Top" />

                        <TextBlock Text="{Binding Tweet}" TextWrapping="Wrap" Foreground="Black"
                                   Grid.Row="1" Grid.Column="1"
                                   VerticalAlignment="Top" />

                    </Grid>
                </DataTemplate>
            </Grid.Resources>
            <!--                    <TextBlock  Text="Tweet List" Foreground="Black" FontSize="26" HorizontalAlignment="Center" Margin="10" />-->
            <ListBox
                ScrollViewer.VerticalScrollBarVisibility="Visible"
                ItemTemplate="{StaticResource tweetlist}"
                x:Name="llsTweets" ItemsSource="{Binding Tweets}">
            </ListBox>
        </Grid>
    </phone:PivotItem>


有什么办法可以做到这一点吗?

这是一个重叠的问题。不要在网格的单元格中放置多个控件,如果不需要,也不要使用
grid.RowSpan


使用
stackpanel
或子网格将单元格分解为更小的部分。

是否将数据设置为textbox并激活progressbar?可能是z顺序问题,请尝试将进度条和文本框的xaml插入xaml中最后一个文本框之后、网格关闭标记之前。