ArcGISRuntime.UWP.Viewer.MainPage.OnInfoClicked C# (CSharp) Method

OnInfoClicked() private method

private OnInfoClicked ( object sender, RoutedEventArgs e ) : void
sender object
e Windows.UI.Xaml.RoutedEventArgs
return void
        private async void OnInfoClicked(object sender, RoutedEventArgs e)
        {
            var sampleModel = (sender as Button).DataContext as SampleModel;
            if (sampleModel == null)
                return;

            // Create dialog that is used to show the picture
            var dialog = new ContentDialog()
            {
                Title = sampleModel.Name,
                //MaxWidth = ActualWidth,
                //MaxHeight = ActualHeight
            };

            dialog.PrimaryButtonText = "close";
            dialog.SecondaryButtonText = "show";
            dialog.PrimaryButtonClick += (s, args) =>
            {
               
            };
            dialog.SecondaryButtonClick += (s, args) =>
            {
                OnSampleItemTapped(sender, new TappedRoutedEventArgs());
            };

            dialog.Content = new SampleInfoDialog() { DataContext = sampleModel };

            // Show dialog as a full screen overlay. 
            await dialog.ShowAsync();
        }