Domanda

I need to write a text box control for Metro Style app. And I need that this text box can invokes a touch keyboard, when my app runs on tablet PC.

Microsoft advices me:

If you are writing a custom text control (whether in Xaml or not) you will need to make sure it supports the UI Automation TextPattern and ValuePatterns and focus changed events

and

You will need to provide an AutomationPeer which supports the ITextProvider and IValueProvider.

But I can't to figure out what actually I need to do. I will appreciate any help.

È stato utile?

Soluzione

You need to implement a UI Automation Provider; in particular, you need to implement a server-side provider. Start with the UI Automation Provider Programmer's Guide, and pay particular attention to the Document Content Provider Sample, as it demonstrates how to implement TextPattern. There are more samples as part of the Windows 8 SDK, in the samples/ui/uiautomation directory. Also, there's a very quick introduction to server-side introductions here, written by one of the architects of UI Automation.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top