Get list of network printers silverlight
I want to get the list of network printers through s开发者_StackOverflow中文版ilverlight. I have seen a few examples of using WMI, but they are not available in Silverlight, so, I was wondering if there are any alternatives to find network printers through silverlight or at least the installed printers...
There is also a question posted here
In Silverlight 5, you can use EnumPrinters Win32 API call through PInvoke. The code is pretty long, so I put together a sample that shows how to enumerate the printers on the machine.
http://10rem.net/blog/2011/09/27/enumerating-printers-using-pinvoke-in-silverlight-5
With Silverlight 4, you're out of luck.
Its my understanding that you cannot do this. You don't have the control over this, it is simply handed off for its built in support. This is the same reason why you can't specify a printer - it just doesn't allow this.
精彩评论