浏览 2495 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2012-04-22
If e.Delta > 0 Then Label3.Content = Label3.Content + 1 Else Label3.Content = Label3.Content - 1 End If e.Delta > 0表示向上滚,否则为向下滚
接上节,完整代码如下: Partial Public Class MainPage Inherits UserControl Private currentlocation As Point Public Sub New() InitializeComponent() End Sub Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click Label1.Content = "您好," & TextBox1.Text & "!" End Sub Private Sub LayoutRoot_MouseMove(sender As System.Object, e As System.Windows.Input.MouseEventArgs) Handles LayoutRoot.MouseMove currentlocation = e.GetPosition(LayoutRoot) Label2.Content = "现在鼠标的坐标是:(" & currentlocation.X.ToString() & "," & currentlocation.Y.ToString() & ")" End Sub Private Sub LayoutRoot_MouseLeftButtonDown(sender As System.Object, e As System.Windows.Input.MouseButtonEventArgs) Handles LayoutRoot.MouseLeftButtonDown MessageBox.Show("您按了左键") End Sub Private Sub LayoutRoot_MouseRightButtonDown(sender As System.Object, e As System.Windows.Input.MouseButtonEventArgs) Handles LayoutRoot.MouseRightButtonDown MessageBox.Show("您按了右键") End Sub Private Sub Label3_MouseWheel(sender As System.Object, e As System.Windows.Input.MouseWheelEventArgs) Handles Label3.MouseWheel If e.Delta > 0 Then Label3.Content = Label3.Content + 1 Else Label3.Content = Label3.Content - 1 End If End Sub End Class 截图如下:
整个工程代码见附件
声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2012-04-27
还有人研究silverlight? 微软不是已经要放弃silverlight了吗?
|
|
返回顶楼 | |
发表时间:2012-04-27
不会呀,要不就不会有silverlight5了,是在加强,尤其是在winphone和游戏方面,大有超过flash之势,它的3D是真3D
|
|
返回顶楼 | |