@Andrew Jones, Welcome to Microsoft Q&A, you could try the following code to get category name from wpf.
First of all, please ensure that you add the reference Network List Manager 1.0 Type Library from COM option.
Code:
private void button1_Click(object sender, RoutedEventArgs e)
{
var manager = new NetworkListManager();
var connectedNetworks = manager.GetNetworks(NLM_ENUM_NETWORK.NLM_ENUM_NETWORK_ALL).Cast<INetwork>();
foreach (var network in connectedNetworks)
{
listbox1.Items.Add(network.GetCategory().ToString());
}
}
Tested result:
Best Regards,
Jack
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.