/// <summary> /// <para>Create toast notification.</para> /// </summary> /// <param name="xml">XML document with tile data.</param> /// <param name="image">Uri to image to show on a toast, can be empty, in that case text-only notification will be shown.</param> /// <param name="text">A text to display on a toast notification.</param> /// <returns> /// <para>A toast object for further work with created notification or null, if creation of toast failed.</para> /// </returns> public static Toast Create(string xml) { int toastXml = Toast.CreateToastXml(xml); if (toastXml < 0) { return((Toast)null); } return(new Toast(toastXml)); }
/// <summary> /// <para>Create toast notification.</para> /// </summary> /// <param name="xml">XML document with tile data.</param> /// <param name="image">Uri to image to show on a toast, can be empty, in that case text-only notification will be shown.</param> /// <param name="text">A text to display on a toast notification.</param> /// <returns> /// <para>A toast object for further work with created notification or null, if creation of toast failed.</para> /// </returns> public static Toast Create(string xml) { int num = Toast.CreateToastXml(xml); if (num < 0) { return(null); } return(new Toast(num)); }
public static Toast Create(string xml) { int num = Toast.CreateToastXml(xml); Toast result; if (num < 0) { result = null; } else { result = new Toast(num); } return(result); }