Ejemplo n.º 1
0
        protected override void OnAppearing()
        {
            base.OnAppearing();


            if (CrossConnectivity.Current.ConnectionTypes != null)
            {
                ConnectionDetails.Text =
                    CrossConnectivity.Current.ConnectionTypes.FirstOrDefault().ToString() == "Cellular"
                        ? "Fără conexiune la internet"
                        : CrossConnectivity.Current.ConnectionTypes.FirstOrDefault().ToString();
            }

            CrossConnectivity.Current.ConnectivityChanged += UpdateNetworkInfo;

            try {
                BindingContext = viewModel = new NetworkPageViewModel();
            } catch (Exception e) {
                Debug.WriteLine(e);
            }
        }
Ejemplo n.º 2
0
 public NetworkPage()
 {
     InitializeComponent();
     DataContext = new NetworkPageViewModel();
 }
Ejemplo n.º 3
0
        public NetworkViewPage()
        {
            InitializeComponent();

            this.BindingContext = viewModel = new NetworkPageViewModel();
        }