public static void LoadKMLFromResources(C1VectorLayer vl, string resname, bool clear, ProcessVectorItem pv) { using (Stream stream = typeof(Utils).GetTypeInfo().Assembly.GetManifestResourceStream(resname)) { if (stream != null) { if (clear) { vl.Children.Clear(); } vl.LoadKML(stream, false, pv); } } }