Hi,
First issue
You need to bind the ItemsSource of List box then in the textbox each item. It will work
e.g:-
<listbox itemssource="{Binding Components, Mode=OneWay}" />
<listbox name="lstBoxEvents" horizontalalignment="Left" height="138" margin="294,10,0,0" verticalalignment="Top" width="312" itemssource="{Binding ocEvents}">
<listbox.itemtemplate>
<datatemplate>
<grid margin="1">
<grid.columndefinitions>
<columndefinition width="Auto" />
</grid.columndefinitions>
<textblock grid.column="1" text="{Binding Path=ocEvent}" />
</grid>
</datatemplate>
</listbox.itemtemplate>
</listbox>
where ocEvent is a field of type string
for the second issue
if you are using multithreads then there will be issue because a resource locked by one thread cannot be used by other thread. To resolve this you need to use
Application.Current.Dispatcher.Invoke(new Action(delegate
{
ocEvents.Insert(0, srMessage);
}));