Visual studio 2008 在何处放置Scrollviewer visual studio手机

Visual studio 2008 在何处放置Scrollviewer visual studio手机,visual-studio-2008,windows-phone-7,scrollviewer,Visual Studio 2008,Windows Phone 7,Scrollviewer,我试图在网格之前将scollviewer放入该页面,然后所有文本框都消失了。我应该把scrollviewer放在哪里?警告1第17行位置6上的“网格”开始标记与“phone:PhoneApplicationPage”的结束标记不匹配。第74行,位置3。C:\Users\xxx\Desktop\exercises\u Copy1\exercises\Running jogging.xaml 74 3 exercises 并且,未找到元素网格的结束标记 <phone:PhoneApplicat

我试图在网格之前将scollviewer放入该页面,然后所有文本框都消失了。我应该把scrollviewer放在哪里?警告1第17行位置6上的“网格”开始标记与“phone:PhoneApplicationPage”的结束标记不匹配。第74行,位置3。C:\Users\xxx\Desktop\exercises\u Copy1\exercises\Running jogging.xaml 74 3 exercises

并且,未找到元素网格的结束标记

<phone:PhoneApplicationPage 
    x:Class="Excercises.Running_jogging"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="17*" />
            <ColumnDefinition Width="437*" />
            <ColumnDefinition Width="26*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>



        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0">
            <ScrollViewer>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="36*" />
                        <RowDefinition Height="83*" />
                        <RowDefinition Height="649*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="117*" />
                        <ColumnDefinition Width="229*" />
                        <ColumnDefinition Width="110*" />
                    </Grid.ColumnDefinitions>

                    <TextBlock x:Name="TextBlock1" Text="Let's get started" FontWeight="SemiBold" TextAlignment="Center" Height="30" Width="152" Grid.Column="1" />

                    <TextBlock Grid.Row="1" Height="59" HorizontalAlignment="Left" Margin="6,24,0,0" x:Name="TextBlock2" Text="Running is simple and healthy sport and it's also one of the most effective aerobic exercises. Additionally, running does not require large financial outlays. By running you will strengthen the circulatory and immune system and reduce tension caused by stress. Running also helps losing fat." TextWrapping="Wrap" VerticalAlignment="Top" Grid.ColumnSpan="3" Width="444" />
                    <TextBlock Grid.Row="2" Height="30" HorizontalAlignment="Left" x:Name="TextBlock3" Text="Warm-up before running" VerticalAlignment="Top" FontWeight="SemiBold" Grid.Column="1" Grid.ColumnSpan="2" />
                    <TextBlock Grid.Row="2" Height="114" HorizontalAlignment="Left" Margin="6,36,0,0" x:Name="TextBlock4" Text="TRUNK BENDING; Feet at shoulder height, straight legs at knees during the exercise. Bend to the left leg, then to the right and  at the end straighten the body. Repeat 20 times. " TextWrapping="Wrap" VerticalAlignment="Top" Grid.ColumnSpan="3" Width="456" />
                    <TextBlock Grid.Row="2" Height="167" HorizontalAlignment="Left" Margin="6,156,0,0" x:Name="TextBlock5" Text="PLANTAR FASCIA STRETCH; Sit on a chair or stool and cross your right foot over your left thigh. Grasp the toes of your right foot and pull them upward toward your shin. Hold this stretched position for at least 10 seconds. Release and repeat two to three times. Reverse. " VerticalAlignment="Top" Grid.ColumnSpan="3" Width="444" TextWrapping="Wrap" />
                    <TextBlock Grid.Row="2" Height="222" HorizontalAlignment="Left" Margin="6,329,0,0" x:Name="TextBlock6" Text="SEATED HEEL CORD STRETCH; Sit on floor or bench with both feet extended straight out in front of you. Do not lock knees. Wrap a towel around one foot and pull foot toward you. Push foot against the towel for five seconds while you hold the towel still. Relax foot and pull back toward you again. Repeat steps 3 and 4 twice. Reverse." VerticalAlignment="Top" Grid.ColumnSpan="3" Width="444" TextWrapping="Wrap"/>
                    <TextBlock Height="30" HorizontalAlignment="Left" x:Name="TextBlock7" Text="Running test" VerticalAlignment="Top" FontWeight="SemiBold" TextAlignment="Center" Grid.Column="1" Margin="43,557,0,0" Grid.Row="2" />
                    <TextBlock Grid.Row="2" Height="149" HorizontalAlignment="Left" Margin="6,593,0,0" x:Name="TextBlock8" Text="Test is to run continuously with constat pace. The best pace is a jogtrot a little faster than a fast walking. Run as long as you can and measure the time. According to your time choose the right week of the training." VerticalAlignment="Top" Grid.ColumnSpan="3" Width="450" TextWrapping="Wrap"/>
                    <TextBlock HorizontalAlignment="Left" Margin="6,790,0,-1018" x:Name="TextBlock9" Width="456"  TextWrapping="Wrap" Grid.ColumnSpan="3" Grid.Row="2" d:LayoutOverrides="GridBox"><Run Text="- Less then 2 minutes - begin with fast walking" /><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- 2-4 minutes - Week 1"/><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- 5-6 minutes - Week 3"/><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- 7-8 minutes - Week 4"/><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- 9-10 minutes - Week 6"/><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- 11-12 minutes - Week 7"/><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- 13-14 minutes - Week 8"/><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- More then 15 miuntes - Week 10 "/></TextBlock>
                    <Grid.Background>
                        <ImageBrush ImageSource="/Excercises;component/Images/tlo.png" />
                    </Grid.Background>
                </Grid>
            </ScrollViewer>
        </Grid>

        <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->
</phone:PhoneApplicationPage>

您的布局非常复杂,但您可以将scrollviewer放在ContentPanel中,并在其中创建一个新的网格

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0">
<ScrollViewer>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="36*" />
            <RowDefinition Height="83*" />
            <RowDefinition Height="649*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="117*" />
            <ColumnDefinition Width="229*" />
            <ColumnDefinition Width="110*" />
        </Grid.ColumnDefinitions>

        <TextBlock x:Name="TextBlock1" Text="Let's get started" FontWeight="SemiBold" TextAlignment="Center" Height="30" Width="152" Grid.Column="1" />

        <TextBlock Grid.Row="1" Height="59" HorizontalAlignment="Left" Margin="6,24,0,0" x:Name="TextBlock2" Text="Running is simple and healthy sport and it's also one of the most effective aerobic exercises. Additionally, running does not require large financial outlays. By running you will strengthen the circulatory and immune system and reduce tension caused by stress. Running also helps losing fat." TextWrapping="Wrap" VerticalAlignment="Top" Grid.ColumnSpan="3" Width="444" />
        <TextBlock Grid.Row="2" Height="30" HorizontalAlignment="Left" x:Name="TextBlock3" Text="Warm-up before running" VerticalAlignment="Top" FontWeight="SemiBold" Grid.Column="1" Grid.ColumnSpan="2" />
        <TextBlock Grid.Row="2" Height="114" HorizontalAlignment="Left" Margin="6,36,0,0" x:Name="TextBlock4" Text="TRUNK BENDING; Feet at shoulder height, straight legs at knees during the exercise. Bend to the left leg, then to the right and  at the end straighten the body. Repeat 20 times. " TextWrapping="Wrap" VerticalAlignment="Top" Grid.ColumnSpan="3" Width="456" />
        <TextBlock Grid.Row="2" Height="167" HorizontalAlignment="Left" Margin="6,156,0,0" x:Name="TextBlock5" Text="PLANTAR FASCIA STRETCH; Sit on a chair or stool and cross your right foot over your left thigh. Grasp the toes of your right foot and pull them upward toward your shin. Hold this stretched position for at least 10 seconds. Release and repeat two to three times. Reverse. " VerticalAlignment="Top" Grid.ColumnSpan="3" Width="444" TextWrapping="Wrap" />
        <TextBlock Grid.Row="2" Height="222" HorizontalAlignment="Left" Margin="6,329,0,0" x:Name="TextBlock6" Text="SEATED HEEL CORD STRETCH; Sit on floor or bench with both feet extended straight out in front of you. Do not lock knees. Wrap a towel around one foot and pull foot toward you. Push foot against the towel for five seconds while you hold the towel still. Relax foot and pull back toward you again. Repeat steps 3 and 4 twice. Reverse." VerticalAlignment="Top" Grid.ColumnSpan="3" Width="444" TextWrapping="Wrap"/>
        <TextBlock Height="30" HorizontalAlignment="Left" x:Name="TextBlock7" Text="Running test" VerticalAlignment="Top" FontWeight="SemiBold" TextAlignment="Center" Grid.Column="1" Margin="43,557,0,0" Grid.Row="2" />
        <TextBlock Grid.Row="2" Height="149" HorizontalAlignment="Left" Margin="6,593,0,0" x:Name="TextBlock8" Text="Test is to run continuously with constat pace. The best pace is a jogtrot a little faster than a fast walking. Run as long as you can and measure the time. According to your time choose the right week of the training." VerticalAlignment="Top" Grid.ColumnSpan="3" Width="450" TextWrapping="Wrap"/>
        <TextBlock HorizontalAlignment="Left" Margin="6,790,0,-1018" x:Name="TextBlock9" Width="456"  TextWrapping="Wrap" Grid.ColumnSpan="3" Grid.Row="2" d:LayoutOverrides="GridBox"><Run Text="- Less then 2 minutes - begin with fast walking" /><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- 2-4 minutes - Week 1"/><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- 5-6 minutes - Week 3"/><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- 7-8 minutes - Week 4"/><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- 9-10 minutes - Week 6"/><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- 11-12 minutes - Week 7"/><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- 13-14 minutes - Week 8"/><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- More then 15 miuntes - Week 10 "/></TextBlock>
        <Grid.Background>
            <ImageBrush ImageSource="/Excercises;component/Images/tlo.png" />
        </Grid.Background>
    </Grid>
</ScrollViewer>
</Grid>

您的布局非常复杂,但您可以将scrollviewer放在ContentPanel中,并在其中创建一个新的网格

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0">
<ScrollViewer>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="36*" />
            <RowDefinition Height="83*" />
            <RowDefinition Height="649*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="117*" />
            <ColumnDefinition Width="229*" />
            <ColumnDefinition Width="110*" />
        </Grid.ColumnDefinitions>

        <TextBlock x:Name="TextBlock1" Text="Let's get started" FontWeight="SemiBold" TextAlignment="Center" Height="30" Width="152" Grid.Column="1" />

        <TextBlock Grid.Row="1" Height="59" HorizontalAlignment="Left" Margin="6,24,0,0" x:Name="TextBlock2" Text="Running is simple and healthy sport and it's also one of the most effective aerobic exercises. Additionally, running does not require large financial outlays. By running you will strengthen the circulatory and immune system and reduce tension caused by stress. Running also helps losing fat." TextWrapping="Wrap" VerticalAlignment="Top" Grid.ColumnSpan="3" Width="444" />
        <TextBlock Grid.Row="2" Height="30" HorizontalAlignment="Left" x:Name="TextBlock3" Text="Warm-up before running" VerticalAlignment="Top" FontWeight="SemiBold" Grid.Column="1" Grid.ColumnSpan="2" />
        <TextBlock Grid.Row="2" Height="114" HorizontalAlignment="Left" Margin="6,36,0,0" x:Name="TextBlock4" Text="TRUNK BENDING; Feet at shoulder height, straight legs at knees during the exercise. Bend to the left leg, then to the right and  at the end straighten the body. Repeat 20 times. " TextWrapping="Wrap" VerticalAlignment="Top" Grid.ColumnSpan="3" Width="456" />
        <TextBlock Grid.Row="2" Height="167" HorizontalAlignment="Left" Margin="6,156,0,0" x:Name="TextBlock5" Text="PLANTAR FASCIA STRETCH; Sit on a chair or stool and cross your right foot over your left thigh. Grasp the toes of your right foot and pull them upward toward your shin. Hold this stretched position for at least 10 seconds. Release and repeat two to three times. Reverse. " VerticalAlignment="Top" Grid.ColumnSpan="3" Width="444" TextWrapping="Wrap" />
        <TextBlock Grid.Row="2" Height="222" HorizontalAlignment="Left" Margin="6,329,0,0" x:Name="TextBlock6" Text="SEATED HEEL CORD STRETCH; Sit on floor or bench with both feet extended straight out in front of you. Do not lock knees. Wrap a towel around one foot and pull foot toward you. Push foot against the towel for five seconds while you hold the towel still. Relax foot and pull back toward you again. Repeat steps 3 and 4 twice. Reverse." VerticalAlignment="Top" Grid.ColumnSpan="3" Width="444" TextWrapping="Wrap"/>
        <TextBlock Height="30" HorizontalAlignment="Left" x:Name="TextBlock7" Text="Running test" VerticalAlignment="Top" FontWeight="SemiBold" TextAlignment="Center" Grid.Column="1" Margin="43,557,0,0" Grid.Row="2" />
        <TextBlock Grid.Row="2" Height="149" HorizontalAlignment="Left" Margin="6,593,0,0" x:Name="TextBlock8" Text="Test is to run continuously with constat pace. The best pace is a jogtrot a little faster than a fast walking. Run as long as you can and measure the time. According to your time choose the right week of the training." VerticalAlignment="Top" Grid.ColumnSpan="3" Width="450" TextWrapping="Wrap"/>
        <TextBlock HorizontalAlignment="Left" Margin="6,790,0,-1018" x:Name="TextBlock9" Width="456"  TextWrapping="Wrap" Grid.ColumnSpan="3" Grid.Row="2" d:LayoutOverrides="GridBox"><Run Text="- Less then 2 minutes - begin with fast walking" /><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- 2-4 minutes - Week 1"/><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- 5-6 minutes - Week 3"/><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- 7-8 minutes - Week 4"/><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- 9-10 minutes - Week 6"/><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- 11-12 minutes - Week 7"/><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- 13-14 minutes - Week 8"/><Run Text=" "/><LineBreak/><Run Text=" "/><Run Text="- More then 15 miuntes - Week 10 "/></TextBlock>
        <Grid.Background>
            <ImageBrush ImageSource="/Excercises;component/Images/tlo.png" />
        </Grid.Background>
    </Grid>
</ScrollViewer>
</Grid>


您可以将其放置在外部,但需要在ScrollViewer上设置“Grid.Row=“1”Margin=“12,0”Grid.ColumnSpan=“3”,而不是在ContentPanel网格上。您可以将其放置在外部,但需要在ScrollViewer上而不是在ContentPanel网格上设置“Grid.Row=“1”Margin=“12,0”Grid.ColumnSpan=“3”。您忘记了关闭第一个网格。它向我表明了它的错误。那又怎样?还是一样。它在最后一行显示了一个错误:“未找到元素“grid”的结束标记”,有什么想法吗?我发布的xaml包含所有结束标记。您拥有的另一个控件可能未关闭。您的LayoutRoot网格未关闭。在应用条形码之前关闭它。您还可以根据忘记关闭第一个网格的XAML从layoutroot中删除列。它向我表明了它的错误。那又怎样?还是一样。它在最后一行显示了一个错误:“未找到元素“grid”的结束标记”,有什么想法吗?我发布的xaml包含所有结束标记。您拥有的另一个控件可能未关闭。您的LayoutRoot网格未关闭。在应用条形码之前关闭它。还可以基于该xaml从layoutroot中删除列