I can find tons of examples on how to make a Text Services Framework Service but not one on how to make an app that uses it actually. While I'm trying to do this in C# I'm getting despite enough to even use C++ examples if that's all I can get!
Text Services Framework Application
2.2k views Asked by shmuelie At
2
There are 2 answers
1
On
Someone (@copyliu) created a C#-based TextService (https://github.com/copyliu/YIME) example. I have had some success experimenting with this codebase and managed to make it work on normal Desktop apps on Windows 10.
However, I have some issues with using the .NET based TextService COM object in an UWP environment, i.e. the CLR (not the CLR that UWP is running on, but the CLR instance used by the C# TextService) seems to have failed to bootstrap. See: CLR cannot create .NET-based COM objects in UWP
I wrote an article for MSDN magazine that talks about writing TSF text stores, and there are a couple of samples in the Windows 7 SDK that implement ITextStoreACP. You may also find this implementation interesting as well.
Windows 8 modern apps should implement ITextStoreACP2 instead; the changes are relatively minor.
Part of the difficulty of writing a sample for ITextStoreACP is that you need some sort of document already, which tends to make the samples overly complicated.
All the examples I know of are in C++. Text stores (unlike text services) can be written in C# without any performance issues.