我收到了 Visual Studio 即时调试器错误一个未处理的异常(“Silverlight 应用程序代码中的未处理错误:4004 类别:MangedRuntimeError 消息:System.ServiceMode.DomainServices.Client.DomainOperationException:
一旦我将一行代码加载为
Public Sub New()
InitializeComponent()
Dim context As New OrganizationContext()
context.Load(context.GetTimeTablesQuery(), AddressOf LoadMonday, Nothing)
End Sub
Private Sub LoadMonday(ByVal obj As LoadOperation(Of TimeTable))
Dim btnMonday(20) As Button
For a As Integer = 0 To 19
btnMonday(a) = New Button()
btnMonday(a).Height = 23
btnMonday(a).Width = 107
btnMonday(a).Content = timeslot(a)
btnMonday(a).Background = New SolidColorBrush(Colors.Magenta)
' Sets dependency properties
btnMonday(a).SetValue(Grid.ColumnProperty, 1)
btnMonday(a).SetValue(Grid.RowProperty, a + 1)
LayoutRoot.Children.Add(btnMonday(a))
Next
End Sub
任何的想法 ?