示例#1
0
 /// <summary>
 /// Add image to builder using <see cref="Plugin.Toast.IOS.IPlatformSpecificExtension.AddAttachment(UserNotifications.UNNotificationAttachment)"/>
 /// <seealso cref="IToastImageSourceFactory"/>
 /// </summary>
 public static T AddAttachment <T>(this T extension, ToastImageSource imageSource)
     where T : IBuilderExtension <T>, IIosNotificationExtension
 {
     return(extension.PrivateAddAttachment(imageSource));
 }
示例#2
0
#pragma warning restore CS1574 // XML comment has cref attribute that could not be resolved

        static T PrivateAddAttachment <T>(this T extension, ToastImageSource imageSource)
            where T : IBuilderExtension <T>
        {
            return(extension.Add(imageSource, Router.Route.IosSingleAttachment));
        }
示例#3
0
 /// <summary>
 /// Add a image to builder using <see cref="Plugin.Toast.Droid.IPlatformSpecificExtension.SetLargeIcon(Android.Graphics.Bitmap)"/>
 /// <seealso cref="IToastImageSourceFactory"/>
 /// </summary>
 public static T AddLargeIcon <T>(this T extension, ToastImageSource imageSource)
     where T : IBuilderExtension <T>, IDroidNotificationExtension
 {
     return(extension.PrivateAddLargeIcon(imageSource));
 }
示例#4
0
 static T PrivateAddLargeIcon <T>(this T extension, ToastImageSource imageSource)
     where T : IBuilderExtension <T>
 {
     return(extension.Add(imageSource, Router.Route.DroidLargeIcon));
 }
示例#5
0
#pragma warning disable CS1574 // XML comment has cref attribute that could not be resolved
        /// <summary>
        /// Add a image to builder.
        /// </summary>
        /// <remarks>
        /// Image routed to <see cref="Plugin.Toast.Droid.IPlatformSpecificExtension.SetLargeIcon(Android.Graphics.Bitmap)"/>
        /// or <see cref="Plugin.Toast.IOS.IPlatformSpecificExtension.AddAttachment(UserNotifications.UNNotificationAttachment)"/>
        /// or <see cref="IUwpExtension.AddAppLogoOverride(Uri, ToastGenericAppLogoCrop?, string?, bool?)"/>. If there a
        /// <see cref="ISnackbarExtension"/> or <see cref="IIosLocalNotificationExtension"/> then no action will performed.
        /// <seealso cref="IToastImageSourceFactory"/>
        /// </remarks>
        public static IBuilder AddImage(this IBuilder builder, ToastImageSource imageSource)
        => builder.Add(imageSource, Router.Route.Default);
示例#6
0
 /// <summary>
 /// Add a image to builder.
 /// </summary>
 /// <remarks>
 /// Image routed to <see cref="Plugin.Toast.Droid.IPlatformSpecificExtension.SetLargeIcon(Android.Graphics.Bitmap)"/>
 /// or <see cref="Plugin.Toast.IOS.IPlatformSpecificExtension.AddAttachment(UserNotifications.UNNotificationAttachment)"/>
 /// or <see cref="IUwpExtension.AddAppLogoOverride(Uri, ToastGenericAppLogoCrop?, string?, bool?)"/>. If there a
 /// <see cref="ISnackbarExtension"/> or <see cref="IIosLocalNotificationExtension"/> then no action will performed.
 /// <seealso cref="IToastImageSourceFactory"/>
 /// </remarks>
 public static T AddImage <T>(this T builder, ToastImageSource imageSource)
     where T : IBuilderExtension <T>
 {
     return(builder.Add(imageSource, Router.Route.Default));
 }
示例#7
0
 /// <summary>
 /// Add a hero image to the toast. <seealso cref="IUwpExtension.AddHeroImage(Uri, string?, bool?)"/>
 /// <seealso cref="IToastImageSourceFactory"/>
 /// </summary>
 /// <param name="extension">Target extension.</param>
 /// <param name="imageSource">Image to add.</param>
 /// <param name="alternateText">A description of the image, for users of assistive technologies.</param>
 /// <param name="addImageQuery">A value whether Windows is allowed to append a query string to the image URI supplied in the Tile notification.</param>
 /// <returns></returns>
 public static IUwpExtension AddHeroImage(this IUwpExtension extension, ToastImageSource imageSource, string?alternateText = null, bool?addImageQuery = null)
 => PlatformAddHeroImage(extension, imageSource, alternateText, addImageQuery);
示例#8
0
 /// <summary>
 /// Add an image inline with other toast content. <seealso cref="IUwpExtension.AddInlineImage(Uri, string?, bool?, AdaptiveImageCrop?, bool?)"/>
 /// <seealso cref="IToastImageSourceFactory"/>
 /// </summary>
 /// <param name="extension">Target extension.</param>
 /// <param name="imageSource">Image to add.</param>
 /// <param name="alternateText">A description of the image, for users of assistive technologies.</param>
 /// <param name="addImageQuery">A value whether Windows is allowed to append a query string to the image URI supplied in the Tile notification.</param>
 /// <param name="hintCrop">A value whether a margin is removed. images have an 8px margin around them.</param>
 /// <param name="hintRemoveMargin">the horizontal alignment of the image.This is only supported when inside an <see cref="AdaptiveSubgroup"/>.</param>
 public static IUwpExtension AddInlineImage(this IUwpExtension extension, ToastImageSource imageSource, string?alternateText = null, bool?addImageQuery = null, AdaptiveImageCrop?hintCrop = null, bool?hintRemoveMargin = null)
 => PlatformAddInlineImage(extension, imageSource, alternateText, addImageQuery, hintCrop, hintRemoveMargin);
示例#9
0
 static IUwpExtension PlatformAddInlineImage(this IUwpExtension extension, ToastImageSource imageSource, string?alternateText, bool?addImageQuery, AdaptiveImageCrop?hintCrop, bool?hintRemoveMargin)
 => extension.AddInlineImage(imageSource.ImageUri, alternateText, addImageQuery, hintCrop, hintRemoveMargin);
示例#10
0
 /// <summary>
 /// Override the app logo with custom image of choice that will be displayed on the toast.
 /// <seealso cref="IUwpExtension.AddAppLogoOverride(Uri, ToastGenericAppLogoCrop?, string?, bool?)"/>
 /// <seealso cref="IToastImageSourceFactory"/>
 /// </summary>
 /// <param name="extension">Target extension.</param>
 /// <param name="imageSource">Image to add.</param>
 /// <param name="hintCrop">Specify how the image should be cropped.</param>
 /// <param name="alternateText">A description of the image, for users of assistive technologies.</param>
 /// <param name="addImageQuery">A value whether Windows is allowed to append a query string to the image URI supplied in the Tile notification.</param>
 public static IUwpExtension AddAppLogoOverride(this IUwpExtension extension, ToastImageSource imageSource, ToastGenericAppLogoCrop?hintCrop = null, string?alternateText = null, bool?addImageQuery = null)
 => PlatformAddAppLogoOverride(extension, imageSource, hintCrop, alternateText, addImageQuery);
示例#11
0
 static IUwpExtension PlatformAddHeroImage(this IUwpExtension extension, ToastImageSource imageSource, string?alternateText, bool?addImageQuery)
 => extension.AddHeroImage(imageSource.ImageUri, alternateText, addImageQuery);
示例#12
0
 static IUwpExtension PlatformAddAppLogoOverride(this IUwpExtension extension, ToastImageSource imageSource, ToastGenericAppLogoCrop?hintCrop, string?alternateText, bool?addImageQuery)
 => extension.AddAppLogoOverride(imageSource.ImageUri, hintCrop, alternateText, addImageQuery);
示例#13
0
 static IUwpExtension PlatformAddInlineImage(this IUwpExtension extension, ToastImageSource imageSource, string?alternateText, bool?addImageQuery, AdaptiveImageCrop?hintCrop, bool?hintRemoveMargin)
 => throw ExceptionUtils.NotSupportedOrImplementedException;
示例#14
0
 static IUwpExtension PlatformAddHeroImage(this IUwpExtension extension, ToastImageSource imageSource, string?alternateText, bool?addImageQuery)
 => throw ExceptionUtils.NotSupportedOrImplementedException;
示例#15
0
 static IUwpExtension PlatformAddAppLogoOverride(this IUwpExtension extension, ToastImageSource imageSource, ToastGenericAppLogoCrop?hintCrop, string?alternateText, bool?addImageQuery)
 => throw ExceptionUtils.NotSupportedOrImplementedException;