|
53 | 53 | Set(value As Boolean) |
54 | 54 | If _Show = value Then Return |
55 | 55 | _Show = value |
56 | | - RunInUi(Sub() |
57 | | - If value Then |
58 | | - '有了 |
59 | | - Visibility = Visibility.Visible |
60 | | - AniStart({ |
61 | | - AaScaleTransform(Me, 0.3 - CType(RenderTransform, ScaleTransform).ScaleX, 500, 60, New AniEaseOutFluent(AniEasePower.Weak)), |
62 | | - AaScaleTransform(Me, 0.7, 500, 60, New AniEaseOutBack(AniEasePower.Weak)), |
63 | | - AaHeight(Me, 50 - Height, 200,, New AniEaseOutFluent(AniEasePower.Weak)) |
64 | | - }, "MyExtraButton MainScale " & Uuid) |
65 | | - Else |
66 | | - '没了 |
67 | | - AniStart({ |
68 | | - AaScaleTransform(Me, -CType(RenderTransform, ScaleTransform).ScaleX, 100,, New AniEaseInFluent(AniEasePower.Weak)), |
69 | | - AaHeight(Me, -Height, 400, 100, New AniEaseOutFluent()), |
70 | | - AaCode(Sub() Visibility = Visibility.Collapsed,, True) |
71 | | - }, "MyExtraButton MainScale " & Uuid) |
72 | | - End If |
73 | | - IsHitTestVisible = value '防止缩放动画中依然可以点进去 |
74 | | - End Sub) |
| 56 | + RunInUi( |
| 57 | + Sub() |
| 58 | + If value Then |
| 59 | + '有了 |
| 60 | + Visibility = Visibility.Visible |
| 61 | + AniStart({ |
| 62 | + AaScaleTransform(Me, 0.3 - CType(RenderTransform, ScaleTransform).ScaleX, 500, 60, New AniEaseOutFluent(AniEasePower.Weak)), |
| 63 | + AaScaleTransform(Me, 0.7, 500, 60, New AniEaseOutBack(AniEasePower.Weak)), |
| 64 | + AaHeight(Me, 50 - Height, 200,, New AniEaseOutFluent(AniEasePower.Weak)) |
| 65 | + }, "MyExtraButton MainScale " & Uuid) |
| 66 | + Else |
| 67 | + '没了 |
| 68 | + AniStart({ |
| 69 | + AaScaleTransform(Me, -CType(RenderTransform, ScaleTransform).ScaleX, 100,, New AniEaseInFluent(AniEasePower.Weak)), |
| 70 | + AaHeight(Me, -Height, 400, 100, New AniEaseOutFluent()), |
| 71 | + AaCode(Sub() Visibility = Visibility.Collapsed,, True) |
| 72 | + }, "MyExtraButton MainScale " & Uuid) |
| 73 | + End If |
| 74 | + IsHitTestVisible = value '防止缩放动画中依然可以点进去 |
| 75 | + End Sub) |
75 | 76 | End Set |
76 | 77 | End Property |
77 | 78 | Public Delegate Function ShowCheckDelegate() As Boolean |
|
137 | 138 | AaScaleTransform(PanScale, 1 - CType(PanScale.RenderTransform, ScaleTransform).ScaleX, 300,, New AniEaseOutBack) |
138 | 139 | }, "MyExtraButton Scale " & Uuid) |
139 | 140 | End If |
| 141 | + If IsLeftMouseHeld Then RaiseCustomEvent() |
140 | 142 | IsLeftMouseHeld = False |
141 | 143 | RefreshColor() '直接刷新颜色以判断是否已触发 MouseLeave |
142 | 144 | End Sub |
|
199 | 201 | ''' 发出一圈波浪效果提示。 |
200 | 202 | ''' </summary> |
201 | 203 | Public Sub Ribble() |
202 | | - RunInUi(Sub() |
203 | | - Dim Shape As New Border With {.CornerRadius = New CornerRadius(1000), .BorderThickness = New Thickness(0.001), .Opacity = 0.5, .RenderTransformOrigin = New Point(0.5, 0.5), .RenderTransform = New ScaleTransform()} |
204 | | - Shape.SetResourceReference(Border.BackgroundProperty, "ColorBrush5") |
205 | | - PanScale.Children.Insert(0, Shape) |
206 | | - AniStart({ |
207 | | - AaScaleTransform(Shape, 13, 1000, Ease:=New AniEaseInoutFluent(AniEasePower.Strong, 0.3)), |
208 | | - AaOpacity(Shape, -Shape.Opacity, 1000), |
209 | | - AaCode(Sub() PanScale.Children.Remove(Shape), After:=True) |
210 | | - }, "ExtraButton Ribble " & GetUuid()) |
211 | | - End Sub) |
| 204 | + RunInUi( |
| 205 | + Sub() |
| 206 | + Dim shape As New Border With {.CornerRadius = New CornerRadius(1000), .BorderThickness = New Thickness(0.001), .Opacity = 0.5, .RenderTransformOrigin = New Point(0.5, 0.5), .RenderTransform = New ScaleTransform()} |
| 207 | + shape.SetResourceReference(Border.BackgroundProperty, "ColorBrush5") |
| 208 | + PanScale.Children.Insert(0, shape) |
| 209 | + AniStart({ |
| 210 | + AaScaleTransform(shape, 13, 1000, Ease:=New AniEaseInoutFluent(AniEasePower.Strong, 0.3)), |
| 211 | + AaOpacity(shape, -shape.Opacity, 1000), |
| 212 | + AaCode(Sub() PanScale.Children.Remove(shape), After:=True) |
| 213 | + }, "ExtraButton Ribble " & GetUuid()) |
| 214 | + End Sub) |
212 | 215 | End Sub |
213 | 216 |
|
214 | 217 | End Class |
0 commit comments