Silverlight Toolkit ListBoxDragDropTargetを使用していますが、動的に追加されたリストで使用するとエラーが発生します。リストを含むユーザー コントロールをレイアウト グリッドに動的に追加しています。グリッド内のあるリストから別のリストに項目をドラッグすると、次の例外が発生します。
throw new Error("Silverlight 2 アプリケーションで未処理のエラーが発生しました。値が期待される範囲内にありません
。MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData) で\n
MS.Internal.XcpImports.MethodPack で(IntPtr objectPtr, String methodName, Object[] rawData) \n MS.Internal.XcpImports.Collection_Insert[T](PresentationFrameworkCollection 1.InsertImpl1 collection, Int32 index, Object value)\n at System.Windows.PresentationFrameworkCollection
(Int32 index, Object value) で\n System.Windows.Controls.ItemCollection.InsertImpl( Int32 index, Object value)\n at System.Windows.Controls.ItemCollection.InsertInternal(Int32 index, Object value)\n at System.Windows.PresentationFrameworkCollection`1.Insert(Int32 index, T value)\n at System.Windows .Controls.ItemsControlExtensions.InsertItem(ItemsControl その、Int32 インデックス、オブジェクト アイテム)\n
....