I have the following code:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock x:Uid="Favorites" Style="{StaticResource SectionHeaderTextBlock}" HorizontalAlignment="Left" />
<toolkitControls:Carousel x:Name="TemplatesCarousel" Style="{StaticResource CarouselControl}" ItemsSource="{Binding PaymentTemplates}" ItemTemplate="{StaticResource UserTemplatesDataTemplate}">
<toolkitControls:Carousel.EasingFunction>
<CubicEase EasingMode="EaseOut"/>
</toolkitControls:Carousel.EasingFunction>
</toolkitControls:Carousel>
</Grid>
Where DataTemplate is the following:
<DataTemplate x:Key="UserTemplatesDataTemplate">
<StackPanel Orientation="Vertical">
<!-- TODO: correct binding names -->
<Ellipse Visibility="{Binding ImageSource, Converter={StaticResource NullToVisibilityConverter}}" Width="{StaticResource EllipseDimension}" Height="{StaticResource EllipseDimension}">
<Ellipse.Fill>
<ImageBrush ImageSource="{Binding ImageSource}"/>
</Ellipse.Fill>
</Ellipse>
<TextBlock Text="{Binding TemplateName}" FontSize="{StaticResource TextSize}"/>
</StackPanel>
</DataTemplate>`
The problem is when I try to run the application, it always gives me the same error. I know that this problem is in XAML, but I have checked literally everything. I also tried to set up ItemSource for carousel using code-behind, but it has no positive impact.
Any ideas how to resolve the issue?
P.S. I have the message of the exception from the output window, in case it can help.
Message = "Error HRESULT E_FAIL has been returned from a call to a COM component."