[英]CarouselPanel in UWP throwing exception
<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.gics中:
#if DEBUG && !DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
UnhandledException += (sender, e) =>
{
if (global::System.Diagnostics.Debugger.IsAttached) global::System.Diagnostics.Debugger.Break();
};
我嘗試了幾種類型的集合,但是得到相同的錯誤。
如果查看異常Message
,您將看到:
您用於控件的面板不允許作為控件的ItemsPanel。
因此,您只能將CarouselPanel
與ComboBox
控件一起使用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.