title: how to get default selected printer's port name in wpf
body: <p>I wrote code to get name of printer which is installed in my system.but i don't know to get that printers port name. here the code what i wrote.</p>
  
  <pre><code>public MainWindow()
      {
          this.InitializeComponent();
  
          PrintServer server = new PrintServer();
  
          foreach (PrintQueue queue in server.GetPrintQueues())
          {
              cboPrinters.Items.Add(queue.FullName);
          }
  
          var DefaultPrinter = new LocalPrintServer().DefaultPrintQueue;
          string default_name=DefaultPrinter.FullName;
  
          txxt_default.Text = "The default printe is "+" "+default_name;
      }
  </code></pre>
  
  <p>it's result will be like this</p>
  
  <p><img src="https://i.stack.imgur.com/vKNN0.png" alt="printer"></p>
  
  <p><img src="https://i.stack.imgur.com/Wp144.png" alt="enter image description here"></p>
  
  <p>i have to get selected printer's port name "DOP7"(mentioned below figure).please help me.</p>