internal void Initialize(AdaptiveBinding binding)
        {
            PreviewTileNotification notif = new PreviewTileNotification()
            {
                RequestedTheme = ElementTheme.Light
            };

            notif.InitializeFromXml(TileSize.Large, new PreviewTileVisualElements()
            {
                BackgroundColor = Colors.Transparent
            }, isBrandingVisible: false,
                                    binding: binding);

            AdaptiveContentContainer.Child = notif;
        }
Beispiel #2
0
        internal void Initialize(AdaptiveBinding binding)
        {
            AdaptiveImage heroImage = binding.Container.Children.OfType <AdaptiveImage>().FirstOrDefault(i => i.Placement == Model.Enums.Placement.Hero);

            if (heroImage != null)
            {
                BorderHeroContent.Background = new ImageBrush()
                {
                    ImageSource = ImageHelper.GetBitmap(heroImage.Src),
                    Stretch     = Stretch.UniformToFill
                };

                switch (heroImage.HintHeroHeight)
                {
                case Model.Enums.HintHeroHeight.Double:
                    RowDefinitionHeroContent.Height = new GridLength(RowDefinitionHeroContent.Height.Value * 2);
                    break;
                }
            }

            AdaptiveImage heroLogoImage = binding.Container.Children.OfType <AdaptiveImage>().FirstOrDefault(i => i.Placement == Model.Enums.Placement.HeroLogo);

            if (heroLogoImage != null)
            {
                HeroLogoContainer.Visibility = Visibility.Visible;
                CircleImageHero.Source       = ImageHelper.GetBitmap(heroLogoImage.Src);
            }

            PreviewTileNotification notif = new PreviewTileNotification()
            {
                RequestedTheme = ElementTheme.Light
            };

            notif.InitializeFromXml(TileSize.Large, new PreviewTileVisualElements()
            {
                BackgroundColor = Colors.Transparent
            }, isBrandingVisible: false,
                                    binding: binding);

            AdaptiveContentContainer.Child = notif;
        }