1

タイトルパネルを追加すると、スクロールできなくなりました。回復するのを手伝ってください。

    <StackPanel>

            <Grid  HorizontalAlignment="Left">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <TextBlock .../>
            <TextBlock ... >
            </TextBlock>
        </Grid>
            <ScrollViewer  Grid.Row="1" x:Name="_ScrollViewer">
            <StackPanel  ScrollViewer.VerticalScrollBarVisibility="Disabled">
                <Grid ScrollViewer.VerticalScrollBarVisibility="Disabled"> 
                        <Grid.RowDefinitions>
                            <RowDefinition Height="auto" />
                            <RowDefinition Height="auto" />
                        </Grid.RowDefinitions>
                        <ListBox x:Name="listmy"
                                 Grid.Row="0" ScrollViewer.VerticalScrollBarVisibility="Disabled"
                                 >
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <local:TypeMessage Content="{Binding}">
                                        <local:TypeMessage.Me>
                                            <DataTemplate>
                                                ...
                                            </DataTemplate>
                                        </local:TypeMessage.Me>
                                        <local:TypeMessage.Other>
                                            <DataTemplate>
                                                ...
                                            </DataTemplate>
                                        </local:TypeMessage.Other>
                                    </local:TypeMessage>
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                            <ListBox.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <VirtualizingStackPanel />
                                </ItemsPanelTemplate>
                            </ListBox.ItemsPanel>
                        </ListBox>
                        <Grid Grid.Row="3" ScrollViewer.VerticalScrollBarVisibility="Disabled">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="auto" />
                                <RowDefinition Height="auto" />
                            </Grid.RowDefinitions>
                            <tbox:WatermarkTextBox
                                                   ScrollViewer.VerticalScrollBarVisibility="Disabled"
                                                   />
                        </Grid>
                    </Grid>
                </StackPanel>
</ScrollViewer>
    </StackPanel>


</phone:PhoneApplicationPage>
4

1 に答える 1

2

問題はスタックパネルにありました。

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition />
    </Grid.RowDefinitions>
    <Grid Grid.Row="0" HorizontalAlignment="Left">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <TextBlock  />
        <TextBlock  >
            <TextBlock.Foreground>
                <SolidColorBrush Color="{StaticResource PhoneContrastBackgroundColor}"/>
            </TextBlock.Foreground>
        </TextBlock>
    </Grid>
    <ScrollViewer ScrollViewer.VerticalScrollBarVisibility="Visible"  Grid.Row="1" x:Name="_ScrollViewer">
            <Grid ScrollViewer.VerticalScrollBarVisibility="Disabled"> 
                    <Grid.RowDefinitions>
                        <RowDefinition Height="auto" />
                        <RowDefinition Height="auto" />
                    </Grid.RowDefinitions>
                <ListBox x:Name="listmy" ScrollViewer.VerticalScrollBarVisibility="Disabled"
                             Grid.Row="0">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <local:TypeMessage Content="{Binding}">
                                    <local:TypeMessage.Me>
                                     ...
                                    </local:TypeMessage.Me>
                                    <local:TypeMessage.Other>
                                    ...
                                    </local:TypeMessage.Other>
                                </local:TypeMessage>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                        <ListBox.ItemsPanel>
                            <ItemsPanelTemplate>
                                <VirtualizingStackPanel />
                            </ItemsPanelTemplate>
                        </ListBox.ItemsPanel>
                    </ListBox>
                <StackPanel Grid.Row="1" ScrollViewer.VerticalScrollBarVisibility="Disabled">
                    <tbox:WatermarkTextBox />
                </StackPanel>
            </Grid>

于 2012-08-05T09:22:21.063 に答える