2017-05-12 8 views
0

他に誰かがこの問題に遭遇しましたか?私は、Visual Stuido 2015教授を使用していると私はItemsControl.ItemTemplateでInteraction.Triggersを使用する場合、設計者は、次のexeptionをスロー:デザインタイムに 'XamlParseException'を引き起こす相互作用。トリガー

'XamlParseException: Collection property 'System.Windows.Controls.AnyControl'.'Triggers' is null.' 

(AnyControl:私は画像内のトリガーを置く場合、それは画像等です)

プログラムは実行時に問題なく実行されます。

私はデザイナのビューを見たいときにトリガをコメント/コメント解除する必要があるので、ちょっと面倒です。

例のコードスニペットの一部:

<Grid> 
    <ItemsControl ItemsSource="{Binding Currencies}"> 
     <ItemsControl.ItemTemplate> 
      <DataTemplate> 
       <Grid Margin="3,3,20,3"> 

        <StackPanel Grid.Column="0" Margin="0,0,2,0" VerticalAlignment="Center" Background="Transparent"> 
         <i:Interaction.Triggers> 
          <i:EventTrigger EventName="MouseEnter"> 
           <i:InvokeCommandAction Command="{Binding DataContext.MouseEnterCommand, RelativeSource={RelativeSource AncestorType=Window}}" 
                  CommandParameter="{Binding .}" /> 
          </i:EventTrigger> 
         </i:Interaction.Triggers> 

         <Image Width="50" Height="50" 
           Source="{Binding Settings.ActiveImage}" ToolTipService.ShowDuration="30000"> 

など

+1

[this](http://stackoverflow.com/a/43642741/5976576) – MotKohn

答えて

0

それは、私は、Visual Studio 2017にアップグレードし、それが働いているのVisual Studio 2015 の問題でした。

関連する問題