private void StatusLabel_RightTapped(object sender, RightTappedRoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout(StatusLabel); e.Handled = true; }
private void MarkSeenMark_Tapped(object sender, TappedRoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout(sender as FrameworkElement); e.Handled = true; }
private void noteItem_Holding(object sender, HoldingRoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout(sender as FrameworkElement); }
//图片右击 private void LayerImage_RightTapped(object sender, RightTappedRoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender); Jugde();//判断 }
private void Border_Holding(object sender, HoldingRoutedEventArgs e) { Hover = (FrameworkElement)sender; FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender); }
private void HideSearchResults() { FlyoutBase.GetAttachedFlyout(_flyoutContainer)?.Hide(); }
public object Execute(object sender, object parameter) { FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender); return(null); }
/// <summary> /// Ajoute un bouton à la barre /// </summary> /// <param name="objectType">type d'objet à créer</param> /// <param name="emplacement">Type d'emplacment du bouton sur la CommandBar, PrimaryCommands ou SecondaryCommands</param> /// <param name="icon">Icon du bouton</param> /// <param name="label">Label du bouton</param> /// <param name="command">ICommand du bouton</param> /// <param name="commandParameter">CommandParameter de la ICommand du bouton</param> private static CommandBarElement AddObjectToCommandBar(CommandBarButtonType objectType, CommandBarEmplacement emplacement, IconElement icon, string label, ICommand command, object commandParameter, FlyoutBase flyout) { ICommandBarElement element = null; switch (objectType) { case CommandBarButtonType.Button: element = new AppBarButton { Icon = icon, Label = label, Command = command, CommandParameter = commandParameter }; break; case CommandBarButtonType.ToggleButton: element = new AppBarToggleButton() { Icon = icon, Label = label, Command = command, CommandParameter = commandParameter }; break; case CommandBarButtonType.FlyoutButton: element = new AppBarButton() { Icon = icon, Label = label, Flyout = flyout }; break; case CommandBarButtonType.Separator: element = new AppBarSeparator(); break; } if (element != null) { if (emplacement == CommandBarEmplacement.Primary) { _commandBar.PrimaryCommands.Add(element); } else { _commandBar.SecondaryCommands.Add(element); } if (_commandBar.Visibility == Visibility.Collapsed) { _commandBar.Visibility = Visibility.Visible; } } return new CommandBarElement() { Element = element, Emplacement = emplacement }; }
private void PinCommandBarButton_Click(object sender, RoutedEventArgs e) { MovableAppBarButton button = (MovableAppBarButton)sender; FlyoutBase.ShowAttachedFlyout(button); }
private void Gfijos_Holding(object sender, RightTappedRoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender); }
private void MonsterTagFlyout_Closing(FlyoutBase sender, FlyoutBaseClosingEventArgs args) { MonsterLogList.SelectedItem = null; }
private void pic_Tapped(object sender, TappedRoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout(pic); }
private void PageInfoElement_Tapped(object sender, TappedRoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender); }
private static IEnumerable<DependencyObject> DecomposeFlyout(FlyoutBase flyoutBase) { var flyout = flyoutBase as Flyout; if (flyout != null && flyout.Content != null) yield return flyout.Content; var menuFlyout = flyoutBase as MenuFlyout; if (menuFlyout != null && menuFlyout.Items != null) { foreach (var item in menuFlyout.Items) { yield return item; } } }
private void ArticleLink_Holding(object sender, RoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender); }
private void sceneContentEditor_EditComplete() { if (_flyout != null) { _flyout.Hide(); _flyout = null; } }
private void HeaderLB_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (HeaderLB.SelectedIndex != -1) { if (toSettings || toWebView) { SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = HomePage.Instance.eventopen.Visibility == Visibility.Visible ? AppViewBackButtonVisibility.Visible : AppViewBackButtonVisibility.Collapsed; MainFrame.GoBack(); toSettings = false; toWebView = false; } if (MainSplitView.IsPaneOpen == true) { MainSplitView.IsPaneOpen = false; } SettingsLB.SelectedIndex = -1; if (e.AddedItems[0] == SendNotification) { HomePage.Instance.mainframe.Navigate(typeof(SendNotificationPage)); } else if (e.AddedItems[0] == RaffleManager) { RaffleList.Items.Clear(); MenuFlyoutSubItem futuros = new MenuFlyoutSubItem() { Text = "Futuros" }; MenuFlyoutSubItem anteriores = new MenuFlyoutSubItem() { Text = "Anteriores" }; foreach (Event _event in EventsPage.Instance.listEvents) { futuros.Items.Add(new MenuFlyoutItem() { Text = _event.Name }); } foreach (Event _event in EventsPage.Instance.pastEvents) { MenuFlyoutItem item = new MenuFlyoutItem() { Text = _event.Name }; item.Click += (s, ev) => { HomePage.Instance.mainframe.Navigate(typeof(RaffleManagerPage), _event); }; anteriores.Items.Add(item); } RaffleList.Items.Add(futuros); RaffleList.Items.Add(anteriores); FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender); HeaderLB.SelectedIndex = -1; } else { HomePage.Instance.mainframe.Navigate(typeof(EventsPage)); } } }
private void Source__RightTapped(object sender, RightTappedRoutedEventArgs e) { ((MenuFlyout)FlyoutBase.GetAttachedFlyout((FrameworkElement)sender)).ShowAt(sender as UIElement, e.GetPosition(sender as UIElement)); }
private void SongItemWrapper_Holding(object sender, HoldingRoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender); }
private void ShowSearchResults() { FlyoutBase.ShowAttachedFlyout(_flyoutContainer); _searchBox.Opacity = 0; }
private void NonterminalInputer_KeyDown(object sender, KeyRoutedEventArgs e) { TextBox nonterminal = (TextBox)sender; if (e.Key == Windows.System.VirtualKey.Enter && !string.IsNullOrEmpty(nonterminal.Text)) { // ε represents epsilon token, but the user does not // need to add it by himself if (nonterminal.Text.Contains('ε')) { nonterminal.Text = ""; if (sender is FrameworkElement illegalInput) { FlyoutBase.ShowAttachedFlyout(illegalInput); } } else { try { Terminals.First(elem => elem.Token == nonterminal.Text); // typed nonterminal is same as one existed terminal if (sender is FrameworkElement illegalInput) { FlyoutBase.ShowAttachedFlyout(illegalInput); } } catch (Exception) { try { Nonterminals.First(elem => elem.Token == nonterminal.Text); // duplicated nontermianl } catch (Exception) { // accepted nonterminal Nonterminals.Add(new TokenViewer { Token = nonterminal.Text, IsStart = false, Type = TokenType.Nonterminal }); } } finally { nonterminal.Text = ""; } } } else if (nonterminal.Text.Length == 4) { e.Handled = true; } else if (e.Key == Windows.System.VirtualKey.Space) { e.Handled = true; } else if (e.Key == Windows.System.VirtualKey.Tab) { e.Handled = true; } }
/// <summary> /// Called when applying the control template. /// </summary> protected override void OnApplyTemplate() { IsLoading = false; if (_flyoutContainer != null) { var flyout = FlyoutBase.GetAttachedFlyout(_flyoutContainer); if (flyout != null) { flyout.Closed -= Flyout_Closed; } } if (_searchBox != null) { _searchBox.SizeChanged -= SearchBox_OnSizeChanged; _searchBox.GotFocus -= SearchBox_GotFocus; } if (_internalSearchBox != null) { _internalSearchBox.GotFocus -= SearchBox_GotFocus; } if (_searchResultListBox != null) { _searchResultListBox.Tapped -= SearchResultListBox_Tapped; _searchResultListBox.KeyUp -= SearchResultListBox_KeyUp; } if (_selectionsListBox != null) { _selectionsListBox.Tapped -= SelectionsListBox_Tapped; if (_isPreviewKeyUpEventSupported) { _selectionsListBox.PreviewKeyUp -= SelectionsListBox_KeyUp; } } _searchBox = GetTemplateChild(SearchBoxPartName) as TextBox; _internalSearchBox = GetTemplateChild(InternalSearchBoxTextBoxPartName) as TextBox; _searchResultListBox = GetTemplateChild(SearchResultListBoxPartName) as ListBox; _selectionsListBox = GetTemplateChild(SelectionsListBoxPartName) as ListBox; _flyoutContainer = GetTemplateChild(FlyoutContainerPartName) as FrameworkElement; if (_flyoutContainer != null) { var flyout = FlyoutBase.GetAttachedFlyout(_flyoutContainer); if (flyout != null) { flyout.Closed += Flyout_Closed; } } if (_searchBox != null) { _searchBox.SizeChanged += SearchBox_OnSizeChanged; _searchBox.GotFocus += SearchBox_GotFocus; } if (_internalSearchBox != null) { _internalSearchBox.GotFocus += SearchBox_GotFocus; } if (_searchResultListBox != null) { _searchResultListBox.Tapped += SearchResultListBox_Tapped; _searchResultListBox.KeyUp += SearchResultListBox_KeyUp; } if (_selectionsListBox != null) { _selectionsListBox.Tapped += SelectionsListBox_Tapped; if (_isPreviewKeyUpEventSupported) { _selectionsListBox.PreviewKeyUp += SelectionsListBox_KeyUp; } } base.OnApplyTemplate(); }
private void ShowFlyoutClick(object sender, RoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout(FlyoutPanel); }
private void noteItem_RightTapped(object sender, RightTappedRoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout(sender as FrameworkElement); }
private void Button_Click(object sender, RoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender); }
private void SetDeviceSelectionFlyout() { FlyoutBase.SetAttachedFlyout(this.scanButton, deviceSelectionFlyout); FlyoutBase.ShowAttachedFlyout(this.scanButton); }
private void NameLabel_Tapped(object sender, TappedRoutedEventArgs e) { Editor.HSBColorSource = null; Editor.HSBColorSource = HSBColorSource; FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender); }
private void YearLabel_RightTapped(object sender, RightTappedRoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout(YearFiltersMenuTextBlock); e.Handled = true; }
private void ChangeCinemaButton_OnClick(object sender, RoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout(ChangeCinemaButton); }
private void Tools_Click(object sender, RoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout(this); }
private void buttonFilter_Click(object sender, RoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout(buttonFilter); }
private void libraryItemRenderer_RightTapped(object sender, RightTappedRoutedEventArgs e) { _flyout = FlyoutBase.GetAttachedFlyout((sender as FrameworkElement)); _flyout.Placement = FlyoutPlacementMode.Right; _flyout.ShowAt((sender as FrameworkElement)); }
private void WeaponButton_Tapped(object sender, TappedRoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout(sender as FrameworkElement); //selectedVehicle = VehicleMap.Children.IndexOf((sender as PlanningViewVehicleVM).CCImg); }
private void editFlyout_Closed(object sender, object e) { _flyout = null; }
/// <summary> /// Handles right taps on the listview /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ListView_RightTapped(object sender, RightTappedRoutedEventArgs e) { FlyoutBase.ShowAttachedFlyout(sender as FrameworkElement); SelectedIndex = AttachedFilesListView.SelectedIndex; }
/// <summary> /// Ajoute un bouton avec un flyout associé à la CommandBar /// </summary> /// <param name="emplacement">Type d'emplacment du bouton sur la CommandBar, PrimaryCommands ou SecondaryCommands</param> /// <param name="icon">Icon du bouton</param> /// <param name="label">Label du bouton</param> /// <param name="flyout">Flyout associé au bouton</param> public static CommandBarElement AddFlyoutButton(CommandBarEmplacement emplacement, IconElement icon, string label, FlyoutBase flyout) { return AddObjectToCommandBar(CommandBarButtonType.FlyoutButton, emplacement, icon, label, null, null, flyout); }
public FlyoutBaseEvents(FlyoutBase This) { this.This = This; }