I am getting \"Value does not fall within the expected range exception\" when adding children to stack panel. This happens even when myStackPanel.Children.Count = 0 just be
Seems to me that what you really want is an ItemsControl, you are not really using the capabilities of Silverlight:-
ItemsControl
then your func becomes:-
func
public void func() { items.ItemsSource = docDictionary[ID]; }