我在我的代码中收到以下错误,我在属性选项卡中更改了 2 个按钮的名称。
Error 1 The type 'x100.MainWindow' already contains a definition for 'startBtn
Error 2 The type 'x100.MainWindow' already contains a definition for 'listBtn'
这是我的 XAML 文件
<Window x:Class="x100.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="696" Width="538">
<Grid>
<Button x:Name="startBtn" Content="Start" HorizontalAlignment="Left" Height="55" Margin="10,601,0,0" VerticalAlignment="Top" Width="101" Click="startBtn"/>
<Button x:Name="listBtn" Content="List (.exe)" HorizontalAlignment="Left" Height="55" Margin="126,601,0,0" VerticalAlignment="Top" Width="105"/>
<TextBox x:Name="txtBoxShow" HorizontalAlignment="Left" Height="596" Margin="10,0,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="510"/>
<Button Content="List (.jpg)" HorizontalAlignment="Left" Height="55" Margin="247,601,0,0" VerticalAlignment="Top" Width="105"/>
</Grid>
</Window>
任何帮助表示赞赏,谢谢!