Method FromUrl
FromUrl(string)
Initializes a new instance of the ImageSet class from the specified url.
public static ImageSet FromUrl(string url)
Parameters
url
stringThe file or embedded resource url used to load the image.
Returns
Examples
var ImageSize = 16;
var ResPrefix = $"embres:ControlsTest.Resources.Png._{ImageSize}.";
var url = $"{ResPrefix}arrow-left-{ImageSize}.png";
ImageSet imageSet = ImageSet.FromUrl(url); // can raise an exception if file not found
ImageSet imageSet2 = ImageSet.FromUrlOrNull(url); // return null instead of
exception if file not found
Remarks
url
can include assembly name. Example:
"embres:Alternet.UI.Resources.Svg.ImageName.png?assembly=Alternet.UI"