I run the project in the studio, and an error is detected, previously everything was fine, but today there’s a glitch, for some reason, all the namespaces for xaml have flown.

Error property "EventName" does not exist in the XML namespace " http://schemas.microsoft.com/winfx/2006/xaml/presentation ". Line 36 position 47. wpf [arcer C: \ Users \ Vladimir \ Documents \ Visual Studio 2017 \ Projects \ wpf [arcer \ wpf [arcer \ View \ MainWindow.xaml 36

Error XDG0048 The specified value cannot be assigned to the collection. The following type is required: "TriggerBase". wpf [arcer MainWindow.xaml 36

I read something on the stack and added links, rebuilt the solution, but alas, the errors do not go away.

Here is the markup.

<Window x:Class="wpf_arcer.View.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:customObjects="clr-namespace:wpf_arcer.View" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800"> <Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> <TabControl HorizontalAlignment="Left" Height="400" Margin="10,10,0,0" VerticalAlignment="Top" Width="772"> <TabItem Name="Parse" Header="Парсинг"> <Grid Background="#FFE5E5E5" Margin="0,-5,0,5"> <Grid.ColumnDefinitions> <ColumnDefinition Width="672*"/> </Grid.ColumnDefinitions> <Grid HorizontalAlignment="Left" Height="351" Margin="10,10,0,0" VerticalAlignment="Top" Width="725" Grid.ColumnSpan="5"> <Label Content="Список категорий" HorizontalAlignment="Left" Height="23" Margin="27,13,0,0" VerticalAlignment="Top" Width="100"/> </Grid> <Button Command="{Binding CommandToRun}" Content="Получить список категорий" HorizontalAlignment="Left" Height="35" Margin="28,326,0,0" VerticalAlignment="Top" Width="155" Grid.Column="4"/> <Label Content="Глубина парсинга" HorizontalAlignment="Left" Height="25" Margin="318,48,0,0" VerticalAlignment="Top" Width="106"/> <TextBox HorizontalAlignment="Left" Height="25" Margin="437,47,0,0" TextWrapping="Wrap" Text="{Binding NumberPages, Mode=TwoWay}" VerticalAlignment="Top" Width="67"/> <Button Command="{Binding CommandToPars}" Content="Парсить выбранные страницы" HorizontalAlignment="Left" Height="25" Margin="536,47,0,0" VerticalAlignment="Top" Width="199" RenderTransformOrigin="0.9,0.67"/> <customObjects:CustomListBox x:Name="ListBox" SelectionMode="Multiple" ItemsSource="{Binding Rubrikses, Mode=TwoWay}" SelectedItemsList="{Binding SelectedPlanshets, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.ColumnSpan="5" Margin="0,47,449,55" ></customObjects:CustomListBox> </Grid> </TabItem> <TabItem Name="Data" Header="Данные"> <Grid Background="#FFE5E5E5"> <Grid HorizontalAlignment="Left" Height="361" Margin="10,10,0,0" VerticalAlignment="Top" Width="722"> <DataGrid SelectedItem="{Binding CurrentItem, Mode=TwoWay}" ItemsSource="{Binding Data}" HorizontalAlignment="Left" Height="237" Margin="31,47,0,0" VerticalAlignment="Top" Width="648" > <i:Interaction.Triggers> <EventTrigger EventName="MouseDoubleClick"> <i:InvokeCommandAction Command="{Binding OpenWindow}" CommandParameter=""/> </EventTrigger> </i:Interaction.Triggers> </DataGrid> <Button Command="{Binding CommandGetDataFromBase}" Content="Получить данные из базы" HorizontalAlignment="Left" Height="27" Margin="227,301,0,0" VerticalAlignment="Top" Width="249"/> <Label Content="Поиск в базе" HorizontalAlignment="Left" Height="32" Margin="31,8,0,0" VerticalAlignment="Top" Width="85"/> <TextBox HorizontalAlignment="Left" Height="20" Margin="134,10,0,0" TextWrapping="Wrap" Text="{Binding FilterText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Top" Width="545"/> </Grid> </Grid> </TabItem> </TabControl> </Grid> </Window> 
  • one
    Because you need to write i:EventTrigger (lost namespace) - Andrew NOP
  • @AndreyNOP Thank you for the answer, but I’ll put more mistakes; in my case, what place should I put? - Vladimr Vladimirovoch
  • one
    Correct the namespace yet: xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" - Andrey NOP
  • one
    Well, you have an EventTrigger only in one place, that's where the i: prefix is ​​needed i: add - Andrey NOP
  • one
    Do you have a System.Windows.Interactivity assembly connected to the project? - Andrey NOP

0