Ejemplo n.º 1
0
 /// <summary>
 /// An image and a single string wrapped across a maximum of three lines of text. For more information and example screenshots of the various Toast Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761494.aspx
 /// </summary>
 public static WindowsToastNotification AsToastImageAndText01(this WindowsToastNotification notification, string wrappedText, string imageSource, string imageAlt = null, string language = null, string fallback = null, string baseUri = null, BrandingType? branding = null, bool? addImageQuery = null)
 {
     notification.Visual.Binding = new ToastBinding()
     {
         ToastTemplate = ToastNotificationTemplate.ToastImageAndText01,
         Language = language,
         Fallback = fallback,
         BaseUri = baseUri,
         Branding = branding,
         AddImageQuery = addImageQuery
     };
     notification.Visual.Binding.Texts.Add(new ToastText() { Language = language, Text = wrappedText });
     notification.Visual.Binding.Images.Add(new ToastImage() { AddImageQuery = addImageQuery, Alt = imageAlt, Source = imageSource });
     return notification;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Ten short strings of regular text arranged in two columns of five lines each. The column widths are such that the first column acts as a label and the second column as the content. This template is similar to TileWideText08, but the first column is narrower.
        ///  For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileWideText11(this WindowsTileNotification notification, string textLine1Col1, string textLine1Col2, string textLine2Col1, string textLine2Col2, string textLine3Col1, string textLine3Col2, string textLine4Col1, string textLine4Col2, string language = null, string fallback = null, BrandingType? branding = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileWideText11,
                Language = language,
                Fallback = fallback,
                Branding = branding,
            };

            binding.Texts.Add(new TileText() { Language = language, Text = textLine1Col1 });
            binding.Texts.Add(new TileText() { Language = language, Text = textLine1Col2 });
            binding.Texts.Add(new TileText() { Language = language, Text = textLine2Col1 });
            binding.Texts.Add(new TileText() { Language = language, Text = textLine2Col2 });
            binding.Texts.Add(new TileText() { Language = language, Text = textLine3Col1 });
            binding.Texts.Add(new TileText() { Language = language, Text = textLine3Col2 });
            binding.Texts.Add(new TileText() { Language = language, Text = textLine4Col1 });
            binding.Texts.Add(new TileText() { Language = language, Text = textLine4Col2 });
            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// One header string in larger text over one string of regular text wrapped over a maximum of four lines. For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileWideText09(this WindowsTileNotification notification, string largeTextLine1, string wrappedTextLine2, string language = null, string fallback = null, BrandingType? branding = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileWideText09,
                Language = language,
                Fallback = fallback,
                Branding = branding,
            };

            binding.Texts.Add(new TileText() { Language = language, Text = largeTextLine1 });
            binding.Texts.Add(new TileText() { Language = language, Text = wrappedTextLine2 });
            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Eleven strings of regular text on eleven lines. Text does not wrap.
        /// Note  This template requires the visual element to declare version="2".
        /// For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileSquare310x310Text03(
            this WindowsTileNotification notification,
            string smallTextLine1,
            string smallTextLine2,
            string smallTextLine3,
            string smallTextLine4,
            string smallTextLine5,
            string smallTextLine6,
            string smallTextLine7,
            string smallTextLine8,
            string smallTextLine9,
                        string smallTextLine10,
                        string smallTextLine11,
            string language = null,
            string fallback = null,
            string baseUri = null,
            BrandingType? branding = null,
            bool? addImageQuery = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileSquare310x310Text03,
                Language = language,
                Fallback = fallback,
                BaseUri = baseUri,
                Branding = branding,
                AddImageQuery = addImageQuery
            };

            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine1 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine2 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine3 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine4 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine5 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine6 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine7 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine8 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine9 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine10 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine11 });
            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Top: One wide image. Bottom: Five strings of regular text on five lines. Text does not wrap.
        ///  For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileWidePeekImageAndText02(this WindowsTileNotification notification, string textLine1, string textLine2, string textLine3, string textLine4, string textLine5, string image1Source, string image1Alt = null, string language = null, string fallback = null, string baseUri = null, BrandingType? branding = null, bool? addImageQuery = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileWidePeekImageAndText02,
                Language = language,
                Fallback = fallback,
                BaseUri = baseUri,
                Branding = branding,
                AddImageQuery = addImageQuery
            };

            binding.Images.Add(new TileImage() { AddImageQuery = addImageQuery, Alt = image1Alt, Source = image1Source });
            binding.Texts.Add(new TileText() { Language = language, Text = textLine1 });
            binding.Texts.Add(new TileText() { Language = language, Text = textLine2 });
            binding.Texts.Add(new TileText() { Language = language, Text = textLine3 });
            binding.Texts.Add(new TileText() { Language = language, Text = textLine4 });
            binding.Texts.Add(new TileText() { Language = language, Text = textLine5 });
            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 6
0
        /// <summary>
        /// One string of regular text wrapped over a maximum of four lines on the left; large block text over a single, short string of bold, regular text on the right.
        ///  For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileWideBlockAndText02(this WindowsTileNotification notification, string wrappedTextLeft, string boldLargeTextRight, string boldTextBottomRight, string language = null, string fallback = null, BrandingType? branding = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileWideBlockAndText02,
                Language = language,
                Fallback = fallback,
                Branding = branding,
            };

            binding.Texts.Add(new TileText() { Language = language, Text = wrappedTextLeft });
            binding.Texts.Add(new TileText() { Language = language, Text = boldLargeTextRight });
            binding.Texts.Add(new TileText() { Language = language, Text = boldTextBottomRight });
            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Four strings of regular text on four lines. Text does not wrap. For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileSquareText03(this WindowsTileNotification notification, string textLine1 = null, string textLine2 = null, string textLine3 = null, string textLine4 = null, string language = null, string fallback = null, string baseUri = null, BrandingType? branding = null, bool? addImageQuery = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileSquareText03,
                Language = language,
                Fallback = fallback,
                BaseUri = baseUri,
                Branding = branding,
                AddImageQuery = addImageQuery
            };

            if (textLine1 != null)
                binding.Texts.Add(new TileText() { Language = language, Text = textLine1 });

            if (textLine2 != null)
                binding.Texts.Add(new TileText() { Language = language, Text = textLine2 });

            if (textLine3 != null)
                binding.Texts.Add(new TileText() { Language = language, Text = textLine3 });

            if (textLine4 != null)
                binding.Texts.Add(new TileText() { Language = language, Text = textLine4 });

            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Top: Square image, no text. Bottom: One string of regular text wrapped over a maximum of four lines. For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileSquarePeekImageAndText04(this WindowsTileNotification notification, string imageSource = null, string imageAlt = null, string wrappedText = null, string language = null, string fallback = null, string baseUri = null, BrandingType? branding = null, bool? addImageQuery = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileSquarePeekImageAndText04,
                Language = language,
                Fallback = fallback,
                BaseUri = baseUri,
                Branding = branding,
                AddImageQuery = addImageQuery
            };

            if (imageSource != null)
                binding.Images.Add(new TileImage() { AddImageQuery = addImageQuery, Alt = imageAlt, Source = imageSource });

            if (wrappedText != null)
                binding.Texts.Add(new TileText() { Language = language, Text = wrappedText });

            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 9
0
        /// <summary>
        /// One header string in larger text on the first line; three strings of regular text on each of the next three lines. Text does not wrap. For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileSquare150x150Text01(this WindowsTileNotification notification, string largeText, string smallTextLine1, string smallTextLine2, string smallTextLine3, string language = null, string fallback = null, string baseUri = null, BrandingType? branding = null, bool? addImageQuery = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileSquare150x150Text01,
                Language = language,
                Fallback = fallback ?? TileNotificationTemplate.TileSquareText01.ToString(),
                BaseUri = baseUri,
                Branding = branding,
                AddImageQuery = addImageQuery
            };

            binding.Texts.Add(new TileText() { Language = language, Text = largeText });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine1 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine2 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine3 });
            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Top: Square image, no text. Bottom: One header string in larger text on the first line, over one string of regular text wrapped over a maximum of three lines. For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileSquare150x150PeekImageAndText02(this WindowsTileNotification notification, string imageSource, string imageAlt, string largeTextLine1, string smallTextLine2, string language = null, string fallback = null, string baseUri = null, BrandingType? branding = null, bool? addImageQuery = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileSquare150x150PeekImageAndText02,
                Language = language,
                Fallback = fallback ?? TileNotificationTemplate.TileSquarePeekImageAndText02.ToString(),
                BaseUri = baseUri,
                Branding = branding,
                AddImageQuery = addImageQuery
            };

            binding.Images.Add(new TileImage() { AddImageQuery = addImageQuery, Alt = imageAlt, Source = imageSource });
            binding.Texts.Add(new TileText() { Language = language, Text = largeTextLine1 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine2 });
            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Five strings of regular text on five lines. Text does not wrap. For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileWide310x150Text05(this WindowsTileNotification notification, string textLine1, string textLine2, string textLine3, string textLine4, string textLine5, string language = null, string fallback = null, BrandingType? branding = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileWide310x150Text05,
                Language = language,
                Fallback = fallback ?? TileNotificationTemplate.TileWideText05.ToString(),
                Branding = branding,
            };

            binding.Texts.Add(new TileText() { Language = language, Text = textLine1 });
            binding.Texts.Add(new TileText() { Language = language, Text = textLine2 });
            binding.Texts.Add(new TileText() { Language = language, Text = textLine3 });
            binding.Texts.Add(new TileText() { Language = language, Text = textLine4 });
            binding.Texts.Add(new TileText() { Language = language, Text = textLine5 });
            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 12
0
        /// <summary>
        /// On the left, one header string in larger text over one string of regular text wrapped over a maximum of four lines; on the right, one small image with 3:4 dimensions.
        ///  For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileWide310x150SmallImageAndText05(this WindowsTileNotification notification, string largeTextLeft, string wrappedTextLeft, string image1Source, string image1Alt = null, string language = null, string fallback = null, string baseUri = null, BrandingType? branding = null, bool? addImageQuery = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileWide310x150SmallImageAndText05,
                Language = language,
                Fallback = fallback ?? TileNotificationTemplate.TileWideSmallImageAndText05.ToString(),
                BaseUri = baseUri,
                Branding = branding,
                AddImageQuery = addImageQuery
            };

            binding.Images.Add(new TileImage() { AddImageQuery = addImageQuery, Alt = image1Alt, Source = image1Source });
            binding.Texts.Add(new TileText() { Language = language, Text = largeTextLeft });
            binding.Texts.Add(new TileText() { Language = language, Text = wrappedTextLeft });
            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Four strings of regular, unwrapped text on the left; large block text over a single, short string of bold, regular text on the right. For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileWide310x150BlockAndText01(this WindowsTileNotification notification, string textLine1, string textLine2, string textLine3, string textLine4, string boldLargeTextRight, string boldTextBottomRight, string language = null, string fallback = null, BrandingType? branding = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileWide310x150BlockAndText01,
                Language = language,
                Fallback = fallback ?? TileNotificationTemplate.TileWideBlockAndText01.ToString(),
                Branding = branding,
            };

            binding.Texts.Add(new TileText() { Language = language, Text = textLine1 });
            binding.Texts.Add(new TileText() { Language = language, Text = textLine2 });
            binding.Texts.Add(new TileText() { Language = language, Text = textLine3 });
            binding.Texts.Add(new TileText() { Language = language, Text = textLine4 });
            binding.Texts.Add(new TileText() { Language = language, Text = boldLargeTextRight });
            binding.Texts.Add(new TileText() { Language = language, Text = boldTextBottomRight });
            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 14
0
        /// <summary>
        /// Three stacked notices, each containing one header string in larger text over one string of regular text wrapped over a maximum of two lines.
        /// Note  This template requires the visual element to declare version="2". 
        /// For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileSquare310x310TextList03(
            this WindowsTileNotification notification,
            string HeaderText1,
            string wrappedText1,
            string HeaderText2,
            string wrappedText2,
            string HeaderText3,
            string wrappedText3,
            string language = null,
            string fallback = null,
            BrandingType? branding = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileSquare310x310TextList03,
                Language = language,
                Fallback = fallback,
                Branding = branding
            };

            binding.Texts.Add(new TileText() { Language = language, Text = HeaderText1 });
            binding.Texts.Add(new TileText() { Language = language, Text = wrappedText1 });
            binding.Texts.Add(new TileText() { Language = language, Text = HeaderText2 });
            binding.Texts.Add(new TileText() { Language = language, Text = wrappedText2 });
            binding.Texts.Add(new TileText() { Language = language, Text = HeaderText1 });
            binding.Texts.Add(new TileText() { Language = language, Text = wrappedText3 });
            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 15
0
        /// <summary>
        /// Twenty-two short strings of regular text arranged in two columns of eleven lines each. The column widths are such that the first column acts as a label and the second column as the content.
        /// This template is similar to TileSquare310x310Text06, which has a wider first column, and TileSquare310x310Text04, which has columns of equal width.
        /// Note  This template requires the visual element to declare version="2".
        /// For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileSquare310x310Text08(
            this WindowsTileNotification notification,
            string smallTextLine1Col1,
            string smallTextLine2Col1,
            string smallTextLine3Col1,
            string smallTextLine4Col1,
            string smallTextLine5Col1,
            string smallTextLine6Col1,
            string smallTextLine7Col1,
            string smallTextLine8Col1,
            string smallTextLine9Col1,
            string smallTextLine10Col1,
            string smallTextLine11Col1,
            string smallTextLine1Col2,
            string smallTextLine2Col2,
            string smallTextLine3Col2,
            string smallTextLine4Col2,
            string smallTextLine5Col2,
            string smallTextLine6Col2,
            string smallTextLine7Col2,
            string smallTextLine8Col2,
            string smallTextLine9Col2,
            string smallTextLine10Col2,
            string smallTextLine11Col2,
            string language = null,
            string fallback = null,
            string baseUri = null,
            BrandingType? branding = null,
            bool? addImageQuery = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileSquare310x310Text08,
                Language = language,
                Fallback = fallback,
                BaseUri = baseUri,
                Branding = branding,
                AddImageQuery = addImageQuery
            };

            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine1Col1 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine1Col2 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine2Col1 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine2Col2 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine3Col1 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine3Col2 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine4Col1 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine4Col2 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine5Col1 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine5Col2 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine6Col1 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine6Col2 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine7Col1 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine7Col2 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine8Col1 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine8Col2 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine9Col1 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine9Col2 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine10Col1 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine10Col2 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine11Col1 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine11Col2 });

            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 16
0
        /// <summary>
        ///Two main text groups separated by a blank area:
        ///One string of large text, which can wrap over up to two lines, sitting over two strings of unwrapped regular text on two lines.
        ///Four strings on four lines, separated slightly into two sets. To the side is one string of large block text (this should be numerical) over a single, short line of regular text.
        ///Note  This template requires the visual element to declare version="2".
        /// For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileSquare310x310BlockAndText01(this WindowsTileNotification notification,
            string largeText,
            string topSmallTextLine1,
            string topSmallTextLine2,
            string bottomLeftSmallTextLine1,
            string bottomLeftSmallTextLine2,
            string bottomLeftSmallTextLine3,
            string bottomLeftSmallTextLine4,
            string blockNumericalText,
            string bottomRightSmallTextLine,
            string language = null,
            string fallback = null,
            string baseUri = null,
            BrandingType? branding = null,
            bool? addImageQuery = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileSquare310x310BlockAndText01,
                Language = language,
                Fallback = fallback,
                BaseUri = baseUri,
                Branding = branding,
                AddImageQuery = addImageQuery
            };

            binding.Texts.Add(new TileText() { Language = language, Text = largeText });
            binding.Texts.Add(new TileText() { Language = language, Text = topSmallTextLine1 });
            binding.Texts.Add(new TileText() { Language = language, Text = topSmallTextLine2 });
            binding.Texts.Add(new TileText() { Language = language, Text = bottomLeftSmallTextLine1 });
            binding.Texts.Add(new TileText() { Language = language, Text = bottomLeftSmallTextLine2 });
            binding.Texts.Add(new TileText() { Language = language, Text = bottomLeftSmallTextLine3 });
            binding.Texts.Add(new TileText() { Language = language, Text = bottomLeftSmallTextLine4 });
            binding.Texts.Add(new TileText() { Language = language, Text = bottomLeftSmallTextLine4 });
            binding.Texts.Add(new TileText() { Language = language, Text = blockNumericalText });
            binding.Texts.Add(new TileText() { Language = language, Text = bottomRightSmallTextLine });
            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 17
0
 /// <summary>
 /// One string of bold text on the first line, one string of regular text on the second line, one string of regular text on the third line. For more information and example screenshots of the various Toast Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761494.aspx
 /// </summary>
 public static WindowsToastNotification AsToastText04(this WindowsToastNotification notification, string boldTextLine1, string textLine2, string textLine3, string language = null, string fallback = null, BrandingType? branding = null)
 {
     notification.Visual.Binding = new ToastBinding()
     {
         ToastTemplate = ToastNotificationTemplate.ToastText04,
         Language = language,
         Fallback = fallback,
         Branding = branding,
     };
     notification.Visual.Binding.Texts.Add(new ToastText() { Language = language, Text = boldTextLine1 });
     notification.Visual.Binding.Texts.Add(new ToastText() { Language = language, Text = textLine2 });
     notification.Visual.Binding.Texts.Add(new ToastText() { Language = language, Text = textLine3 });
     return notification;
 }
Ejemplo n.º 18
0
        /// <summary>
        /// Background: a single image that fills the entire tile. Foreground: At the top, one string of large text wrapped over a maximum of two lines;
        /// at the bottom, three strings of regular text on three lines that do not wrap. If the text color is light, the image is darkened a bit to improve the text visibility.
        /// Note  This template requires the visual element to declare version="2".
        /// For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileSquare310x310ImageAndTextOverlay03(this WindowsTileNotification notification,
            string imageSource,
            string topLargeWrappedText,
            string smallTextLine1,
            string smallTextLine2,
            string smallTextLine3,
            string imageAlt = null,
            string language = null,
            string fallback = null,
            string baseUri = null,
            BrandingType? branding = null,
            bool? addImageQuery = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileSquare310x310ImageAndTextOverlay03,
                Language = language,
                Fallback = fallback,
                BaseUri = baseUri,
                Branding = branding,
                AddImageQuery = addImageQuery
            };

            binding.Images.Add(new TileImage() { Source = imageSource, AddImageQuery = addImageQuery, Alt = imageAlt });
            binding.Texts.Add(new TileText() { Language = language, Text = topLargeWrappedText });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine1 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine2 });
            binding.Texts.Add(new TileText() { Language = language, Text = smallTextLine3 });

            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 19
0
        /// <summary>
        /// One header string in larger text on the first line, over one string of regular text wrapped over a maximum of three lines. For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileSquareText02(this WindowsTileNotification notification, string largeText = null, string smallTextWrapped = null, string language = null, string fallback = null, string baseUri = null, BrandingType? branding = null, bool? addImageQuery = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileSquareText02,
                Language = language,
                Fallback = fallback,
                BaseUri = baseUri,
                Branding = branding,
                AddImageQuery = addImageQuery
            };

            if (largeText != null)
                binding.Texts.Add(new TileText() { Language = language, Text = largeText });

            if (smallTextWrapped != null)
                binding.Texts.Add(new TileText() { Language = language, Text = smallTextWrapped });

            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 20
0
        /// <summary>
        /// TileSquare310x310ImageCollection with the addition of a text ribbon across the bottom of the tile.
        /// The text area contains two strings of regular text on two lines. 
        /// Text does not wrap. Note that the small images cut off the top of the large image while the text area cuts off the bottom of the image. 
        /// The width of the text area depends on whether a logo is displayed.
        /// Note  This template allows branding only as "logo" or "none", but not "name". If you set the branding attribute to "name", it will automatically revert to "logo".
        /// Note  This template requires the visual element to declare version="2".
        /// For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileSquare310x310ImageCollectionAndText02(this WindowsTileNotification notification,
            string mainImage,
            string subImage1,
            string subImage2,
            string subImage3,
            string subImage4,
            string textLine1,
            string textLine2,
            string imageAltMainImage = null,
            string imageAltsubImage1 = null,
            string imageAltsubImage2 = null,
            string imageAltsubImage3 = null,
            string imageAltsubImage4 = null,
            string language = null,
            string fallback = null,
            string baseUri = null,
            BrandingType? branding = null,
            bool? addImageQuery = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileSquare310x310ImageCollectionAndText02,
                Language = language,
                Fallback = fallback,
                BaseUri = baseUri,
                Branding = branding,
                AddImageQuery = addImageQuery
            };

            binding.Images.Add(new TileImage() { Source = mainImage, AddImageQuery = addImageQuery, Alt = imageAltMainImage });
            binding.Images.Add(new TileImage() { Source = subImage1, AddImageQuery = addImageQuery, Alt = imageAltsubImage1 });
            binding.Images.Add(new TileImage() { Source = subImage2, AddImageQuery = addImageQuery, Alt = imageAltsubImage2 });
            binding.Images.Add(new TileImage() { Source = subImage3, AddImageQuery = addImageQuery, Alt = imageAltsubImage3 });
            binding.Images.Add(new TileImage() { Source = subImage4, AddImageQuery = addImageQuery, Alt = imageAltsubImage4 });

            binding.Texts.Add(new TileText() { Language = language, Text = textLine1 });
            binding.Texts.Add(new TileText() { Language = language, Text = textLine2 });

            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 21
0
        /// <summary>
        /// One string of regular text wrapped over a maximum of four lines. For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileSquareText04(this WindowsTileNotification notification, string wrappedText = null, string language = null, string fallback = null, BrandingType? branding = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileSquareText04,
                Language = language,
                Fallback = fallback,
                Branding = branding
            };

            if (wrappedText != null)
                binding.Texts.Add(new TileText() { Language = language, Text = wrappedText });

            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 22
0
        /// <summary>
        /// Five strings of regular text on five lines. Text does not wrap. For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileWideText05(this WindowsTileNotification notification, string textLine1 = null, string textLine2 = null, string textLine3 = null, string textLine4 = null, string textLine5 = null, string language = null, string fallback = null, BrandingType? branding = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileWideText05,
                Language = language,
                Fallback = fallback,
                Branding = branding,
            };

            if (textLine1 != null)
                binding.Texts.Add(new TileText() { Language = language, Text = textLine1 });

            if (textLine2 != null)
                binding.Texts.Add(new TileText() { Language = language, Text = textLine2 });

            if (textLine3 != null)
                binding.Texts.Add(new TileText() { Language = language, Text = textLine3 });

            if (textLine4 != null)
                binding.Texts.Add(new TileText() { Language = language, Text = textLine4 });

            if (textLine5 != null)
                binding.Texts.Add(new TileText() { Language = language, Text = textLine5 });

            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 23
0
        /// <summary>
        /// One wide image that fills the entire tile, no text. For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileWideImage(this WindowsTileNotification notification, string image1Source, string image1Alt = null, string language = null, string fallback = null, string baseUri = null, BrandingType? branding = null, bool? addImageQuery = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileWideImage,
                Language = language,
                Fallback = fallback,
                BaseUri = baseUri,
                Branding = branding,
                AddImageQuery = addImageQuery
            };

            binding.Images.Add(new TileImage() { AddImageQuery = addImageQuery, Alt = image1Alt, Source = image1Source });
            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 24
0
        /// <summary>
        /// One string of bold text wrapped across the first and second lines, one string of regular text on the third line. For more information and example screenshots of the various Toast Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761494.aspx
        /// </summary>
        public static WindowsToastNotification AsToastText03(this WindowsToastNotification notification, string boldWrappedTextLine1, string textLine2, string language = null, string fallback = null, string baseUri = null, BrandingType? branding = null, bool? addImageQuery = null)
        {
            notification.Visual.Binding = new ToastBinding()
            {
                ToastTemplate = ToastNotificationTemplate.ToastText03,
                Language = language,
                Fallback = fallback,
                BaseUri = baseUri,
                Branding = branding,
                AddImageQuery = addImageQuery
            };
            notification.Visual.Binding.Texts.Add(new ToastText() { Language = language, Text = boldWrappedTextLine1 });
            notification.Visual.Binding.Texts.Add(new ToastText() { Language = language, Text = textLine2 });

            return notification;
        }
Ejemplo n.º 25
0
        /// <summary>
        /// Top: One large square image with four smaller square images to its right, no text. Bottom: On the left, one small image; on the right, one header string of larger text on the first line over one string of regular text wrapped over a maximum of four lines.
        ///  For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileWidePeekImageCollection05(this WindowsTileNotification notification, string largeBottomTextLine1, string bottomTextLine2, string bottomImageSource, string bottomImageAlt, string largeImage1Source, string largeImage1Alt, string image2Source, string image2Alt, string image3Source, string image3Alt, string image4Source, string image4Alt, string image5Source, string image5Alt, string language = null, string fallback = null, string baseUri = null, BrandingType? branding = null, bool? addImageQuery = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileWidePeekImageCollection05,
                Language = language,
                Fallback = fallback,
                BaseUri = baseUri,
                Branding = branding,
                AddImageQuery = addImageQuery
            };

            binding.Images.Add(new TileImage() { AddImageQuery = addImageQuery, Alt = bottomImageAlt, Source = bottomImageSource });
            binding.Images.Add(new TileImage() { AddImageQuery = addImageQuery, Alt = largeImage1Alt, Source = largeImage1Source });
            binding.Images.Add(new TileImage() { AddImageQuery = addImageQuery, Alt = image2Alt, Source = image2Source });
            binding.Images.Add(new TileImage() { AddImageQuery = addImageQuery, Alt = image3Alt, Source = image3Source });
            binding.Images.Add(new TileImage() { AddImageQuery = addImageQuery, Alt = image4Alt, Source = image4Source });
            binding.Images.Add(new TileImage() { AddImageQuery = addImageQuery, Alt = image5Alt, Source = image5Source });
            binding.Texts.Add(new TileText() { Language = language, Text = largeBottomTextLine1 });
            binding.Texts.Add(new TileText() { Language = language, Text =  bottomTextLine2 });
            notification.Visual.Bindings.Add(binding);
            return notification;
        }
Ejemplo n.º 26
0
        /// <summary>
        /// One line of header text across the top, over three sets of information, 
        /// each of which consists of one small square image to the left of one header string in larger text over two strings of regular text on the next two lines. Text does not wrap.
        /// Note  This template requires the visual element to declare version="2".
        /// For more information and example screenshots of the various Tile Layouts see http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
        /// </summary>
        public static WindowsTileNotification WithTileSquare310x310SmallImagesAndTextList05(this WindowsTileNotification notification,
            string image1,
            string image2,
            string image3,
            string largeHeaderText,
            string image1SmallTextLine1,
            string image1SmallTextLine2,
            string image2SmallTextLine1,
            string image2SmallTextLine2,
            string image3SmallTextLine1,
            string image3SmallTextLine2,
            string imageAltMainImage = null,
            string imageAltsubImage1 = null,
            string imageAltsubImage2 = null,
            string imageAltsubImage3 = null,
            string imageAltsubImage4 = null,
            string language = null,
            string fallback = null,
            string baseUri = null,
            BrandingType? branding = null,
            bool? addImageQuery = null)
        {
            var binding = new TileBinding()
            {
                TileTemplate = TileNotificationTemplate.TileSquare310x310SmallImagesAndTextList05,
                Language = language,
                Fallback = fallback,
                BaseUri = baseUri,
                Branding = branding,
                AddImageQuery = addImageQuery
            };

            binding.Images.Add(new TileImage() { Source = image1, AddImageQuery = addImageQuery, Alt = imageAltMainImage });
            binding.Images.Add(new TileImage() { Source = image1, AddImageQuery = addImageQuery, Alt = imageAltsubImage1 });
            binding.Images.Add(new TileImage() { Source = image1, AddImageQuery = addImageQuery, Alt = imageAltsubImage2 });

            binding.Texts.Add(new TileText() { Language = language, Text = largeHeaderText });
            binding.Texts.Add(new TileText() { Language = language, Text = image1SmallTextLine1 });
            binding.Texts.Add(new TileText() { Language = language, Text = image1SmallTextLine2 });
            binding.Texts.Add(new TileText() { Language = language, Text = image2SmallTextLine1 });
            binding.Texts.Add(new TileText() { Language = language, Text = image2SmallTextLine2 });
            binding.Texts.Add(new TileText() { Language = language, Text = image3SmallTextLine1 });
            binding.Texts.Add(new TileText() { Language = language, Text = image3SmallTextLine2 });

            notification.Visual.Bindings.Add(binding);
            return notification;
        }