Reputation: 1317
I want to implement a method in C# class library project which will take a word as an input parameter and return correct spelling or suggestions of the words using .Net PresentationFramework.dll
dll.
In WPF, PresentationFramework.dll provides this feature for a text box control when we enable the SpellCheck property value to true.
<TextBox SpellCheck.IsEnabled="True" Name="myTextBox"></TextBox>
But I need similar feature in class library project where I will not have any controls to type the input value. Just I want to use this spell check feature in custom method. Is there any way to use this DLL functionality to achieve the same?
Upvotes: 1
Views: 771
Reputation: 36361
There is the win32 Spellcheck API.
HRESULT Check(
[in] LPCWSTR text,
[out, retval] IEnumSpellingError **value
);
As far as I know there is no first party wrapper around this in .net, but a quick google suggest there are at least one third party wrapper.
So you might need to decide if you want to use a library or write your own wrapper.
Upvotes: 2