public App() { InitializeComponent(); MainPage = new NavigationPage(new WelcomePage()); g_CustomBluetoothManager = new CustomBluetoothManager(MainPage); }
public ShowPairedListView() { InitializeComponent(); _customBluetoothManager = (Application.Current as App)?.g_CustomBluetoothManager; Items = new ObservableCollection <Contact>(); //_manager = BluetoothAdapter.DefaultAdapter; //_bondedDevices = _manager.BondedDevices; foreach (BluetoothDevice device in _customBluetoothManager.GetListBondedDevices()) { Items.Add(new Contact(device.Name, device.Address)); } MyListView.ItemsSource = Items; }
public WelcomePage() { InitializeComponent(); _customBluetoothManager = (Application.Current as App).g_CustomBluetoothManager; }