public void LoadImage(string path) { if (path.EndsWith(".svg", true, System.Globalization.CultureInfo.InvariantCulture)) { _pic = new SvgPicture(); } else { _pic = new BmpPicture(); } _pic.LoadImage(path); RegisterForGraphicUpdate(); RegisterForLayouting(LayoutingType.Sizing); }
public static object Parse(string path) { if (string.IsNullOrEmpty(path)) { return(null); } Picture _pic = null; if (path.EndsWith(".svg", true, System.Globalization.CultureInfo.InvariantCulture)) { _pic = new SvgPicture(); } else { _pic = new BmpPicture(); } _pic.LoadImage(path); return(_pic); }