1

次のエラーが表示されます。

エラー: 17 行目の 6 番目の「Grid」開始タグが「phone:PhoneApplicationPage」の終了タグと一致しません。

このエラーを解決するために多くのことを試みましたが、失敗しました。これを解決する方法を教えてください。

私のコードは次のとおりです。

<phone:PhoneApplicationPage
x:Class="wmvplayer.MainPage"
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"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="True">

<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
    </Grid.RowDefinitions>


<!--TitlePanel contains the name of the application and page title-->
    <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
        <TextBlock Text="WMV Player" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
    </StackPanel>
    <StackPanel Background="Black">

        <!-- To interactively stop, pause, and play the media, the LoadedBehavior 
       property of the MediaElement must be set to "Manual". -->
        <MediaElement Source="media\numbers.wmv" Name="myMediaElement" 
 Width="450" Height="250" Stretch="Fill" 
 MediaOpened="Element_MediaOpened" MediaEnded="Element_MediaEnded"/>

        <StackPanel HorizontalAlignment="Center" Width="450" Orientation="Horizontal">

            <Image Source="play.png" MouseEnter="OnMouseDownPlayMedia" Margin="5" />

            <!-- Pause button. -->
            <Image Source="pause.png" MouseEnter="OnMouseDownPauseMedia" Margin="5" />

            <!-- Stop button. -->
            <Image Source="stop.png" MouseLeave="OnMouseDownStopMedia" Margin="5" />

            <!-- Volume slider. This slider allows a Volume range between 0 and 1. -->
            <TextBlock Foreground="White" VerticalAlignment="Center" Margin="5"  >Volume</TextBlock>
            <Slider Name="volumeSlider" VerticalAlignment="Center" ValueChanged="ChangeMediaVolume" 
   Minimum="0" Maximum="1" Value="0.5" Width="70"/>

            <!-- Volume slider. This slider allows you to change the speed of the media playback. -->
            <TextBlock Foreground="White" Margin="5"  VerticalAlignment="Center">Speed</TextBlock>
            <Slider Name="speedRatioSlider" VerticalAlignment="Center" ValueChanged="ChangeMediaSpeedRatio" 
   Value="1" Width="70" />

            <!-- Seek to slider. Ths slider allows you to jump to different parts of the media playback. -->
            <TextBlock Foreground="White" Margin="5"  VerticalAlignment="Center">Seek To</TextBlock>
            <Slider Name="timelineSlider" Margin="5" ValueChanged="SeekToMediaPosition" Width="70"/>

        </StackPanel>
    </StackPanel>
    </Grid> </phone:PhoneApplicationPage>
4

1 に答える 1