This repository has been archived by the owner on Sep 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form1.vb
48 lines (40 loc) · 2.02 KB
/
Form1.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Imports DevExpress.Utils.Animation
Imports DevExpress.XtraEditors
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
' Populate the ImageComboBox with available transition types.
ImageComboBoxEdit1.Properties.Items.AddEnum(GetType(DevExpress.Utils.Animation.Transitions))
AddHandler ImageComboBoxEdit1.SelectedIndexChanged, AddressOf ImageComboBoxEdit1_SelectedIndexChanged
ImageComboBoxEdit1.SelectedIndex = 0
XtraTabControl1.Transition.AllowTransition = DevExpress.Utils.DefaultBoolean.True
End Sub
Private Sub ImageComboBoxEdit1_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim imComboBox As ImageComboBoxEdit = TryCast(sender, ImageComboBoxEdit)
' Specify the transition type.
Dim trType As DevExpress.Utils.Animation.Transitions = DirectCast(imComboBox.EditValue, DevExpress.Utils.Animation.Transitions)
XtraTabControl1.Transition.TransitionType = CreateTransitionInstance(trType)
End Sub
Private Function CreateTransitionInstance(transitionType As Transitions) As BaseTransition
Select Case transitionType
Case Transitions.Dissolve
Return New DissolveTransition()
Case Transitions.Fade
Return New FadeTransition()
Case Transitions.Shape
Return New ShapeTransition()
Case Transitions.Clock
Return New ClockTransition()
Case Transitions.SlideFade
Return New SlideFadeTransition()
Case Transitions.Cover
Return New CoverTransition()
Case Transitions.Comb
Return New CombTransition()
Case Else
Return New PushTransition()
End Select
End Function
Private Sub XtraTabControl1_SelectedPageChanged(sender As Object, e As DevExpress.XtraTab.TabPageChangedEventArgs) Handles XtraTabControl1.SelectedPageChanged
Threading.Thread.Sleep(500)
End Sub
End Class