2016-04-04 22 views
1

ad alanında mevcut değil. Bu benim kodum, stackoverflow'ta verilen tüm çözümleri veya yanıtları aradım, ancak bana yardımcı olmadı. Önceden bu hata oluştuğunda, onu yapıyorum ve çalışmaya başlayacağım, ancak her defasında bana farklı bölümler için aynı hatayı veriyor. Bütün olası çözümü aradım ama bana yardım etmedim. Eğer Microsoft.Expression.Interactions ve System.Windows.Interactivity doğru referansları kontrol edebilirsiniz bu XAML kullanılarak tüm projeler içinWPF: C#: "Etkileşim veya eventtrigger veya contolstroyboardaction" adı, "

<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> 
+0

bazı sağlayın Sağlanan kodda bu hatanın nerede oluştuğu ve soruna uygulanamayan koddaki öğeleri kaldırma hakkında daha fazla ayrıntı. Sorunuz C# olarak etiketlendi. C# kodunuz var mı? –

+0

Bu bağlantı https://social.msdn.microsoft.com/Forums/vstudio/en-US/327abb86-d579-470d-b1fe-f2cfcd170336/what-assembly-is-xmlnsihttpschemasmicrosoftcomexpression2010interactivity-in?forum=wpf? Yardımcı olur mu? – auburg

+0

Gerard Sexton, Cevabınız için teşekkür ederiz, –

cevap

0

(referanslar eklerken çerçeve sürümleri ile dikkatli olun!)