RetroGamingHomeView.xaml.cs 893 B

12345678910111213141516171819202122
  1. using System;
  2. using Avalonia.Controls;
  3. namespace ControlCatalog.Pages;
  4. public partial class RetroGamingHomeView : UserControl
  5. {
  6. public Action<string>? GameSelected { get; set; }
  7. public RetroGamingHomeView()
  8. {
  9. InitializeComponent();
  10. HeroPlayBtn.Click += (_, _) => GameSelected?.Invoke("Cyber Ninja 2084");
  11. ContinuePixelQuestBtn.Click += (_, _) => GameSelected?.Invoke("Pixel Quest");
  12. ContinueSpaceVoidsBtn.Click += (_, _) => GameSelected?.Invoke("Space Voids");
  13. NewReleaseNeonRacerBtn.Click += (_, _) => GameSelected?.Invoke("Neon Racer");
  14. NewReleaseDungeonBitBtn.Click += (_, _) => GameSelected?.Invoke("Dungeon Bit");
  15. NewReleaseForestSpiritBtn.Click += (_, _) => GameSelected?.Invoke("Forest Spirit");
  16. NewReleaseCyberCityBtn.Click += (_, _) => GameSelected?.Invoke("Cyber City");
  17. }
  18. }