28 lines
714 B
C#
28 lines
714 B
C#
using Avalonia;
|
|
using Avalonia.Controls;
|
|
using Avalonia.Input;
|
|
using Avalonia.Media;
|
|
|
|
namespace Project_Periodensystem.View.Components
|
|
{
|
|
public partial class ElementTile : UserControl
|
|
{
|
|
public static readonly StyledProperty<bool> IsFlippedProperty =
|
|
AvaloniaProperty.Register<ElementTile, bool>(nameof(IsFlipped));
|
|
|
|
public bool IsFlipped
|
|
{
|
|
get => GetValue(IsFlippedProperty);
|
|
set => SetValue(IsFlippedProperty, value);
|
|
}
|
|
|
|
public ElementTile()
|
|
{
|
|
InitializeComponent();
|
|
|
|
// Optional: Klick per Code registrieren
|
|
this.PointerPressed += (_, __) => IsFlipped = !IsFlipped;
|
|
}
|
|
}
|
|
}
|