<UserControl x:Class="TestProject.PodcastControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
IsTabStop="True"
UseSystemFocusVisuals="True">
<UserControl.Resources>
<SymbolIconSource x:Key="FavoriteSymbolIconSourceKey" Symbol="Favorite" />
<SwipeItems x:Key="RightSwipeItemsKey"
Mode="Reveal">
<SwipeItem
Background="Yellow"
IconSource="{StaticResource FavoriteSymbolIconSourceKey}"
Text="Favorite"
Invoked="swipeItem_Invoked" />
</SwipeItems>
</UserControl.Resources>
<UserControl.ContextFlyout>
<MenuFlyout>
<MenuFlyoutItem
Text="Favorite"
Command="{StaticResource FavoriteCommandKey}"
CommandParameter="{x:Bind Podcast, Mode=OneWay}" />
</MenuFlyout>
</UserControl.ContextFlyout>
<SwipeControl RightItems="{StaticResource RightSwipeItemsKey}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="HoveringStates">
<VisualState x:Name="HoverButtonsShown">
<VisualState.Setters>
<Setter Target="hoverAreaGrid.Visibility" Value="Visible" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="HoverButtonsHidden" />
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid Margin="10 0 10 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0"
Margin="5"
Spacing="10">
<TextBlock
Style="{StaticResource TitleTextBlockStyle}"
Text="{x:Bind Podcast.Title, Mode=OneWay}" />
<TextBlock
Style="{StaticResource SubtitleTextBlockStyle}"
Text="{x:Bind Podcast.Description, Mode=OneWay}" />
<TextBlock
Style="{StaticResource SubtitleTextBlockStyle}"
Text="{x:Bind Podcast.IsFavorite, Mode=OneWay}" />
</StackPanel>
<Grid Name="hoverAreaGrid" Grid.Column="1"
VerticalAlignment="Stretch"
Visibility="Collapsed">
<AppBarButton
VerticalAlignment="Center"
IsTabStop="False"
Icon="OutlineStar"
Label="Favorite"
Command="{StaticResource FavoriteCommandKey}"
CommandParameter="{x:Bind Podcast, Mode=OneWay}" />
</Grid>
</Grid>
</SwipeControl>
</UserControl>