Here is the step to use WiFiAdapter in my WPF (WPFCallUWPapi) project.
Step 1. install the below package in the WPFCallUWPapi Nuget.[Microsoft.Windows.SDK.Contracts, System.Runtime.WindowsRuntime, System.Runtime.WindowsRuntime.xaml]
Step 2. Add the Button to call the API.
<Button Content="Call API" Name="Button" Padding="10" HorizontalAlignment="Center" VerticalAlignment="Center" Click="Button_Click"/>
the code for Button_Click:(async is necessary):
Step 3. Built annd run the WPFCallUWPapi
Step 4. If you meet some error related Identity, you can try to create a Windows Application Packaging Project to make an Identity for WPF App. Mine name is WPFCallUWPapi.App , and it's target versions are all 1903. Set WPFCallUWPapi.App as Startup project.