xaml代码:
<Window x:Class="垃圾桶.MainWindow"
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:垃圾桶"
mc:Ignorable="d"
Title="MainWindow" WindowState="Maximized" WindowStyle="None" Background="White" ShowInTaskbar="False" Loaded="Window_Loaded">
<Canvas x:Name="BG">
<Image x:Name="box" Source="img/box.png" Width="200" Height="200" MouseLeftButtonDown="box_MouseLeftButtonDown"></Image>
<Image x:Name="gb" Source="img/lajik.png" Width="400" Height="400"></Image>
</Canvas>
</Window>
cs代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows