Hi,
I am creating win 8.1 store app.
If I use flip view to show profiles it causes an error.
Here is a flip view code.
<FlipView VerticalAlignment="Bottom" x:Name="profileFlipView" Grid.Row="1" ItemsSource="{Binding Profiles}" >
<FlipView.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" Margin="0,0,30,40" />
</ItemsPanelTemplate>
</FlipView.ItemsPanel>
<FlipView.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" Margin="5,0,5,0" Style="{StaticResource HeaderTextBlockStyle}" />
</DataTemplate>
</FlipView.ItemTemplate>
</FlipView>
Item source is binded to Profiles collection, however when I leave current page, modify source collection and then go back to page with FlipView, its not updated and if I do it again, it throws an exception.
{"Error HRESULT E_FAIL has been returned from a call to a COM component."}
Error code: -2147467259
Stack trace:
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
It seems like there is a subscribed event handler from first FlipView.