<pre lang="vb">If (DataGrid.ItemsSource IsNot Nothing) Then Dim count As Integer = DataGrid.ItemsSource.OfType(Of Object)().Count() lblCount_Stat.Content = "Count: " & count End If
<pre lang="vb">Private Sub BackgroundWorker_DoWork(ByVal sender As Object, ByVal e As DoWorkEventArgs) Handles BackgroundWorker.DoWork Dim result As String result = Me.DataGrid.ItemsSource.OfType(Of Object)().Count() e.Result = result End Sub
Dispatcher.BeginInvoke
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)