Exemple #1
0
 public void OnSnippetSelected(SnippetSelectedEventArgs e)
 {
     if (SnippetSelected != null)
     {
         SnippetSelected(this, e);
     }
 }
Exemple #2
0
        private void SnippetTapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e)
        {
            if (GridViewSnippets.SelectedIndex == -1)
            {
                return;
            }

            var selectedSnippet = GridViewSnippets.SelectedItem as CodeSnippet;

            if (selectedSnippet == null)
            {
                return;
            }

            // Fire the event which allows the host page to use the selected snippet
            var snippetEventArgs = new SnippetSelectedEventArgs {
                Snippet = selectedSnippet
            };

            OnSnippetSelected(snippetEventArgs);
        }