0

弹出窗口后面的列表正在正确滚动,但不是此弹出窗口的内容。我错过了什么吗?

 <Grid x:Name="LayoutRoot">
            <Grid.Projection>
                <PlaneProjection/>
            </Grid.Projection>

            <Grid.Background>
                <ImageBrush ImageSource="/Assets/common/bg.png"/>
            </Grid.Background>

            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition />
            </Grid.RowDefinitions>

            <myControls:Header Title="Event Calender" MenuClickedCommand="{Binding MenuClicked}" />

            <Grid Grid.Row="1" Margin="20">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="auto"/>
                </Grid.ColumnDefinitions>

                <Image Grid.Column="0" Source="/Assets/event/btn_byday.png" />
                <Image Grid.Column="1" Source="/Assets/event/btn_byvenue.png" />
                <Image Margin="20,0" Tap="Image_Tap" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="2" Source="/Assets/event/icon_callist.png" />
            </Grid>

            <Popup Grid.Row="2" x:Name="popup" IsOpen="True">
                <ScrollViewer Width="{Binding DeviceWidth}" >

                    <StackPanel Margin="20,0">
                        <TextBlock Text="item 1" Margin="20"/>
                        <TextBlock Text="item 2" Margin="20"/>
                        <TextBlock Text="item 3" Margin="20"/>
                        <TextBlock Text="item 4" Margin="20"/>
                        <TextBlock Text="item 5" Margin="20"/>
                        <TextBlock Text="item 6" Margin="20"/>
                        <TextBlock Text="item 7" Margin="20"/>
                        <TextBlock Text="item 8" Margin="20"/>
                        <TextBlock Text="item 9" Margin="20"/>
                        <TextBlock Text="item 10" Margin="20"/>
                        <TextBlock Text="item 11" Margin="20"/>
                        <TextBlock Text="item 12" Margin="20"/>
                        <TextBlock Text="item 13" Margin="20"/>
                        <TextBlock Text="item 14" Margin="20"/>
                        <TextBlock Text="item 15" Margin="20"/>
                        <TextBlock Text="item 16" Margin="20"/>
                    </StackPanel>
                </ScrollViewer>
            </Popup>

            <ScrollViewer Grid.Row="2" Margin="20,0">
                <StackPanel>
                    <ItemsControl ItemsSource="{Binding EventsList}">
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <myControls:EventDetails />
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>                    
                </StackPanel>
            </ScrollViewer>
        </Grid>

Ps:原因是scrollviewer已经占据了显示内容所需的所有高度。我怎样才能避免呢?

4

0 回答 0