Added contextual repainters to handle graphics paint events correctly