Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试监视鼠标在应用程序窗口上的移动,以便每当鼠标移动时,它的坐标都会反映在两个文本控件中
是否可以仅在 XAML 中执行(无代码)?
不,您必须编写代码。只能通过调用 Mouse.GetPosition 方法来获取鼠标位置。这不是您可以在 XAML 中表示的东西。