async void OnRecognize(object sender, Windows.UI.Xaml.RoutedEventArgs e)
        {
            if (inkManager.GetStrokes().Count > 0)
            {
                // the following call to RecognizeAsync may fail for various reasons, most notably if another recognition is in progress
                try
                {
                    var recognitionResults = await inkManager.RecognizeAsync(inkManager.AnySelected()?Windows.UI.Input.Inking.InkRecognitionTarget.Selected : Windows.UI.Input.Inking.InkRecognitionTarget.All);

                    // Save recognition results to inkManager
                    inkManager.UpdateRecognitionResults(recognitionResults);

                    // Display recognition result
                    String str = "Recognition result:";
                    foreach (var r in recognitionResults)
                    {
                        str += " " + r.GetTextCandidates()[0];
                    }
                    rootPage.NotifyUser(str, SDKTemplate.NotifyType.StatusMessage);
                }
                catch (System.Exception se)
                {
                    rootPage.NotifyUser("Recognize error " + se.HResult, SDKTemplate.NotifyType.ErrorMessage);
                }
            }
            else
            {
                rootPage.NotifyUser("Must first write something.", SDKTemplate.NotifyType.ErrorMessage);
            }
        }
        async void OnRecognize(object sender, Windows.UI.Xaml.RoutedEventArgs e)
        {
            if (inkManager.GetStrokes().Count > 0)
            {
                var recognitionResults = await inkManager.RecognizeAsync(inkManager.AnySelected()?Windows.UI.Input.Inking.InkRecognitionTarget.Selected : Windows.UI.Input.Inking.InkRecognitionTarget.All);

                // Save recognition results to inkManager
                inkManager.UpdateRecognitionResults(recognitionResults);

                // Display recognition result
                String str = "Recognition result:";
                foreach (var r in recognitionResults)
                {
                    str += " " + r.GetTextCandidates()[0];
                }
                rootPage.NotifyUser(str, SDKTemplate.NotifyType.StatusMessage);
            }
            else
            {
                rootPage.NotifyUser("Must first write something.", SDKTemplate.NotifyType.StatusMessage);
            }
        }