【发布时间】:2017-01-18 23:34:17
【问题描述】:
<ListView ItemsSource="{Binding PageViewModel.TestCollection, Mode=OneWay}">
<ListView.ItemTemplate>
<DataTemplate x:DataType="local:TestClass">
<TextBlock >Blah</TextBlock>
</DataTemplate>
</ListView.ItemTemplate>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<CarouselPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ListView>
只是尝试使用此控件。它在部署期间在 App.g.i.cs 中构建但挂起:
#if DEBUG && !DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
UnhandledException += (sender, e) =>
{
if (global::System.Diagnostics.Debugger.IsAttached) global::System.Diagnostics.Debugger.Break();
};
我尝试了几种类型的集合,但得到了相同的错误。
【问题讨论】:
-
当 Visual Studio 在 UnhandledException 处理程序上遇到中断时,您可以将鼠标悬停在
(sender, e)部分中的e参数上并查看发生的确切异常。请执行此操作并使用此异常的详细信息更新帖子。