Hi guys.
I am trying to make a dock menu with WPF but my question is on VB.NET side. Anyway, basically I want some kind of a control array but I don't know how to write it.
I have objects in dock are called _1, _2, _3, etc... from left to right. In WPF they are images. On solution explorer they appear as "_1 As Image".
Mainly, what I need is:
Now this will rise the moseovered (there is no MouseHover in WPF thus is MouseEnter) object 100 pixel up while pushing the other objects to left and right. It will bring a dock like menu effect.
Who may help me for the right expression?
Thanks a lot!!!
I am trying to make a dock menu with WPF but my question is on VB.NET side. Anyway, basically I want some kind of a control array but I don't know how to write it.
I have objects in dock are called _1, _2, _3, etc... from left to right. In WPF they are images. On solution explorer they appear as "_1 As Image".
Mainly, what I need is:
Code:
Sub ImgCntrl(i As Integer)
For Each Image in MainWindow
With Me("_" & i)
If object control name < i Then 'If the object is at left hadside of the initial object
Move those objects 100 pixel Left
End If
If object control name = i Then 'If the object is the initial object
Move that object 100 pixel Up
End If
If object control name > i Then 'If the object is at right hadside of the initial object
Move those objects 100 pixel Right
End If
End With
Next
End Sub
Private Sub _1_MouseEnter(sender As Object, e As MouseEventArgs) Handles _1.MouseEnter
ImgCntrl(1)
End Sub
Private Sub _2_MouseEnter(sender As Object, e As MouseEventArgs) Handles _1.MouseEnter
ImgCntrl(2)
End Sub
Private Sub _3_MouseEnter(sender As Object, e As MouseEventArgs) Handles _1.MouseEnter
ImgCntrl(3)
End Sub
Who may help me for the right expression?
Thanks a lot!!!