public FacebookLoginPage(FacebookConnection connection) { this.Title = "FacebookLoginPage"; // Connection = new FacebookConnection(key, secret, scope); // connection.SignInCompleted += Connection_SignInCompleted; this._Connection = connection; this._Browser = new WebView(); //_Browser.Source = new UrlWebViewSource() { Url = _Connection.LoginUri().AbsoluteUri }; this._Connection.SignIn(this._Browser); Label lbl = new Label () { Text = "Connecting..." }; lbl.SetBinding(Label.IsVisibleProperty, "IsVisible", BindingMode.OneWay, new BooleanInverterConverter()); lbl.BindingContext = this._Browser; this._BaseLayout = new StackLayout() { Orientation = StackOrientation.Vertical, HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, }; this._BaseLayout.Children.Add(lbl); this._BaseLayout.Children.Add(this._Browser); this._Browser.IsVisible = false; Padding = new Thickness(0, Device.OnPlatform(20, 0, 0), 0, 0); // Accomodate iPhone status bar. Content = this._BaseLayout; }
public FacebookLoginPage(FacebookConnection connection) { this.Title = "FacebookLoginPage"; // Connection = new FacebookConnection(key, secret, scope); // connection.SignInCompleted += Connection_SignInCompleted; this._Connection = connection; this._Browser = new WebView(); //_Browser.Source = new UrlWebViewSource() { Url = _Connection.LoginUri().AbsoluteUri }; this._Connection.SignIn(this._Browser); Label lbl = new Label() { Text = "Connecting..." }; lbl.SetBinding(Label.IsVisibleProperty, "IsVisible", BindingMode.OneWay, new BooleanInverterConverter()); lbl.BindingContext = this._Browser; this._BaseLayout = new StackLayout() { Orientation = StackOrientation.Vertical, HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, }; this._BaseLayout.Children.Add(lbl); this._BaseLayout.Children.Add(this._Browser); this._Browser.IsVisible = false; Padding = new Thickness(0, Device.OnPlatform(20, 0, 0), 0, 0); // Accomodate iPhone status bar. Content = this._BaseLayout; }