public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            _cardStack = VisualTreeHelper.GetChild(this, 0) as AnimationStackPanel;
            var noticeCard = new NoticeXCard();

            _cardStack.Children.Add(noticeCard);
            _cardStack.Children.Remove(noticeCard);
            Hide();
        }
Example #2
0
        public NoticeBoxWindow(AnimationEase animationEase, TimeSpan animationDuration)
        {
            SizeToContent      = SizeToContent.Width;
            ShowInTaskbar      = false;
            WindowStyle        = WindowStyle.None;
            AllowsTransparency = true;
            Background         = Brushes.Transparent;

            _astkItems = new AnimationStackPanel()
            {
                AnimationEase       = animationEase,
                AnimationDuration   = animationDuration,
                ArrangeDirection    = ArrangeDirection.Reverse,
                HorizontalAlignment = HorizontalAlignment.Right,
                Spacing             = 15,
            };
            Content = _astkItems;
        }