A hint to the solution of adding dynamically a time layer. The problem is after adding the time enabled layer, when the program goes to the InitTimeSlider function, the layer is not initialyzed the function exits. I need to know how to add a new time layer and make sure this one is initialyzed when the timeslider function are called.
Private Sub InitTimeSlider(timeExtent As TimeExtent, oTimeInterval As TimeSpan, dtMiddleValue As DateTime)
Try
Dim timeSlider = Me
If timeExtent Is Nothing Then
timeSlider.Visibility = Visibility.Collapsed
timeSlider.IsPlaying = False
Return
End If
end Sub