开发者

Graphical User interface like jQuery UI for VB.NET

开发者 https://www.devze.com 2023-04-05 08:18 出处:网络
I have this very nice idea for a program, but i want the user interface to be kind开发者_开发问答a similar to the jQuery UI.

I have this very nice idea for a program, but i want the user interface to be kind开发者_开发问答a similar to the jQuery UI.

This means themed buttons and windows(preferabely the ones form jQuery UI) Also, i'm looking for nice sliding and morphing windows.

Does anybody here have any idea if this somewhere exists?

Thanks in advance!

Edit: Sorry, i meant for Visual Basic.NET


You should probably look into WPF if you want to control the look and feel of the form and controls.

If you have to stay in WinForms, DevExpress has a skinning engine for their controls.


The Twitter Bootstrap might be a good place to start, it has some nice default styles and includes some good jQuery widgets.

You might also want to look at Ext JS


If you like jQuery UI, why not just use the ThemeRoller and design your own jQuery UI theme?

http://jqueryui.com/themeroller/

That way you can easily leverage all the plugins, animations, and incredible abilities of jquery and jquery ui easily.

http://jqueryui.com/demos/

You can then design your own widgets and plugins to implement your own features and use the classes from the jquery ui css to keep with the same theme.

EDIT:

This answer does not solve the question. The OP's edits and comments about not for web development came in while I was typing my answer.


I have an example i just made but it's messy because i didn't have the time to make it look better :

Private _current As Panel
Private _forms As New List(Of Panel)

Public ReadOnly Property Current() As Panel
    Get
        Return _current
    End Get
End Property

Public Property Forms() As List(Of Panel)
    Get
        Return _forms
    End Get
    Set(ByVal value As List(Of Panel))
        _forms = value
    End Set
End Property

Public Sub GoToPanel(panel As Panel)
    Dim panindex As Int16 = Forms.IndexOf(panel)
    Dim diff As Int16 = panindex - CurrentIndex
    Select Case diff
        Case Is < 0
            For i As Int16 = CurrentIndex To panindex + 1 Step -1
                Dim pan As Panel = Forms(i)
                Dim pan2 As Panel
                Dim existp As Boolean = True
                If i - 1 < 0 Then
                    existp = False
                    pan2 = Nothing
                Else
                    pan2 = Forms(i - 1)
                    pan2.Location = New Point(Width, 0)
                End If

                For x = pan.Location.X To -Width Step -5
                    pan.Location = New Point(x, 0)
                    If existp Then
                        pan2.Location = New Point(pan2.Location.X - 5, 0)
                    End If
                    Threading.Thread.Sleep(10)
                Next
            Next
        Case Is > 0
            For i As Int16 = CurrentIndex To panindex - 1 Step 1
                Dim pan As Panel = Forms(i)
                Dim pan2 As Panel
                Dim existp As Boolean = True
                If i + 1 > Forms.Count Then
                    existp = False
                    pan2 = Nothing
                Else
                    pan2 = Forms(i + 1)
                    pan2.Location = New Point(-Width, 0)
                End If
                For x = pan.Location.X To Width Step +5
                    pan.Location = New Point(x, 0)
                    If existp Then
                        pan2.Location = New Point(pan2.Location.X + 5, 0)
                    End If
                    Threading.Thread.Sleep(10)
                Next
            Next
    End Select
    _current = panel
End Sub


Public ReadOnly Property CurrentIndex() As Int16
    Get
        Return Forms.IndexOf(_current)
    End Get
End Property

Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click
    Dim t As Threading.Thread = New Threading.Thread(AddressOf GoToPanel)
    t.Start(Panel2)
End Sub

Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
    Dim t As Threading.Thread = New Threading.Thread(AddressOf GoToPanel)
    t.Start(Panel1)
    'GoToPanel(Panel1)
End Sub

Private Sub Form1_Resize(sender As System.Object, e As System.EventArgs) Handles MyBase.Resize
    For Each p In Forms
        If p.Equals(_current) Then
            p.Width = Width
            p.Height = Height
        Else
            If p.Location.X > 0 Then
                p.Location = New Point(Width, 0)
            End If
        End If
    Next
End Sub

NB:

this code depends on the index of each panel so you should use the same indexing as in the form. this is only one way sliding but you can change the code for more options. I hope it will work. for further info please comment.

0

精彩评论

暂无评论...
验证码 换一张
取 消