To get the vertices of a polygon, you need to go through the Rings of the polygon where each Ring is a PointCollection and each collection is composed of MapPoints (vertices).
Something like:
PointCollection vertices = new PointCollection();
for (int i = 0; i < polygon.Rings.Count; i++)
foreach (var mp in polygon.Rings)
vertices.Add(mp);
To convert this to a polyline geometry, you need to create a Path for every Ring where each Ring and Path contain the same PointCollection.