Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TouchKeyboard seems to depend on UWP #432

Open
ite-klass opened this issue Jul 29, 2022 · 3 comments
Open

TouchKeyboard seems to depend on UWP #432

ite-klass opened this issue Jul 29, 2022 · 3 comments

Comments

@ite-klass
Copy link

This repository is for WPF samples, but the TouchKeyboard example project seems to depend on UWP namespaces.

TouchKeyboardEventManager.cs imports Windows.Foundation and Windows.UI.ViewManagement.

The project does not compile for me even with the Windows SDK and VS 2022 UWP workflow installed due to the unknown namespaces.
7 references of the project do not resolve.

What am I missing?

@dipeshmsft
Copy link
Member

Hey @ite-klass look at issue #417 . You need to modify the path to point at Windows.winmd from your system for the application to work.

@ite-klass
Copy link
Author

ite-klass commented Aug 9, 2022

The README says

If you have not installed it to its default location in "C:\Program Files (x86)\Windows Kits\10", you will have to update the reference to Windows.winmd in the project file to point to your installed SDK directory.

I expected the VS installer to install it under default locations. Is that not the case?

I do not have a file at C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Windows.winmd, but do for example at C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.19041.0\Windows.winmd.

I have 9 Windows.winmd files of various size under C:\Program Files (x86)\Windows Kits\ overall.

Adding the reference to the two csproj files changes nothing about the type not being found errors.

    <Reference Include="Windows">
      <HintPath>C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.19041.0\Windows.winmd</HintPath>
    </Reference>
1>------ Build started: Project: TouchKeyboardNotifier, Configuration: Debug Any CPU ------
1>[redacted]\WPF-Samples\Input and Commands\TouchKeyboard\TouchKeyboardNotifier\TouchKeyboardEventManager.cs(20,36,20,94): error CS0246: The type or namespace name 'TypedEventHandler<,>' could not be found (are you missing a using directive or an assembly reference?)
1>[redacted]\WPF-Samples\Input and Commands\TouchKeyboard\TouchKeyboardNotifier\TouchKeyboardEventManager.cs(20,54,20,63): error CS0246: The type or namespace name 'InputPane' could not be found (are you missing a using directive or an assembly reference?)
1>[redacted]\WPF-Samples\Input and Commands\TouchKeyboard\TouchKeyboardNotifier\TouchKeyboardEventManager.cs(20,65,20,93): error CS0246: The type or namespace name 'InputPaneVisibilityEventArgs' could not be found (are you missing a using directive or an assembly reference?)
2>------ Build started: Project: TouchKBRegister, Configuration: Debug Any CPU ------
2>[redacted]\WPF-Samples\Input and Commands\TouchKeyboard\TouchKBRegister\SxSDecorators.xaml(19,14): error MC3074: The tag 'TouchKeyboardAwareDecorator' does not exist in XML namespace 'clr-namespace:Microsoft.Windows.Input.TouchKeyboard;assembly=TouchKeyboardNotifier'. Line 19 Position 14.
2>[redacted]\WPF-Samples\Input and Commands\TouchKeyboard\TouchKBRegister\LotsOfStacking.xaml(21,18): error MC3074: The tag 'TouchKeyboardAwareDecorator' does not exist in XML namespace 'clr-namespace:Microsoft.Windows.Input.TouchKeyboard;assembly=TouchKeyboardNotifier'. Line 21 Position 18.
2>[redacted]\WPF-Samples\Input and Commands\TouchKeyboard\TouchKBRegister\MenuChild.xaml(10,6): error MC3074: The tag 'TouchKeyboardAwareDecorator' does not exist in XML namespace 'clr-namespace:Microsoft.Windows.Input.TouchKeyboard;assembly=TouchKeyboardNotifier'. Line 10 Position 6.
2>[redacted]\WPF-Samples\Input and Commands\TouchKeyboard\TouchKBRegister\MenuSibling.xaml(18,10): error MC3074: The tag 'TouchKeyboardAwareDecorator' does not exist in XML namespace 'clr-namespace:Microsoft.Windows.Input.TouchKeyboard;assembly=TouchKeyboardNotifier'. Line 18 Position 10.
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

@ite-klass
Copy link
Author

VS shows issues on the project references Accessibility, System.Windows.Forms, UIAutomationClient, UIAutomationProvider, UIAutomationTypes. but the build reports no errors regarding those.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants