I was trying to add user control or radBookItem by programming, using methods radBook.Items.Add method and radBook.Items.remove/removeAt/removeAll.
I created the radBook in xaml, then add the item in C#.
When it add the item(s), the radBook works fine.
The number of items in the radBook returned right number too.
But when I try to remove it (removeAll/removeAt(0)/remove) it will gaves me exception saying that the argument is out of range.
If I add the item though xaml, it has no problem with removing it.
But the point is that I need to create the pages dynamically in C#.
Is there something I did wrong?
'sllauncher.exe' (Silverlight): Loaded 'c:\Program Files (x86)\Microsoft Silverlight\4.0.50524.0\en-US\mscorlib.debug.resources.dll'
A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in System.Windows.dll
Specified argument was out of the range of valid values.
Parameter name: index
RadBookItem randomitem =
randomitem.Width = 500;
randomitem.Height = 500;