首页 > 其他 > 详细

WPF草稿

时间:2014-05-10 08:09:23      阅读:383      评论:0      收藏:0      [点我收藏+]
public Point TranslatePoint(
	Point point,
	UIElement relativeTo
)
 
private void OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
    // Retrieve the coordinate of the mouse position.
    Point pt = e.GetPosition((UIElement)sender);

    // Perform the hit test against a given portion of the visual object tree.
    HitTestResult result = VisualTreeHelper.HitTest(myCanvas, pt);

    if (result != null)
    {
        // Perform action on hit visual object.
    }
}
 
 

WPF草稿,布布扣,bubuko.com

WPF草稿

原文:http://www.cnblogs.com/xpvincent/p/3719241.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!