ListBox不显示纵向或横向模式下的所有项目

时间:2014-01-13 04:45:31

标签: windows-phone-7

我刚刚开始使用WP7。我想知道是否有更合适的方法来做到这一点,但是现在这似乎是最合乎逻辑的方法。我试图显示包含相关电话代码的国家/地区列表,如下所示:

<Grid x:Name="ContentPanel" Grid.Row="0" Margin="12,0,12,0">
        <ScrollViewer Name="ScrollViewer" Height="3500">
            <StackPanel Name="StackPanel" Height="3500">
                <ListBox Name="codeList"  FontSize="26" SelectionChanged="codeList_SelectionChanged">
                    <ListBoxItem Name="US">United States (+1)</ListBoxItem>
                    <ListBoxItem Name="AG">Afghanistan (+93)</ListBoxItem>
                    <ListBoxItem Name="AR">Argentina (+54)</ListBoxItem>
                    <ListBoxItem Name="AU">Australia (+62)</ListBoxItem>
                    <ListBoxItem Name="AS">Austria (+43)</ListBoxItem>
                    <ListBoxItem Name="BE">Belgium (+32)</ListBoxItem>
                    <ListBoxItem Name="BU">Bulgaria (+359)</ListBoxItem>
                    <ListBoxItem Name="BR">Brazil (+55)</ListBoxItem>
                    <ListBoxItem Name="CL">Chile (+56)</ListBoxItem>
                    <ListBoxItem Name="CN">China (+86)</ListBoxItem>
                    <ListBoxItem Name="CO">Colombia (+57)</ListBoxItem>
                    <ListBoxItem Name="DK">Denmark (+45)</ListBoxItem>
                    <ListBoxItem Name="EG">Egypt (+20)</ListBoxItem>
                    <ListBoxItem Name="FR">France (+33  )</ListBoxItem>
                    <ListBoxItem Name="DE">Germany (+49)</ListBoxItem>
                    <ListBoxItem Name="GR">Greece (+30)</ListBoxItem>
                    <ListBoxItem Name="HN">Hungary (+36)</ListBoxItem>
                    <ListBoxItem Name="IN">India (+91)</ListBoxItem>
                    <ListBoxItem Name="IT">Italy (+39)</ListBoxItem>
                    <ListBoxItem Name="JP">Japan (+81)</ListBoxItem>
                    <ListBoxItem Name="MX">Mexico (+52)</ListBoxItem>
                    <ListBoxItem Name="ND">Netherlands (+31)</ListBoxItem>
                    <ListBoxItem Name="NO">Norway (+47)</ListBoxItem>
                    <ListBoxItem Name="PE">Peru (+51)</ListBoxItem>
                    <ListBoxItem Name="PO">Poland (+48)</ListBoxItem>
                    <ListBoxItem Name="PT">Portugal (+351)</ListBoxItem>
                    <ListBoxItem Name="ES">Spain (+34)</ListBoxItem>
                    <ListBoxItem Name="SE">Sweden (+46)</ListBoxItem>
                    <ListBoxItem Name="SW">Switzerland (+41)</ListBoxItem>
                    <ListBoxItem Name="TK">Turkey (+90)</ListBoxItem>
                    <ListBoxItem Name="UR">Uruguay (+598)</ListBoxItem>
                    <ListBoxItem Name="VE">Venezuela (+58)</ListBoxItem>
                    <ListBoxItem Name="ZI">Zimbabwe (+263)</ListBoxItem>
                </ListBox>
            </StackPanel>
        </ScrollViewer>
    </Grid>

事实证明,在肖像模式下,列表只显示到波兰,而希腊直到风景。增加Scrollviewer和StackPanel的大小并不重要。有什么建议吗?

0 个答案:

没有答案