-
Notifications
You must be signed in to change notification settings - Fork 7.9k
/
Copy pathScenario4_Input.cpp
38 lines (33 loc) · 1.28 KB
/
Scenario4_Input.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************
#include "pch.h"
#include "Scenario4_Input.h"
#include "Scenario4_Input.g.cpp"
using namespace winrt;
using namespace Windows::Foundation;
using namespace Windows::Globalization;
using namespace Windows::UI::Xaml;
namespace winrt::SDKTemplate::implementation
{
Scenario4_Input::Scenario4_Input()
{
InitializeComponent();
}
void Scenario4_Input::ShowResults_Click(IInspectable const&, RoutedEventArgs const&)
{
// This scenario uses the Windows.Globalization.Language class to obtain the user's current
// input language. The language tag returned reflects the current input language specified
// by the user.
hstring userInputLanguage = Language::CurrentInputMethodLanguageTag();
// Display the results
OutputTextBlock().Text(L"User's current input language: " + userInputLanguage);
}
}