In this tutorial, you'll build a Windows Presentation Foundation (WPF) app that uses Azure Cognitive Services for text translation, language detection, and spell checking with a single subscription key. Specifically, your app will call APIs from Translator Text and Bing Spell Check.
What is WPF? It is a UI framework that creates desktop client apps. The WPF development platform supports a broad set of app development features, including an app model, resources, controls, graphics, layout, data binding, documents, and security. It is a subset of the .NET Framework, so if you have previously built apps with the .NET Framework using ASP.NET or Windows Forms, the programming experience should be familiar. WPF uses the Extensible app Markup Language (XAML) to provide a declarative model for app programming, which we'll review in the coming sections.
This is a list of the Cognitive Services used in this tutorial. Follow the link to browse the API reference for each feature.
Service | Feature | Description |
---|---|---|
Translator Text | Get Languages | Retrieve a complete list of supported languages for text translation. |
Translator Text | Translate | Translate text into more than 70 languages. |
Translator Text | Detect | Detect the language of the input text. Includes confidence score for detection. |
Bing Spell Check | Spell Check | Correct spelling errors to improve translation accuracy. |
- An Azure Cognitive Services subscription. Get a Cognitive Services key.
- A Windows machine
- Visual Studio 2017 - Community or Enterprise
Follow these instructions to run the WPF translation app on your Windows machine. For the full tutorial, see Tutorial: Create a translation app with WPF, C#.
- Clone this repository.
- Open
WPFTranslationApp.sln
. - Add your Cognitive Services subscription key to
MainWindow.xaml.cs
. - Click Start in Visual Studio.
- That's it, you should have a working app.