摘要: 上一个例子实现鼠标点击哪里矩形就用规定的时间跑到那里。无论距离长与否,都用相同的时间到达指点地点。本例子实现的功能:点击canvas的某一处,矩形按规定速度移动,无论长度是长是短。前台UI设计:View Code1 <Window x:Class="WPF应用程序1.MainWindow"2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 阅读全文
posted @ 2012-12-08 12:02 BellingWP 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 话不多少,一切尽在程序中。本例子实现功能:在canvas中定义一个矩形,然后鼠标点击哪里,该矩形就会跟到哪里。前台UI代码:View Code 1 <Window x:Class="WPF应用程序1.MainWindow"2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"4 Title="MainWindow" He 阅读全文
posted @ 2012-12-08 09:59 BellingWP 阅读(238) 评论(0) 推荐(0) 编辑