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