Los elementos del cuadro de lista horizontal WP7 al final se cortan

Tengo este problema frustrante en el que se cortan los últimos elementos de mi cuadro de lista.

He configurado mi cuadro de lista para que se desplace y se muestre horizontalmente. Mi ItemPanelTemplate contiene un VirtualizedStackPanel (cuando uso un stackpanel normal, mi cuadro de lista solo muestra un número finito de elementos, mientras que Virtual one muestra todos menos los dos últimos)

Debo señalar que cuando cambio esto de horizontal a vertical, todo funciona bien aquí es mi xaml.

Por favor ayuda

<Grid Name="JumpTo" Visibility="Collapsed" Background="#FF0A0909" Opacity="0.95" >
    <TextBlock Text="Jump To"/>
    <ListBox ItemsSource="{Binding}" 
             HorizontalAlignment="Left" 
             Name="lbJumpTo" 
             VerticalAlignment="Top" 
             SelectionChanged="lbJumpTo_SelectionChanged" 
             Height="248" Width="623" 
             Margin="34,77,0,0" ScrollViewer.HorizontalScrollBarVisibility="Auto">
        <ListBox.ItemsPanel>
            <ItemsPanelTemplate>
                <VirtualizingStackPanel Orientation="Horizontal"></VirtualizingStackPanel>
            </ItemsPanelTemplate>    
        </ListBox.ItemsPanel>

        <ListBox.ItemTemplate>
            <DataTemplate>

                <StackPanel Orientation="Vertical" Width="200" Height="160">

                    <Grid x:Name="gridLoop" Height="90" Width="150" Background="{x:Null}">
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition />
                            <ColumnDefinition />
                            <ColumnDefinition />
                            <ColumnDefinition />
                            <ColumnDefinition />
                            <ColumnDefinition />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>

                        <Image Source="{Binding LoopDisplayMatrix[0][0]}" Grid.Row="0" Grid.Column="0" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[0][1]}" Grid.Row="0" Grid.Column="1"  Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[0][2]}" Grid.Row="0" Grid.Column="2"  Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[0][3]}" Grid.Row="0" Grid.Column="3"  Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[0][4]}" Grid.Row="0" Grid.Column="4" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[0][5]}" Grid.Row="0" Grid.Column="5" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[0][6]}" Grid.Row="0" Grid.Column="6" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[0][7]}" Grid.Row="0" Grid.Column="7" Width="20" Height="20"/>

                        <Image Source="{Binding LoopDisplayMatrix[1][0]}" Grid.Row="1" Grid.Column="0" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[1][1]}" Grid.Row="1" Grid.Column="1" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[1][2]}" Grid.Row="1" Grid.Column="2" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[1][3]}" Grid.Row="1" Grid.Column="3" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[1][4]}" Grid.Row="1" Grid.Column="4" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[1][5]}" Grid.Row="1" Grid.Column="5" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[1][6]}" Grid.Row="1" Grid.Column="6" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[1][7]}" Grid.Row="1" Grid.Column="7" Width="20" Height="20"/>

                        <Image Source="{Binding LoopDisplayMatrix[2][0]}" Grid.Row="2" Grid.Column="0" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[2][1]}" Grid.Row="2" Grid.Column="1" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[2][2]}" Grid.Row="2" Grid.Column="2" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[2][3]}" Grid.Row="2" Grid.Column="3" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[2][4]}" Grid.Row="2" Grid.Column="4" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[2][5]}" Grid.Row="2" Grid.Column="5" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[2][6]}" Grid.Row="2" Grid.Column="6" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[2][7]}" Grid.Row="2" Grid.Column="7" Width="20" Height="20"/>

                        <Image Source="{Binding LoopDisplayMatrix[3][0]}" Grid.Row="3" Grid.Column="0" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[3][1]}" Grid.Row="3" Grid.Column="1" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[3][2]}" Grid.Row="3" Grid.Column="2" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[3][3]}" Grid.Row="3" Grid.Column="3" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[3][4]}" Grid.Row="3" Grid.Column="4" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[3][5]}" Grid.Row="3" Grid.Column="5" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[3][6]}" Grid.Row="3" Grid.Column="6" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[3][7]}" Grid.Row="3" Grid.Column="7" Width="20" Height="20"/>

                        <Image Source="{Binding LoopDisplayMatrix[4][0]}" Grid.Row="4" Grid.Column="0" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[4][1]}" Grid.Row="4" Grid.Column="1" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[4][2]}" Grid.Row="4" Grid.Column="2" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[4][3]}" Grid.Row="4" Grid.Column="3" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[4][4]}" Grid.Row="4" Grid.Column="4" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[4][5]}" Grid.Row="4" Grid.Column="5" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[4][6]}" Grid.Row="4" Grid.Column="6" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[4][7]}" Grid.Row="4" Grid.Column="7" Width="20" Height="20"/>

                        <Image Source="{Binding LoopDisplayMatrix[5][0]}" Grid.Row="5" Grid.Column="0" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[5][1]}" Grid.Row="5" Grid.Column="1" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[5][2]}" Grid.Row="5" Grid.Column="2" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[5][3]}" Grid.Row="5" Grid.Column="3" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[5][4]}" Grid.Row="5" Grid.Column="4" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[5][5]}" Grid.Row="5" Grid.Column="5" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[5][6]}" Grid.Row="5" Grid.Column="6" Width="20" Height="20"/>
                        <Image Source="{Binding LoopDisplayMatrix[5][7]}" Grid.Row="5" Grid.Column="7" Width="20" Height="20"/>

                    </Grid>

                    <StackPanel Orientation="Vertical" Height="50" Width="100">
                        <TextBlock Text="{Binding LoopName}" Width="150" Height="40"  />
                        <TextBlock Text="{Binding TempoDisplay}" Width="150" Height="40"  />
                    </StackPanel>

                </StackPanel>

            </DataTemplate>
        </ListBox.ItemTemplate>
    </ListBox>
</Grid>

preguntado el 03 de mayo de 12 a las 09:05

Las dimensiones máximas de control en Win Phone 7 son 2048x2048, ¿podría ser un problema? -

Intente configurar todo el ancho del contenido como Auto -

Eliminar el ancho del cuadro de lista. -

Saludos Senthil Kumar. Configuré el ancho del panel de pila superior en la plantilla de datos en automático, lo que solucionó mi problema. -

1 Respuestas

Saludos Senthil Kumar. Configuré el ancho del panel de pila superior en la plantilla de datos en automático, lo que solucionó mi problema.

contestado el 03 de mayo de 12 a las 23:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.