private async void ContentDialog_SecondaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) { _closeDialog = true; Constants.AddGameErrors status = _editGameContentDialogVm.EditGame(); if (status != Constants.AddGameErrors.NoError) { _closeDialog = false; switch (status) { case Constants.AddGameErrors.NameInvalid: Flyout.ShowAttachedFlyout(GameNameTextBox); break; case Constants.AddGameErrors.DescriptionInvalid: Flyout.ShowAttachedFlyout(GameDescriptionTextBox); break; case Constants.AddGameErrors.PriceInvalid: Flyout.ShowAttachedFlyout(GamePriceTextBox); break; case Constants.AddGameErrors.CategoriesInvalid: Flyout.ShowAttachedFlyout(CategoriesTextBox); break; } } }
private void LeadNext(object sender, RoutedEventArgs e) { cur.lead1(); Flyout fly = new Flyout(); fly.FlyoutPresenterStyle = FlyoutStyle; StackPanel tempPanel = new StackPanel(); TextBlock tempTitle = new TextBlock(), tempContent = new TextBlock(); Button BTNnext = new Button(); BTNnext.Content = "next"; BTNnext.Background = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)); BTNnext.Click += LeadNext1; BTNnext.HorizontalAlignment = HorizontalAlignment.Right; tempTitle.FontSize = 20; tempContent.FontSize = 15; tempContent.TextWrapping = TextWrapping.WrapWholeWords; tempContent.MaxWidth = 350; tempTitle.Text = "IMPORTANCE LEVEL OF THE KEYWORD"; tempContent.Text = "When a keyword is selected, use key 'up' and 'down' " + "to change this keyword's level of importance; the keyword" + "turn to red to reveal that its way more important in this query" + "than other keyword"; tempPanel.Children.Add(tempTitle); tempPanel.Children.Add(tempContent); tempPanel.Children.Add(BTNnext); fly.Content = tempPanel; FlyoutBase.SetAttachedFlyout(cur, fly); Flyout.ShowAttachedFlyout(cur); }
public void lead() { cur.Leading = true; Flyout fly = new Flyout(); fly.FlyoutPresenterStyle = FlyoutStyle; StackPanel tempPanel = new StackPanel(); TextBlock tempTitle = new TextBlock(), tempContent = new TextBlock(); Button BTNnext = new Button(); BTNnext.Content = "next"; BTNnext.Background = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)); BTNnext.Click += LeadNext; BTNnext.HorizontalAlignment = HorizontalAlignment.Right; tempTitle.FontSize = 24; tempContent.FontSize = 15; tempTitle.Text = "GENERATE YOUR QUERY"; tempContent.Text = "Input your query with this search box on top"; tempContent.TextWrapping = TextWrapping.WrapWholeWords; tempContent.MaxWidth = 350; tempPanel.Children.Add(tempTitle); tempPanel.Children.Add(tempContent); tempPanel.Children.Add(BTNnext); fly.Content = tempPanel; FlyoutBase.SetAttachedFlyout(this, fly); Flyout.ShowAttachedFlyout(this); }
void ShowFlyout() { if ((this.DataContext as IVLCStorageItem).StorageItem != null) { Flyout.ShowAttachedFlyout(RootGrid); } }
private void Grid_RightTapped(object sender, RightTappedRoutedEventArgs e) { if (IsFlyoutEnabled) { Flyout.ShowAttachedFlyout((Grid)sender); } }
private void IllustrationFullScreenButton_Click(object sender, RoutedEventArgs e) { var lvm = ((FrameworkElement)sender).DataContext as LineViewModel; ((ImagePreviewFlyout.Content) as FrameworkElement).DataContext = lvm; Flyout.ShowAttachedFlyout(this); }
private void Grid_Holding(object sender, HoldingRoutedEventArgs e) { if (IsFlyoutEnabled) { Flyout.ShowAttachedFlyout((Grid)sender); } }
private void LeadNext1(object sender, RoutedEventArgs e) { cur.quitLead1(); cur.lead2(); Flyout fly = new Flyout(); fly.FlyoutPresenterStyle = FlyoutStyle; StackPanel tempPanel = new StackPanel(); TextBlock tempTitle = new TextBlock(), tempContent = new TextBlock(); Button BTNnext = new Button(); BTNnext.Content = "next"; BTNnext.Background = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)); BTNnext.Click += LeadNext2; BTNnext.HorizontalAlignment = HorizontalAlignment.Right; tempTitle.FontSize = 24; tempContent.FontSize = 15; tempTitle.Text = "WANT A HINT?"; tempContent.TextWrapping = TextWrapping.WrapWholeWords; tempContent.MaxWidth = 350; tempContent.Text = "Click this 'hint' button to get some hint about the keyword selected," + "you would get some keyword in same topic, which may help you generate" + "your query more easily"; tempPanel.Children.Add(tempTitle); tempPanel.Children.Add(tempContent); tempPanel.Children.Add(BTNnext); fly.Content = tempPanel; FlyoutBase.SetAttachedFlyout(cur, fly); Flyout.ShowAttachedFlyout(cur); }
/// <summary> /// Delete the selected tasklist /// </summary> private void DeleteListButton_Click(object sender, RoutedEventArgs e) { var button = sender as Button; _activeGuid = GetTaskListGuidFromButton(button); Flyout.ShowAttachedFlyout(button); }
private void ShowNoteFlyoutIfEnabled(FrameworkElement element) { if (!IsNoteFlyoutEnabled) { return; } if (ReorderMode == ListViewReorderMode.Enabled) { return; } if (element == null) { return; } openedFlyout = Flyout.GetAttachedFlyout(element); if (openedFlyout == null) { return; } openedFlyout.Closed += OpenedFlyout_Closed; Flyout.ShowAttachedFlyout(element); }
private void RenameFlyoutItem_Click(object sender, RoutedEventArgs e) { var container = (ListViewItem)hostedConfigList.ContainerFromItem(((FrameworkElement)sender).DataContext); var nameText = container.FindDescendantByName("nameText"); Flyout.ShowAttachedFlyout(nameText); }
/// <summary> /// Save the selected tasklist /// </summary> private void SaveListButton_Click(object sender, RoutedEventArgs e) { var button = sender as Button; _activeGuid = GetTaskListGuidFromButton(button); SaveFlyoutUserPath.Text = _activeGuid.ToString(); Flyout.ShowAttachedFlyout(button); }
private void ShowNoteImageFlyout(FrameworkElement element) { if (element == null) { return; } Flyout.ShowAttachedFlyout(element); }
private void LoadFileButton_Click(object sender, RoutedEventArgs e) { _isFileLoad = true; LoadFlyoutTextHeader.Text = resourceLoader.GetString("LoadXMLFlyoutText"); var button = sender as Button; Flyout.ShowAttachedFlyout(button); }
private void DeleteButton_Click(object sender, RoutedEventArgs e) { var button = sender as Button; activeTask = GetTaskFromButton(button); activeTaskIndex = TasksCollection.IndexOf(activeTask); Flyout.ShowAttachedFlyout(button); }
private void CourseTapped(object sender, TappedRoutedEventArgs e) { FrameworkElement element = sender as FrameworkElement; if (element != null) { Flyout.ShowAttachedFlyout(element); } }
private void ListViewRightTapped1(object sender, RightTappedRoutedEventArgs e) { var listView = sender as ListView; if (listView != null) { Flyout.ShowAttachedFlyout(listView); } }
private void OnTextBlockRighTapped(object sender, RightTappedRoutedEventArgs e) { var tb = sender as TextBlock; if (tb != null) { Flyout.ShowAttachedFlyout(tb); } }
private void btn_CB_Click(object sender, RoutedEventArgs e) { if (!UserManage.IsLogin()) { messShow.Show("请先登录!", 3000); return; } Flyout.ShowAttachedFlyout((HyperlinkButton)sender); rb_5.IsChecked = true; }
private void textBlock_RightTapped(object sender, RightTappedRoutedEventArgs e) { // メニュの表示 TextBlock tb = sender as TextBlock; if (tb != null) { Flyout.ShowAttachedFlyout(tb); } }
//_______________________________ //------------------------------- // -->> Flyout notifications <<-- //_______________________________________________ // Shows a Flyout with the message at the element //_______________________________________________ public void notifyFlyout(string message, FrameworkElement element) { Flyout flyout = new Flyout(); var messageTextBlock = new TextBlock(); messageTextBlock.Text = message; flyout.Content = messageTextBlock; flyout.Placement = FlyoutPlacementMode.Bottom; FlyoutBase.SetAttachedFlyout(element, flyout); Flyout.ShowAttachedFlyout(element); }
private async void DisplayToast(String message) { toastText.Text = message; Flyout.ShowAttachedFlyout(animationToolBar); await Task.Delay(2300); var flyout = Flyout.GetAttachedFlyout(animationToolBar); flyout.Hide(); }
private void listBox_SelectionChanged(object sender, RoutedEventArgs e) { ListBox lb = sender as ListBox; if (lb != null) { Flyout.ShowAttachedFlyout(lb); rootPage.NotifyUser("Flyout opened from ListBox", NotifyType.StatusMessage); } }
private void Grid_Tapped(object sender, TappedRoutedEventArgs e) { Flyout fly = new Flyout(); fly.FlyoutPresenterStyle = new Style(typeof(FlyoutPresenter)); WrapPanel tempPanel = new WrapPanel(); tempPanel.Orientation = Orientation.Horizontal; foreach (var kw in _kws) { AssociateT2Control t = new AssociateT2Control(kw, false); t.Margin = new Thickness(5); tempPanel.Children.Add(t); } fly.Content = tempPanel; FlyoutBase.SetAttachedFlyout(this, fly); Flyout.ShowAttachedFlyout(this); }
public object Execute(object sender, object parameter) { var eventArgs = parameter as RightTappedRoutedEventArgs; var tappedElement = eventArgs?.OriginalSource as FrameworkElement; if (tappedElement != null) { var contextMenuItemsDelegate = MenuItemsDelegate; if (contextMenuItemsDelegate != null && tappedElement.DataContext != null) { var itemViewModel = tappedElement.DataContext; var contextMenuItems = contextMenuItemsDelegate(itemViewModel); if (contextMenuItems != null) { var menuFlyout = new MenuFlyout(); foreach (var contextMenuItem in contextMenuItems) { if (!contextMenuItem.Title.IsNullOrWhiteSpace() && contextMenuItem.Command != null) { var item = new MenuFlyoutItem { Text = contextMenuItem.Title, Command = contextMenuItem.Command, CommandParameter = itemViewModel }; menuFlyout.Items.Add(item); } } if (menuFlyout.Items.Count > 0) { menuFlyout.ShowAt(tappedElement, eventArgs.GetPosition(tappedElement)); Flyout.SetAttachedFlyout(tappedElement, menuFlyout); Flyout.ShowAttachedFlyout(tappedElement); // This ensures that nested ListView objects don't try to keep handling this right tap. eventArgs.Handled = true; } } } } return(null); }
private void connectionPositionView_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (connectionPositionView.SelectedIndex == -1) { return; } else if (connectionPositionView.SelectedIndex == 0) { // we are using the disconnected base Node nodeAdded = this.queryNodeGroup.AddNode(((ListViewOntologyInfoEntry)this.oInfoView.SelectedItem).OClass.GetNameString(false), this.oInfo); this.nodegroupCanvas.CheckNodeAdded(); this.AnchorFlyout.Hide(); } else { List <OntologyPath> pathCollection = null; List <ListViewPathEntry> displayCollection = new List <ListViewPathEntry>(); ListViewPathAnchorEntry lvpae = (ListViewPathAnchorEntry)this.connectionPositionView.SelectedItem; foreach (ListViewPathAnchorEntry curr in this.connectionPositionView.Items) { // find the proper one. if (connectionPositionView.SelectedItem.Equals(curr)) { pathCollection = curr.PathList; foreach (OntologyPath pt in pathCollection) { ListViewPathEntry lvpe = new ListViewPathEntry(pt, lvpae.Anchor); displayCollection.Add(lvpe); } break; } } if (pathCollection != null) { this.connectionSelectionView.ItemsSource = displayCollection; Flyout.ShowAttachedFlyout(this.AnchorGrid); } } }
private void SendClientFileButton_Click(object sender, RoutedEventArgs e) { if ((!string.IsNullOrWhiteSpace(ServerFileTextBox.Text)) && (!string.IsNullOrWhiteSpace(ClientFileTextBox.Text))) { ClientFileTextBox.Text = ClientFileTextBox.Text.TrimStart(new char[] { '"' }).TrimEnd(new char[] { '"' }); ServerFileTextBox.Text = ServerFileTextBox.Text.TrimStart(new char[] { '"' }).TrimEnd(new char[] { '"' }); var button = sender as Button; HeaderGet.Visibility = Visibility.Collapsed; HeaderSend.Visibility = Visibility.Visible; SourceFileHeaderGet.Visibility = Visibility.Collapsed; SourceFileHeaderSend.Visibility = Visibility.Visible; TargetFileHeaderGet.Visibility = Visibility.Collapsed; TargetFileHeaderSend.Visibility = Visibility.Visible; SourceFileBody.Text = ClientFileTextBox.Text; TargetFileBody.Text = ServerFileTextBox.Text; sending = true; Flyout.ShowAttachedFlyout(button); } }
private void LeadNext2(object sender, RoutedEventArgs e) { cur.quitLead2(); cur.reset(); Flyout fly = new Flyout(); fly.FlyoutPresenterStyle = FlyoutStyle; StackPanel tempPanel = new StackPanel(); TextBlock tempTitle = new TextBlock(), tempContent = new TextBlock(); tempTitle.FontSize = 24; tempContent.FontSize = 15; tempTitle.Text = "YOU ARE DONE"; tempContent.TextWrapping = TextWrapping.WrapWholeWords; tempContent.MaxWidth = 350; tempContent.Text = "enjoy your query plz"; tempPanel.Children.Add(tempTitle); tempPanel.Children.Add(tempContent); fly.Content = tempPanel; FlyoutBase.SetAttachedFlyout(cur, fly); Flyout.ShowAttachedFlyout(cur); }
/// <summary> /// Event to indicate webview is starting a navigation /// </summary> /// <param name="sender"></param> /// <param name="args"></param> async void FavoriteBrowser_NavigationStarting(WebView sender, WebViewNavigationStartingEventArgs args) { if (args.Uri == null) { return; } tabObject.Url = args.Uri.ToString(); tabObject.PageTitle = FavoriteBrowser.DocumentTitle; // var vault = new Windows.Security.Credentials.PasswordVault(); bool isCredsPresent = true; if (!FavoriteBrowser.Source.AbsoluteUri.Contains("ms-appx-web:")) { ((SearchBox)MainFrameHost.Current.FindName("_FavouritesSearchBox")).QueryText = args.Uri.AbsoluteUri;// FavoriteBrowser.Source.AbsoluteUri; } credsPrevResourceUrl = args.Uri.Scheme + "://" + args.Uri.Host + "/"; //credsPrevResourceUrl = FavoriteBrowser.Source.Scheme + "://" + FavoriteBrowser.Source.Host + "/"; var credentialMgr = CredentialManager.GetInstance(); var passwordCreds = credentialMgr.GetCredential(credsPrevResourceUrl); // vault.FindAllByResource(credsResourceUrl).FirstOrDefault(); if (passwordCreds != null) { isCredsPresent = true; } else { isCredsPresent = false; } if (!isCredsPresent && true == await GetFravoriteBrowserWithCreds()) { Flyout.ShowAttachedFlyout((FrameworkElement)sender); } IsNavigationCompleted = false; //btnShowCredential.IsEnabled = false; // FavoriteBrowser.Visibility = Visibility.Collapsed; }
private void FilterHiddenPostsListViewItem_Tapped(object sender, TappedRoutedEventArgs e) { Flyout.SetAttachedFlyout(FilterButton, this.Resources["FilterHiddenFlyout"] as Flyout); Flyout.ShowAttachedFlyout(FilterButton); }