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.
找不到一种方法来定位UIElementMetro 风格应用程序的绝对位置。有人知道解决方案吗?
UIElement
(上下文:我希望在调用它的按钮旁边显示一个弹出窗口)
这应该工作...
private void Button_Click(object sender, RoutedEventArgs e) { var button = sender as Button; var ttv = button.TransformToVisual(Window.Current.Content); Point screenCoords = ttv.TransformPoint(new Point(0, 0)); }