0

Есть кнопки с названиями Button_Edit и Button_Delete. Но в коде выводит ошибку "не существует в текущем контексте".

<Grid>
    <ListView x:Name="LV_Goals" Background="#202020" BorderBrush="#202020" SelectionChanged="LV_Goals_SelectionChanged">
        <ListView.ItemTemplate>
            <DataTemplate>
                <Grid x:Name="MainGrid" Width="310" Height="25">
                &lt;Grid.ColumnDefinitions&gt;
                    &lt;ColumnDefinition&gt;&lt;/ColumnDefinition&gt;
                    &lt;ColumnDefinition Width=&quot;50&quot;&gt;&lt;/ColumnDefinition&gt;
                &lt;/Grid.ColumnDefinitions&gt;

                &lt;Grid Height=&quot;20&quot;&gt;
                    &lt;TextBlock Text=&quot;{Binding ProjectName}&quot; VerticalAlignment=&quot;Center&quot;&gt;&lt;/TextBlock&gt;
                &lt;/Grid&gt;

                &lt;Grid x:Name=&quot;Grid_Buttons&quot; Grid.Column=&quot;1&quot; HorizontalAlignment=&quot;Right&quot; MouseEnter=&quot;Grid_Buttons_MouseEnter&quot;&gt;
                    &lt;StackPanel Orientation=&quot;Horizontal&quot;&gt;

                        &lt;Button x:Name=&quot;Button_Edit&quot; Height=&quot;25&quot; Width=&quot;25&quot; BorderThickness=&quot;0&quot;&gt;
                            &lt;Image Source=&quot;/Resources/Edit.png&quot;&gt;&lt;/Image&gt;
                        &lt;/Button&gt;

                        &lt;Button x:Name=&quot;Button_Delete&quot; Height=&quot;25&quot; Width=&quot;25&quot; BorderThickness=&quot;0&quot;&gt;
                            &lt;Image Source=&quot;/Resources/Remove.png&quot;&gt;&lt;/Image&gt;
                        &lt;/Button&gt;

                    &lt;/StackPanel&gt;
                &lt;/Grid&gt;
            &lt;/Grid&gt;
        &lt;/DataTemplate&gt;
    &lt;/ListView.ItemTemplate&gt;
&lt;/ListView&gt;

</Grid>

0 Answers0