Method FromUrlOrDefault
FromUrlOrDefault(string, IconSet?)
Initializes a new instance of the IconSet class from the specified url.
public static IconSet? FromUrlOrDefault(string url, IconSet? defaultIcon)
Parameters
Returns
Examples
var ResPrefix = $"embres:ControlsTest.Resources.Icons.";
var url = $"{ResPrefix}default.ico";
var iconSet = IconSet.FromUrl(url); // can raise an exception if file not found
var iconSet2 = IconSet.FromUrlOrNull(url); // return null instead of exception
if file not found
Remarks
url
can include assembly name. Example:
"embres:Alternet.UI.Resources.Svg.IconName.ico?assembly=Alternet.UI"