public MainPage()
{
this.InitializeComponent();
// Create and initialize a new watcher instance.
watcher = new BluetoothLEAdvertisementWatcher();
// Monitor all iBeacons advertisment
watcher.AdvertisementFilter.Advertisement.iBeaconSetAdvertisement(new iBeaconData());
//// Monitor all iBeacons with UUID
//watcher.AdvertisementFilter.Advertisement.SetiBeaconAdvertismentManufacturerData(
// new iBeaconData()
// {
// UUID = Guid.Parse("{307f40b9-f8f5-6e46-aff9-25556b57fe6d}")
// });
//// Monitor all iBeacons with UUID and Major
//watcher.AdvertisementFilter.Advertisement.SetiBeaconAdvertismentManufacturerData(
// new iBeaconData()
// {
// UUID = Guid.Parse("{307f40b9-f8f5-6e46-aff9-25556b57fe6d}"),
// Major = 18012
// });
//// Monitor all iBeacons with UUID and Major
//watcher.AdvertisementFilter.Advertisement.SetiBeaconAdvertismentManufacturerData(
// new iBeaconData()
// {
// UUID = Guid.Parse("{307f40b9-f8f5-6e46-aff9-25556b57fe6d}"),
// Major = 18012,
// Minor = 1040
// });
beacons = new ObservableCollection<iBeaconData>();
this.DataContext = beacons;
}
protected override void OnNavigatedTo(NavigationEventArgs e)