Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xaml ScrollView windows phone的问题_Xaml_Mvvm_Windows Phone 8_Scrollviewer - Fatal编程技术网

Xaml ScrollView windows phone的问题

Xaml ScrollView windows phone的问题,xaml,mvvm,windows-phone-8,scrollviewer,Xaml,Mvvm,Windows Phone 8,Scrollviewer,我刚刚开始为WindowsPhone8开发。我的ScrollViewer控制器有问题。它最初是工作的,但现在当我单击并拖动到面板底部时,我可以看到内容,直到我释放单击,然后它会弹回到视图的顶部 我已尝试删除动画,并尝试使用固定的堆栈面板高度。我还尝试使用不同的网格行。可能有语法错误吗?以下是xaml文件的一个片段,如有任何帮助,将不胜感激: <Grid x:Name="LayoutRoot" Background="#FFDBDBDB"> <i:Inte

我刚刚开始为WindowsPhone8开发。我的ScrollViewer控制器有问题。它最初是工作的,但现在当我单击并拖动到面板底部时,我可以看到内容,直到我释放单击,然后它会弹回到视图的顶部

我已尝试删除动画,并尝试使用固定的堆栈面板高度。我还尝试使用不同的网格行。可能有语法错误吗?以下是xaml文件的一个片段,如有任何帮助,将不胜感激:

    <Grid x:Name="LayoutRoot"
    Background="#FFDBDBDB">
    <i:Interaction.Triggers>
        <i:EventTrigger>
            <eim:ControlStoryboardAction Storyboard="{StaticResource PageViewAnimation}"/>
        </i:EventTrigger>
    </i:Interaction.Triggers>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" MinHeight="100" />
    </Grid.RowDefinitions>

    <StackPanel x:Name="TitlePanel"
        Grid.Row="0"
        Margin="12,0,0,0" Height="Auto" VerticalAlignment="Top">
        <Image x:Name="image1" Height="100" Source="/Assets/Logo/Logo.png" HorizontalAlignment="Left"/>

    <ScrollViewer x:Name="scrollViewer" Grid.Row="1">
        <StackPanel x:Name="ContentPanel"
                VerticalAlignment="Top" Margin="12,0,0,0">

            <!--CurrentJob-->
            <Image x:Name="image" Stretch="UniformToFill" Margin="0,0,12,0" VerticalAlignment="Top" Source="{Binding BusinessCardImage}" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <CompositeTransform/>
                </Image.RenderTransform>
            </Image>

            <!--CurrentJob-->
            <TextBlock x:Name="currentJobLbl" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Current Job" VerticalAlignment="Top" Margin="12,0,0,0"/>
            <TextBox x:Name="currentJobTxt" 
                TextWrapping="Wrap" 
                Text="{Binding CurrentJob, Mode=TwoWay}" 
                VerticalAlignment="Top"
                AcceptsReturn="True"
                Visibility="{Binding IsEditMode, Converter={StaticResource TrueToVisibleConverter}}"/>
            <TextBlock x:Name="currentJobTextBlock"
                TextWrapping="Wrap" 
                Text="{Binding CurrentJob, Mode=TwoWay}" 
                VerticalAlignment="Top"
                RenderTransformOrigin="0.5,0.5"
                Visibility="{Binding IsEditMode, Converter={StaticResource FalseToVisibleConverter}}"/>

            <!--Websites-->
            <TextBlock x:Name="websitesLbl" HorizontalAlignment="Left" Margin="12,0,0,0" TextWrapping="Wrap" Text="Websites" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5">
                <TextBlock.RenderTransform>
                    <CompositeTransform/>
                </TextBlock.RenderTransform>
            </TextBlock>
            <TextBox x:Name="websitesTxt"
                TextWrapping="Wrap" 
                Text="{Binding Websites, Mode=TwoWay}" 
                VerticalAlignment="Top"
                AcceptsReturn="True" RenderTransformOrigin="0.5,0.5"
                Visibility="{Binding IsEditMode, Converter={StaticResource TrueToVisibleConverter}}">
                <TextBox.RenderTransform>
                    <CompositeTransform/>
                </TextBox.RenderTransform>
            </TextBox>
            <TextBlock x:Name="websitesTextBlock"
                TextWrapping="Wrap" 
                Text="{Binding Websites, Mode=TwoWay}" 
                VerticalAlignment="Top"
                RenderTransformOrigin="0.5,0.5"
                Visibility="{Binding IsEditMode, Converter={StaticResource FalseToVisibleConverter}}">
                <TextBlock.RenderTransform>
                    <CompositeTransform/>
                </TextBlock.RenderTransform>
            </TextBlock>

                <Grid>
                    <Button x:Name="editSaveBtn" 
                        Content="{Binding EditSaveButtonText, Mode=TwoWay}" 
                        HorizontalAlignment="Center"
                        VerticalAlignment="Top" 
                        Width="150">
                        <i:Interaction.Triggers>
                            <i:EventTrigger EventName="Click" SourceName="editSaveBtn">
                                <Command:EventToCommand x:Name="InvokeEditModeCommand"
                                    Command="{Binding InvokeEditModeCommand, Mode=OneWay}"/>
                            </i:EventTrigger>
                        </i:Interaction.Triggers>
                    </Button>
                </Grid>
            </StackPanel>
    </ScrollViewer>
    </StackPanel>
</Grid>

尝试将网格行定义更改为:

<Grid.RowDefinitions>
    <RowDefinition Height="Auto" MinHeight="100" />
    <RowDefinition Height="*" />
</Grid.RowDefinitions>


我在想,也许你是想回答一个与这个问题不同的问题,朋友?可能会再次阅读OP问题。这是您的完整代码吗?scrollviewer上是否存在可能会影响点击可见性或其他内容的行为或任何内容?因为它是我看到的东西,我看不到他们在那里的其他东西的转变。