图形用户界面,如用于VB.NET的jQuery UI

时间:2011-09-17 15:43:53

标签: jquery vb.net jquery-ui user-interface

我对程序有这个非常好的想法,但我希望用户界面有点类似于jQuery UI。
这意味着主题按钮和窗口(最好是形成jQuery UI) 此外,我正在寻找漂亮的滑动和变形窗口。

这里有人知道这个地方是否存在吗?

提前致谢!

编辑: 对不起,我的意思是Visual Basic.NET

4 个答案:

答案 0 :(得分:2)

如果您想控制表单和控件的外观,您应该查看WPF。

如果你必须留在WinForms中,DevExpress有一个用于控件的皮肤引擎。

答案 1 :(得分:1)

Twitter Bootstrap可能是一个很好的起点,它有一些不错的默认样式,并包含一些不错的jQuery小部件。

您可能还想查看Ext JS

答案 2 :(得分:1)

如果您喜欢jQuery UI,为什么不直接使用ThemeRoller并设计自己的jQuery UI主题?

http://jqueryui.com/themeroller/

通过这种方式,您可以轻松地轻松利用jquery和jquery ui的所有插件,动画和令人难以置信的功能。

http://jqueryui.com/demos/

然后,您可以设计自己的小部件和插件来实现自己的功能,并使用jquery ui css中的类来保持相同的主题。

修改

这个答案并没有解决问题。当我输入答案时,OP的编辑和关于不用于Web开发的评论就出现了。

答案 3 :(得分:0)

我有一个例子我刚刚制作,但它很乱,因为我没有时间让它看起来更好:

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:

此代码取决于每个面板的索引,因此您应使用与表单中相同的索引。这只是滑动的一种方式,但您可以更改代码以获得更多选项。我希望它能奏效。有关详细信息,请发表评论。