using System.Windows; using DominionBase; namespace Dominion.NET_WPF { /// /// Interaction logic for wCardPreview.xaml /// public partial class wCardPreview : Window { public wCardPreview() { InitializeComponent(); CardHover.CardHoverEvent += ICardHoverEventHandler_ICardHoverEvent; } private void ICardHoverEventHandler_ICardHoverEvent(object sender, CardHoverEventArgs e) { Card = e.Card; } public static readonly DependencyProperty CardProperty = DependencyProperty.Register("Card", typeof(IDisplayable), typeof(wCardPreview), new PropertyMetadata(null)); public IDisplayable Card { get { return (IDisplayable)GetValue(CardProperty); } set { if (value != null) { ttdCard.Card = value; ttdCard.Visibility = Visibility.Visible; ttdCard.InvalidateVisual(); } } } } }