Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/24.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/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
WPF:C#:名称;相互作用或事件触发或控制;命名空间中不存在“0”&引用;_C#_.net_Wpf_Xaml - Fatal编程技术网

WPF:C#:名称;相互作用或事件触发或控制;命名空间中不存在“0”&引用;

WPF:C#:名称;相互作用或事件触发或控制;命名空间中不存在“0”&引用;,c#,.net,wpf,xaml,C#,.net,Wpf,Xaml,这是我的代码,我已经搜索了stackoverflow中给出的所有解决方案或答案,但没有帮助我。 以前,当这个错误发生时,我只是构建它并开始工作,但每次它给我不同部分的相同错误。我已经寻找了所有可能的解决办法,但没有帮助我 <Window xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x = "http://schemas.microsoft.com/winfx/2006/x

这是我的代码,我已经搜索了stackoverflow中给出的所有解决方案或答案,但没有帮助我。 以前,当这个错误发生时,我只是构建它并开始工作,但每次它给我不同部分的相同错误。我已经寻找了所有可能的解决办法,但没有帮助我

<Window 
   xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
   xmlns:x = "http://schemas.microsoft.com/winfx/2006/xaml" 
   xmlns:d = "http://schemas.microsoft.com/expression/blend/2008" 
   xmlns:mc = "http://schemas.openxmlformats.org/markup-compatibility/2006" 
   xmlns:local = "clr-namespace:WPFBehaviors" 
   xmlns:i = "http://schemas.microsoft.com/expression/2010/interactivity" 
   xmlns:ei = "http://schemas.microsoft.com/expression/2010/interactions" 
   x:Class = "WPFBehaviors.MainWindow" 
   mc:Ignorable = "d" Title = "MainWindow" Height = "350" Width = "604">
    <Window.Resources>
        <Storyboard x:Key="Storyboard1" RepeatBehavior="Forever" AutoReverse="True">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="ellipse">
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="301.524" />
                <EasingDoubleKeyFrame KeyTime="0:0:2" Value="2.909" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty= "(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="ellipse">
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="-0.485" />
                <EasingDoubleKeyFrame KeyTime="0:0:2" Value="0" />
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(ContentControl.Content)" Storyboard.TargetName="button">
                <DiscreteObjectKeyFrame KeyTime="0" Value="Play" />
            </ObjectAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(ContentControl.Content)" Storyboard.TargetName="button1">
                <DiscreteObjectKeyFrame KeyTime="0" Value="Stop" />
                <DiscreteObjectKeyFrame KeyTime="0:0:2" Value="Stop" />
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
    </Window.Resources>
    <Window.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Storyboard="{StaticResource Storyboard1}" />
        </EventTrigger>
    </Window.Triggers>
    <Grid>
        <Ellipse x:Name="ellipse" Fill="#FFAAAAC5" HorizontalAlignment="Left" Height="50.901" Margin="49.324, 70.922,0,0" Stroke="Black" VerticalAlignment="Top" Width="73.684" RenderTransformOrigin="0.5,0.5">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Ellipse.RenderTransform>
        </Ellipse>
        <Button x:Name = "button" Content = "Play" HorizontalAlignment = "Left" Height = "24.238"
         Margin = "63.867,0,0,92.953" VerticalAlignment = "Bottom" Width = "74.654">
            <i:Interaction.Triggers>
                <i:EventTrigger EventName = "Click">
                    <ei:ControlStoryboardAction Storyboard = "{StaticResource Storyboard1}"/>
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </Button>

        <Button x:Name = "button1" Content = "Stop" HorizontalAlignment = "Left" Height = "24.239"
         Margin = "160.82,0,0,93.922" VerticalAlignment = "Bottom" Width = "75.138">
            <i:Interaction.Triggers>
                <i:EventTrigger EventName = "Click">
                    <ei:ControlStoryboardAction ControlStoryboardOption = "Stop"
                  Storyboard = "{StaticResource Storyboard1}"/>
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </Button>
    </Grid>
</Window>

对于使用此XAML的所有项目,您可以检查对的引用
Microsoft.Expression.InteractionsSystem.Windows.Interactivity(添加引用时请小心使用框架版本!)

对于使用此XAML的所有项目,您可以检查对它们的引用
Microsoft.Expression.InteractionsSystem.Windows.Interactivity(添加引用时请小心使用框架版本!)

提供有关在提供的代码中出现此错误的详细信息,并从代码中删除不适用于此问题的项。你的问题被标记为C。你也有C#代码吗?这个链接有用吗?Gerard Sexton,谢谢你的回复,但是C#中没有代码,都是在wpf中完成的,错误出现在,标记中。提供一些关于在提供的代码中发生此错误的详细信息,并从代码中删除不适用于该问题的项。你的问题被标记为C。你也有C#代码吗?这个链接有用吗?杰拉德·塞克斯顿,谢谢你的回复,但是C#中没有代码,都是在wpf中完成的,错误出现在,标记中。