LAvenirMenuView.xaml.cs 1.1 KB

12345678910111213141516171819202122232425262728
  1. using System;
  2. using Avalonia.Controls;
  3. using Avalonia.Input;
  4. namespace ControlCatalog.Pages;
  5. public partial class LAvenirMenuView : UserControl
  6. {
  7. public Action<string, string, string, string>? DishSelected { get; set; }
  8. public LAvenirMenuView() => InitializeComponent();
  9. void OnDish1Pressed(object? sender, PointerPressedEventArgs e) =>
  10. DishSelected?.Invoke("Seared Scallops", "$38",
  11. "Fresh scallops with truffle butter and microgreens", "dish1.jpg");
  12. void OnDish2Pressed(object? sender, PointerPressedEventArgs e) =>
  13. DishSelected?.Invoke("Truffle Risotto", "$34",
  14. "Creamy arborio rice with black truffle shavings", "dish2.jpg");
  15. void OnDish3Pressed(object? sender, PointerPressedEventArgs e) =>
  16. DishSelected?.Invoke("Wagyu Tartare", "$42",
  17. "Hand-cut wagyu beef with quail egg yolk", "dish3.jpg");
  18. void OnDish4Pressed(object? sender, PointerPressedEventArgs e) =>
  19. DishSelected?.Invoke("Lobster Bisque", "$24",
  20. "Classic French bisque with cream and cognac", "dish4.jpg");
  21. }