I'll preface this by saying that I'm posting this on behalf of my boss so I haven't done any research myself, although he's been working on the problem for a while so I'm sure he's done his due diligence.

We would like to know whether there is any way to interrogate a Graphics object and determine whether it is to be used to print or to render to some other canvas. We're aware of an API call that can be used but would prefer to avoid that route if possible. There's also the possibility of simply passing a flag in with the Graphics object that is True from a PrintPage event handler and False from elsewhere, but that's not ideal either. We're looking for a managed property or method accessible via the Graphics class itself, but nothing's jumping out. Any ideas?