1
みんな。 私はlistBoxを持っています。私は61の項目を表示しようとすると - それは正常に実行されます。それが62の以上だとき は、しかし - それはランダムな瞬間に抜ける..私は見当もつかない - アプリは、それが何をすることができListBoxのWP7での問題 - System.Windows.Markup.XamlParseExceptionが発生しました
System.Windows.Markup.XamlParseException occurred
Message= [Line: 0 Position: 0]
LineNumber=0
LinePosition=0
StackTrace:
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at MS.Internal.XcpImports.FrameworkElement_MeasureOverride(FrameworkElement element, Size availableSize)
at System.Windows.FrameworkElement.MeasureOverride(Size availableSize)
at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)
at MS.Internal.XcpImports.MeasureNative(IntPtr element, Single inWidth, Single inHeight)
at MS.Internal.XcpImports.UIElement_Measure(UIElement element, Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.VirtualizingStackPanel.MeasureChild(UIElement child, Size layoutSlotSize)
at System.Windows.Controls.VirtualizingStackPanel.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)
に落ちます。私はlistBoxをスクロールして最後に、最後の要素を見ることができます。そして、スクロールバックすると、エラーがスローされます。
どのように項目をリストボックスに追加していますか?それらをコードで追加するのか、またはマークアップで直接追加していますか?マークアップで追加する場合は、最後の数アイテムのマークアップを投稿できますか? –
コードに項目を追加します。 via ItemsSourceプロパティ – Monochromie
'ItemsSource'プロパティに割り当てられている' ObservableCollection 'にアイテムを追加する必要があります。直接' ItemsSource'プロパティ自体には追加しないでください。 –