2012年9月29日 星期六

LightSwitch如何控制TextBox

http://social.msdn.microsoft.com/Forums/en-US/lightswitch/thread/485f2124-3cb9-4dd8-9965-07f02a915651/

VB範例


Imports System.Windows
Imports System.Windows.Controls

Namespace LightSwitchApplication

    Public Class 新增資料

        Private Sub 新增資料_InitializeDataWorkspace(ByVal saveChangesTo As Global.System.Collections.Generic.List(Of Global.Microsoft.LightSwitch.IDataService))
            ' Write your code here.
            Me.基本資料ItemProperty = New 基本資料Item()
        End Sub

        Private Sub 新增資料_Saved()
         
            Me.Close(False)
            'Application.Current.ShowDefaultScreen(Me.基本資料ItemProperty)
        End Sub

       '新增一個按鈕
        Private Sub ShowMeSomething_Execute()
            AddHandler Me.FindControl("客戶").ControlAvailable, AddressOf Showtxt
        End Sub


        Private Sub Showtxt(sender As Object, e As ControlAvailableBaseEventArgs)
            Dim txt As TextBox = CType(e.Control, Windows.Controls.TextBox)
            ShowMessageBox("客戶名稱是" & txt.Text)
         End Sub
    End Class

End Namespace


可以應用在Screen Saving的時候檢查欄位

2012年9月19日 星期三

LightSwitch 實戰開發系列課程

http://msdnwebcast.net/webcast/2/4961/

提供課程、程式碼、PDF下載

部署LightSwitch服務到Web主機上

http://blogs.msdn.com/b/bethmassi/archive/2011/03/23/deployment-guide-how-to-configure-a-web-server-to-host-lightswitch-applications.aspx

LightSwitch 擴充功能下載

Group Box
http://visualstudiogallery.msdn.microsoft.com/473ab8ec-440a-4cc2-9378-03b189d8181e

LightSwitch Metro Theme
http://visualstudiogallery.msdn.microsoft.com/e56d790d-ceea-43e6-8ce2-06d274ef7654

Password Control
http://visualstudiogallery.msdn.microsoft.com/a62e818f-2fe7-4eed-b593-3ee945e97dc3

Excel Data Provider for LightSwitch 試用版
http://visualstudiogallery.msdn.microsoft.com/3e3de735-2112-47c2-a5ed-7ed96bf971ad

Office Integration Pack
http://visualstudiogallery.msdn.microsoft.com/35c4cf2a-5148-4716-afcf-0ccf8899cabf

開發環境建置

1. 安裝 VS 2010
2. 安裝 VS 2010 SP1
3. 安裝 LightSwitch 2011
4. 安裝 Silverlight 5 Developer