Exemple #1
0
        public CardsPanel(IList<ICard> cards)
        {
            myCards = cards;

              Background = new SolidColorBrush(Colors.White);

              Children.Add(myBorder = new Border { BorderBrush = new SolidColorBrush(Colors.Black), BorderThickness = new Thickness(3) });

              foreach(ICard card in myCards)
              {
            var cardElement = new CardElement(card);
            Children.Add(cardElement);
            cardElement.MouseEnter += (sender, e) => myAutoZoomInteractor.OnElementMouseEnter(cardElement);
              }

              myAutoZoomInteractor = new CardZoomInteractor(this, false) {ZoomDirection = ZoomDirection.Up};
        }
Exemple #2
0
 private void AddCardImage(ICard card)
 {
     if (card == null) return;
       var cardElement = new CardElement(card, RotationAngle);
       Children.Add(cardElement);
       myCardElements.Add(card, cardElement);
       cardElement.MouseEnter += (sender, e) => myAutoZoomInteractor.OnElementMouseEnter(cardElement);
 }