void onStartDrag(object sender, EventArgs e) { GraphicObject go = sender as GraphicObject; lock (go.IFace.UpdateMutex) { go.IFace.DragImageHeight = dragIconSize; go.IFace.DragImageWidth = dragIconSize; SvgPicture pic = new SvgPicture(); pic.Load(go.IFace, IconPath); ImageSurface img = new ImageSurface(Format.Argb32, dragIconSize, dragIconSize); using (Context ctx = new Context(img)) { Rectangle r = new Rectangle(0, 0, dragIconSize, dragIconSize); pic.Paint(ctx, r); ctx.Operator = Operator.In; ctx.SetSourceRGBA(1.0, 1.0, 1.0, 1.0); ctx.Rectangle(r); ctx.Fill(); } go.IFace.DragImage = img; } }