public static ToastContentBuilder AddAppLogoOverride( this ToastContentBuilder builder, string uri, ToastGenericAppLogoCrop?hintCrop = default, string?alternateText = default, bool?addImageQuery = default) { var appLogoOverrideUri = new ToastGenericAppLogo { Source = uri }; if (hintCrop is { } crop) { appLogoOverrideUri.HintCrop = crop; } if (alternateText is { } alt) { appLogoOverrideUri.AlternateText = alt; } if (addImageQuery is { } query) { appLogoOverrideUri.AddImageQuery = query; } AppLogoOverrideUriProperty.SetValue(builder, appLogoOverrideUri); return(builder); }
/// <summary> /// Override the app logo with custom image of choice that will be displayed on the toast. /// </summary> /// <param name="uri">The URI of the image. Can be from your application package, application data, or the internet. Internet images must be less than 200 KB in size.</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> /// <returns>The current instance of <see cref="ToastContentBuilder"/></returns> public ToastContentBuilder AddAppLogoOverride(Uri uri, ToastGenericAppLogoCrop?hintCrop = null, string alternateText = default(string), bool?addImageQuery = default(bool?)) { AppLogoOverrideUri = new ToastGenericAppLogo() { Source = uri.OriginalString }; if (hintCrop != null) { AppLogoOverrideUri.HintCrop = hintCrop.Value; } if (alternateText != default(string)) { AppLogoOverrideUri.AlternateText = alternateText; } if (addImageQuery != default(bool?)) { AppLogoOverrideUri.AddImageQuery = addImageQuery; } return(this); }
/// <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);
/// <summary> /// Override the app logo with custom image of choice that will be displayed on the toast. /// </summary> /// <param name="uri">The URI of the image. Can be from your application package, application data, or the internet. Internet images must be less than 200 KB in size.</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> /// <returns>The current instance of <see cref="ToastContentBuilder"/></returns> public ToastContentBuilder AddAppLogoOverride( Uri uri, #if WINRT ToastGenericAppLogoCrop?hintCrop, string alternateText, bool?addImageQuery)
/// <summary> /// Override the app logo with custom image of choice that will be displayed on the toast. /// </summary> /// <param name="uri">The URI of the image. Can be from your application package, application data, or the internet. Internet images must be less than 200 KB in size.</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> /// <returns>The current instance of <see cref="ToastContentBuilder"/></returns> public ToastContentBuilder AddAppLogoOverride(Uri uri, ToastGenericAppLogoCrop?hintCrop, string alternateText) { return(AddAppLogoOverride(uri, hintCrop, alternateText, default)); }
/// <summary> /// Override the app logo with custom image of choice that will be displayed on the toast. /// </summary> /// <param name="uri">The URI of the image. Can be from your application package, application data, or the internet. Internet images must be less than 200 KB in size.</param> /// <param name="hintCrop">Specify how the image should be cropped.</param> /// <returns>The current instance of <see cref="ToastContentBuilder"/></returns> public ToastContentBuilder AddAppLogoOverride(Uri uri, ToastGenericAppLogoCrop?hintCrop) { return(AddAppLogoOverride(uri, hintCrop, default)); }
public IUwpExtension AddAppLogoOverride(Uri uri, ToastGenericAppLogoCrop?hintCrop = null, string?alternateText = null, bool?addImageQuery = null) { tbc.AddAppLogoOverride(uri, hintCrop, alternateText, addImageQuery); return(this); }
static IUwpExtension PlatformAddAppLogoOverride(this IUwpExtension extension, ToastImageSource imageSource, ToastGenericAppLogoCrop?hintCrop, string?alternateText, bool?addImageQuery) => extension.AddAppLogoOverride(imageSource.ImageUri, hintCrop, alternateText, addImageQuery);
static IUwpExtension PlatformAddAppLogoOverride(this IUwpExtension extension, ToastImageSource imageSource, ToastGenericAppLogoCrop?hintCrop, string?alternateText, bool?addImageQuery) => throw ExceptionUtils.NotSupportedOrImplementedException;