0
votes
        <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>

Just trying to experiment with this control. It builds but hangs on this in App.g.i.cs during deploy:

#if DEBUG && !DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
        UnhandledException += (sender, e) =>
        {
            if (global::System.Diagnostics.Debugger.IsAttached) global::System.Diagnostics.Debugger.Break();
        };

I've tried several types of collections but get the same error.

1
When Visual Studio hits break on UnhandledException handler, you can hover mouse over e paremeter in (sender, e) part and see exact exception which occurs. Please do that and update post with details on this exception. - Andrei Ashikhmin

1 Answers

1
votes

If you look at the Message of exception you will see:

The Panel you are using for the Control is not allowed as an ItemsPanel for the Control.

So, you can use CarouselPanel only with ComboBox control.