29 lines
705 B
C#
29 lines
705 B
C#
using System.Text;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Navigation;
|
|
using System.Windows.Shapes;
|
|
|
|
namespace WPF路由事件_7_鼠标状态;
|
|
|
|
/// <summary>
|
|
/// Interaction logic for MainWindow.xaml
|
|
/// </summary>
|
|
public partial class MainWindow : Window
|
|
{
|
|
public MainWindow()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void UIElement_OnMouseMove(object sender, MouseEventArgs e)
|
|
{
|
|
var position = e.GetPosition(this);
|
|
Console.WriteLine($"x:{position.X},y:{position.Y}");
|
|
}
|
|
} |