private void OnClearGraphics(object obj)
{
var mxdoc = ArcMap.Application.Document as IMxDocument;
if (mxdoc == null)
return;
var av = mxdoc.FocusMap as IActiveView;
if (av == null)
return;
var gc = av as IGraphicsContainer;
if (gc == null)
return;
RemoveGraphics(gc, MapGraphicsList);
//av.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);
av.Refresh(); // sometimes a partial refresh is not working
}