Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/298.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
C# 升级到Fall Creators会导致UWP动画失败;未检测到已安装的组件。未指定动画目标。”;_C#_Uwp_Visual Studio 2017 - Fatal编程技术网

C# 升级到Fall Creators会导致UWP动画失败;未检测到已安装的组件。未指定动画目标。”;

C# 升级到Fall Creators会导致UWP动画失败;未检测到已安装的组件。未指定动画目标。”;,c#,uwp,visual-studio-2017,C#,Uwp,Visual Studio 2017,我有一个UWP项目,在将我的工作站升级到Windows 10 Fall Creators更新之前,动画效果很好。该应用程序构建得很好,但当我运行它并点击“即将到来”而不是播放动画时,现在我得到了一个例外 我正在运行Visual Studio 2017,我的构建目标是Fall创建者 以下是XAML页面: <Page x:Class="WaterCooler.JeopardyView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/pr

我有一个UWP项目,在将我的工作站升级到Windows 10 Fall Creators更新之前,动画效果很好。该应用程序构建得很好,但当我运行它并点击“即将到来”而不是播放动画时,现在我得到了一个例外

我正在运行Visual Studio 2017,我的构建目标是Fall创建者

以下是XAML页面:

<Page
x:Class="WaterCooler.JeopardyView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WaterCooler"
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

<Page.Resources>
    <local:StringToUpperConverter  x:Key="StringToUpperConverter"/>
    <Storyboard x:Name="ClueReveal" Completed="ClueReveal_Completed">
        <DoubleAnimation 
            EnableDependentAnimation="True"
            Storyboard.TargetName="ClueGrid"
            Storyboard.TargetProperty="Grid.Height"
            From="0.0" To="300.0" Duration="0:0:1"/>
        <DoubleAnimation/>
    </Storyboard>
    <Storyboard x:Name="ClueHide" Completed="ClueHide_Completed">
        <DoubleAnimation 
            EnableDependentAnimation="True"
            Storyboard.TargetName="ClueGrid"
            Storyboard.TargetProperty="Grid.Height"
            From="300.0" To="0.0" Duration="0:0:1"/>
    </Storyboard>
</Page.Resources>

<Grid Padding="0" Width="300" Height="600" Tapped="Grid_Tapped">
    <Grid.RowDefinitions>
        <RowDefinition />
        <RowDefinition/>
    </Grid.RowDefinitions>
    <Grid Width="300" Height="300" BorderBrush="Black" BorderThickness="10" Background="Blue" Tapped="Grid_Tapped">
        <controls:DropShadowPanel Grid.Row="0" BlurRadius="0.0" ShadowOpacity="1.0" OffsetX="3" OffsetY="3" Color="Black" HorizontalAlignment="Center" VerticalAlignment="Center">
            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="35" Foreground="White" FontWeight="ExtraBold" FontFamily="MS Sans Serif" Text="{Binding FallbackValue='COMING SOON', Converter={StaticResource StringToUpperConverter}}" />
        </controls:DropShadowPanel>
    </Grid>

    <Grid x:Name="ClueGrid" Width="300" Height="0" BorderBrush="Black" BorderThickness="10 5 10 10" Background="Blue" Grid.Row="1" VerticalAlignment="Top">
        <controls:DropShadowPanel  BlurRadius="0.0" ShadowOpacity="1.0" OffsetX="5" OffsetY="5" Color="Black" HorizontalAlignment="Center" VerticalAlignment="Center">
            <TextBlock FontSize="90" Foreground="Goldenrod" FontWeight="ExtraBold" FontFamily="MS Sans Serif" Text="$1000"/>
        </controls:DropShadowPanel>
    </Grid>

</Grid>

这里有一个小陷阱。您意外地在第一个
双动画
下方添加了一个空的双动画:

<Storyboard x:Name="ClueReveal" Completed="ClueReveal_Completed">
    <DoubleAnimation 
        EnableDependentAnimation="True"
        Storyboard.TargetName="ClueGrid"
        Storyboard.TargetProperty="Grid.Height"
        From="0.0" To="300.0" Duration="0:0:1"/>
    <!-- REMOVE THIS <DoubleAnimation/> -->
</Storyboard>

DoubleAnimation
为空,未指定目标,导致异常:-)

Exception thrown at 0x00007FFCD79C4008 (KernelBase.dll) in Water Cooler.exe: 
WinRT originate error - 0x800F1000 : 'Animation target not specified.'.
Exception thrown: 'System.Runtime.InteropServices.COMException' in Water 
Cooler.exe
An exception of type 'System.Runtime.InteropServices.COMException' occurred 
in Water Cooler.exe but was not handled in user code
No installed components were detected.

Animation target not specified.

The program '[7948] Water Cooler.exe' has exited with code 0 (0x0).
<Storyboard x:Name="ClueReveal" Completed="ClueReveal_Completed">
    <DoubleAnimation 
        EnableDependentAnimation="True"
        Storyboard.TargetName="ClueGrid"
        Storyboard.TargetProperty="Grid.Height"
        From="0.0" To="300.0" Duration="0:0:1"/>
    <!-- REMOVE THIS <DoubleAnimation/> -->
</Storyboard>