Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,23 @@
Style="{StaticResource CaptionTextBlockStyle}"
Text="{x:Bind ViewModel.VideoDuration, Mode=OneWay}" />
</Border>
<Button
x:Name="AddViewLaterButton"
Grid.Row="1"
Margin="8"
Padding="4,4"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Style="{StaticResource VideoCardAddViewLaterButtonStyle}"
Command="{x:Bind ViewModel.AddToViewLaterCommand, Mode=OneWay}"
CornerRadius="{StaticResource ControlCornerRadius}"
Visibility="Collapsed">
<ic:SymbolIcon
VerticalAlignment="Center"
FontSize="12"
Foreground="{ThemeResource TextOnAccentFillColorPrimaryBrush}"
Symbol="Clock" />
</Button>
<base:TrimTextBlock
Grid.Row="2"
HorizontalAlignment="Left"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,35 @@ public sealed partial class VideoMomentPresenter : MomentCardPresenter
/// <summary>
/// Initializes a new instance of the <see cref="VideoMomentPresenter"/> class.
/// </summary>
public VideoMomentPresenter() => InitializeComponent();
public VideoMomentPresenter()
{
InitializeComponent();
// Show/hide AddViewLaterButton on pointer enter/exit
this.PointerEntered += OnPointerEntered;
this.PointerExited += OnPointerExited;
this.Unloaded += OnUnloaded;
}

private void OnPointerEntered(object? sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e)
{
if (AddViewLaterButton is not null)
{
AddViewLaterButton.Visibility = Microsoft.UI.Xaml.Visibility.Visible;
}
}

private void OnPointerExited(object? sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e)
{
if (AddViewLaterButton is not null)
{
AddViewLaterButton.Visibility = Microsoft.UI.Xaml.Visibility.Collapsed;
}
}

private void OnUnloaded(object? sender, Microsoft.UI.Xaml.RoutedEventArgs e)
{
this.PointerEntered -= OnPointerEntered;
this.PointerExited -= OnPointerExited;
this.Unloaded -= OnUnloaded;
}
}
Loading
Loading