LANCommander/LANCommander.Launcher/Views/Components/GenreCarouselButton.axaml.cs
Pat Hartl b183e4b18c Remove old launcher, rename Avalonia launcher
Also adds ARM builds for Linux + Windows launcher
2026-06-06 05:49:24 -05:00

45 lines
No EOL
1.2 KiB
C#

using System.Windows.Input;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Markup.Xaml;
namespace LANCommander.Launcher.Views.Components;
public partial class GenreCarouselButton : UserControl
{
public static readonly StyledProperty<ICommand?> CommandProperty =
AvaloniaProperty.Register<GenreCarouselButton, ICommand?>(nameof(Command));
public static readonly StyledProperty<object?> CommandParameterProperty =
AvaloniaProperty.Register<GenreCarouselButton, object?>(nameof(CommandParameter));
public ICommand? Command
{
get => GetValue(CommandProperty);
set => SetValue(CommandProperty, value);
}
public object? CommandParameter
{
get => GetValue(CommandParameterProperty);
set => SetValue(CommandParameterProperty, value);
}
public GenreCarouselButton()
{
InitializeComponent();
}
protected override void OnPointerEntered(PointerEventArgs e)
{
base.OnPointerEntered(e);
ZIndex = 100;
}
protected override void OnPointerExited(PointerEventArgs e)
{
base.OnPointerExited(e);
ZIndex = 0;
}
}