public static void ShowFeedDialog(string toId = "",string link = "",string linkName = "",string linkCaption = "",string linkDescription = "",string picture = "") { //dialogPopup.Loaded += dialogPopup_Loaded; var webDialog = new WebDialogUserControl(); webDialog.ParentControlPopup = dialogPopup; dialogPopup.Child = webDialog; #if WP8 || WINDOWS_PHONE // Set where the popup will show up on the screen. dialogPopup.VerticalOffset = 40; dialogPopup.HorizontalOffset = 0; #endif #if WP8 dialogPopup.Height = Application.Current.Host.Content.ActualHeight - 40; dialogPopup.Width = Application.Current.Host.Content.ActualWidth; #endif #if WINDOWS_PHONE dialogPopup.Height = Window.Current.Bounds.Height - 40; dialogPopup.Width = Window.Current.Bounds.Width; #endif #if WINDOWS dialogPopup.Height = Window.Current.Bounds.Height; dialogPopup.Width = Window.Current.Bounds.Width; #endif webDialog.Height = dialogPopup.Height; webDialog.Width = dialogPopup.Width; webDialog.ShowFeedDialog(toId, link, linkName, linkCaption, linkDescription, picture); // Open the popup. dialogPopup.IsOpen = true; }
/// <summary> /// Mimics the WebviewAuthentication's AuthenticateAsync method. /// </summary> public static void AuthenticateAsync(WebAuthenticationOptions options, Uri startUri, Uri endUri) { if (options != WebAuthenticationOptions.None) { throw new NotImplementedException("This method does not support authentication options other than 'None'."); } Popup dialogPopup = new Popup(); var webDialog = new WebDialogUserControl(); webDialog.ParentControlPopup = dialogPopup; dialogPopup.Child = webDialog; #if WP8 || WINDOWS_PHONE // Set where the popup will show up on the screen. dialogPopup.VerticalOffset = 40; dialogPopup.HorizontalOffset = 0; #endif #if WP8 dialogPopup.Height = Application.Current.Host.Content.ActualHeight - 40; dialogPopup.Width = Application.Current.Host.Content.ActualWidth; #endif #if WINDOWS_PHONE dialogPopup.Height = Window.Current.Bounds.Height - 40; dialogPopup.Width = Window.Current.Bounds.Width; #endif #if WINDOWS dialogPopup.Height = Window.Current.Bounds.Height; dialogPopup.Width = Window.Current.Bounds.Width; #endif webDialog.Height = dialogPopup.Height; webDialog.Width = dialogPopup.Width; webDialog.LoginViaWebview(startUri); // Open the popup. dialogPopup.IsOpen = true; }
public static void ShowAppRequestsDialog(WebDialogFinishedDelegate callback, String message="Select your friends", String title="", List<string> appIdList=null) { var webDialog = new WebDialogUserControl(); webDialog.ParentControlPopup = dialogPopup; dialogPopup.Child = webDialog; #if WP8 || WINDOWS_PHONE // Set where the popup will show up on the screen. dialogPopup.VerticalOffset = 40; dialogPopup.HorizontalOffset = 0; #endif #if WP8 dialogPopup.Height = Application.Current.Host.Content.ActualHeight - 40; dialogPopup.Width = Application.Current.Host.Content.ActualWidth; #endif #if WINDOWS_PHONE dialogPopup.Height = Window.Current.Bounds.Height - 40; dialogPopup.Width = Window.Current.Bounds.Width; #endif #if WINDOWS dialogPopup.Height = Window.Current.Bounds.Height; dialogPopup.Width = Window.Current.Bounds.Width; #endif webDialog.Height = dialogPopup.Height; webDialog.Width = dialogPopup.Width; webDialog.ShowAppRequestsDialog(callback, message, title, appIdList); // Open the popup. dialogPopup.IsOpen = true; }