Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to use XtraSpellChecker in XAF

$
0
0

Scenario
This example demonstrates how to incorporate the XtraSpellChecker to XAF applications.

Steps to implement
1. Copy the Spelling.Win project into your solution and build it;

2. Invoke the Application Designer for your executable WinForms project (YourSolutionName.Win) or the Module Designer for your WinForms module project (YourSolutionName.Module.Win) and open the Toolbox (Control+Alt+X);
3. Drag the SpellingWindowsFormsModule item from the Toolbox;
4. Build and run your project.

Important notes
If you are using RichEditControl, check out the Adding Richedit to Sample E736 thread for additional configuration.


UPDATED by Dennis:

Here you can download an improved version of the original example that illustrates another variant of integrating WinForms SpellChecker and ASP.NET WebForms ASPxSpellChecker components in XAF.
My attachment contains three custom XAF extra modules I developed + a small demo project to help you check what is done and how this works. 
Note that this is not a complete solution by any means, but just an example that demonstrates certain integration scenarios to help you implement a spell checking functionality in your end application. There may be issues, so feel free to research, test and modify the source code of these modules to better meet your business needs. I look forward to any feedback on these modules if you find any issues or have further suggestions.

Question Comments

Added By: Louis Z at: 5/15/2014 8:04:47 AM    

1. Copy the Spelling.Win project into your solution and build it;
2. Invoke the Application Designer for your executable project and open the Toolbox (Control+Alt+X);
3. Drag the SpellingWindowsFormsModule item from the Toolbox;
4. Build and run your project.

Added By: Tony Tadros at: 1/15/2015 9:53:11 AM    

Hello Devexpress ,this example is not working anymore ,do you have any update

Added By: Dennis (DevExpress Support) at: 1/16/2015 8:27:34 AM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T197752: SpellChecker integration in XAF 14.2. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.



Added By: Luke Kenyon 1 at: 9/24/2015 12:39:10 AM    

Hi, I just downloaded this and applied it to my project after converting the projects to the latest version. I did notice that it has added 2 button items to the menu for spell checking other than that it does the job which has saved me some time thanks.
Cheers Luke

Added By: Dennis (DevExpress Support) at: 9/24/2015 3:16:16 AM    @Luke: Thanks for taking your time to test this solution in your project and share your feedback with us. This module also adds a corresponding button in the toolbar for checking the whole form.Added By: Hein Kramer at: 4/13/2016 1:28:22 AM    Hi, we used the example from Dennis in our XAF project and worked great! Now after upgrading to DX 15.2.9 the following error occures after closing a view.

System.NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.   bij DevExpress.XtraSpellChecker.Native.FormFocusSpy.CanCheckControl(Control control)   bij DevExpress.XtraSpellChecker.Native.FormFocusSpy.ProcessContainerControlsRecursive(Control container, IControlVisitor visitor)   bij DevExpress.XtraSpellChecker.Native.FormFocusSpy.OnContainerDisposed(Object sender, EventArgs e)   bij System.EventHandler.Invoke(Object sender, EventArgs e)   bij System.ComponentModel.Component.Dispose(Boolean disposing)   bij System.Windows.Forms.Control.Dispose(Boolean disposing)   bij System.Windows.Forms.Form.Dispose(Boolean disposing)   bij DevExpress.XtraEditors.XtraForm.Dispose(Boolean disposing)   bij DevExpress.ExpressApp.Win.Templates.XtraFormTemplateBase.Dispose(Boolean disposing)   bij System.ComponentModel.Component.Dispose()   bij DevExpress.XtraBars.Docking2010.Views.BaseDocument.ReleaseControl()   bij DevExpress.XtraBars.Docking2010.Views.BaseDocument.OnDispose()   bij DevExpress.XtraBars.Docking2010.Views.Tabbed.Document.OnDispose()   bij DevExpress.XtraBars.Docking2010.Base.BaseComponent.Dispose(Boolean disposing)   bij System.ComponentModel.Component.Dispose()   bij System.ComponentModel.Container.Dispose(Boolean disposing)   bij System.ComponentModel.Container.Dispose()   bij DevExpress.ExpressApp.Win.Templates.MainForm.Dispose(Boolean disposing)   bij System.Windows.Forms.Form.WmClose(Message& m)   bij DevExpress.XtraEditors.XtraForm.WndProc(Message& msg)   bij DevExpress.ExpressApp.Win.Templates.XtraFormTemplateBase.WndProc(Message& msg)   bij System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Now I disabled the Dispose action in ReleaseSpellChecker() to prevent this error.
But this is a work-around and not a solution. 

private void ReleaseSpellChecker() {            if(SpellCheckerComponent is IDisposable) {                ((IDisposable)SpellCheckerComponent).Dispose();                SpellCheckerComponent = null;            }        }
It seems to be that some events changed in the DevExpress.XtraSpellChecker.SpellChecker and the internally used FormSpy infecting the dispose events...

Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>