例如以下Slider標籤,ValueChanged事件,將無法執行
若改以在WindowLoaded事件載入,就可以正常運作
AddHandler slider.ValueChanged, AddressOf slider_ValueChanged
Private Sub slider_ValueChanged(ByVal sender As System.Object, ByVal e As System.Windows.RoutedPropertyChangedEventArgs(Of System.Double))
Dim i As Integer
scaleTransform1.ScaleX = e.NewValue
scaleTransform1.ScaleY = e.NewValue
Dim centerOfViewport = New Point(scrollViewer.ViewportWidth / 2, scrollViewer.ViewportHeight / 2)
lastCenterPositionOnTarget = scrollViewer.TranslatePoint(centerOfViewport, grid)
沒有留言:
張貼留言