码迷,mamicode.com
首页 > 其他好文 > 详细

WPF草稿

时间:2014-05-10 08:09:34      阅读:225      评论:0      收藏:0      [点我收藏+]

标签:tar   c   int   get   a   cti   

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草稿

标签:tar   c   int   get   a   cti   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!