diff --git a/Custom-Dictionary.md b/Custom-Dictionary.md deleted file mode 100644 index 6c4dc9729..000000000 --- a/Custom-Dictionary.md +++ /dev/null @@ -1,301 +0,0 @@ ---- -layout: post -title: Custom Dictionary in Windows Forms Spell Checker control | Syncfusion -description: Learn about Custom Dictionary support in Syncfusion Windows Forms Spell Checker (SpellCheckerAdv) control and more details. -platform: WPF -control: SpellCheckerAdv -documentation: ug ---- - -# Custom Dictionary in Windows Forms Spell Checker (SpellCheckerAdv) - -You can use a default and custom dictionaries to spell check the document based on your need. You can also spell check for any culture and languages using various dictionaries. - -## Default SpellCheck Dictionary - -[SpellCheckerAdv](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.SpellCheckerAdv.html) provides built-in dictionary for `English` language and it provides suitable suggestion of the error words. - -## Load your own dictionaries for any language - -You can add your own dictionary to [SpellCheckerAdv.Dictionaries](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.SpellCheckerAdv.html#Syncfusion_Windows_Forms_Tools_SpellCheckerAdv_Dictionaries) collection. `SpellCheckerAdv` support 3 standard dictionary file format: - -* Hunspell -* Ispell -* OpenOffice - -## SpellCheck using Hunspell dictionary - -You can check spelling mistakes using `Hunspell` dictionary format. This format contains files as follows, - -* Affix file with grammar rules- `*.aff`, -* Basic Words file - `*.dic` file. - -### Adding Hunspell Dictionary - -1.Add your [HunspellDictionary](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.HunspellDictionary.html)'s required culture `*.aff` and `*.dic` files and add them as `Resource` into the application. - -![Adding Basic word and Grammar files as resource into the application](Custom-Dictionary_images/HunspellAdding.png) - -2.Create a `HunspellDictionary` instance and add the basic word & grammar file path to the [HunspellDictionary.DictionaryPath](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.HunspellDictionary.html#Syncfusion_Windows_Forms_Tools_HunspellDictionary_DictionaryPath) & [HunspellDictionary.GrammarPath](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.HunspellDictionary.html#Syncfusion_Windows_Forms_Tools_HunspellDictionary_GrammarPath) properties and add the culture to the [HunspellDictionary.Culture](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.HunspellDictionary.html) property. - -3.Add the `HunspellDictionary` into the [SpellCheckerAdv.Dictionaries](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.SpellCheckerAdv.html#Syncfusion_Windows_Forms_Tools_SpellCheckerAdv_Culture) collection - -4.Setting the required culture to the `SpellCheckerAdv.Culture` property. - -N> The following code snippets shows how to add Hunspell dictionary to the `SpellChecker`. Please refer [Adding SpellCheckerAdv to RichTextBox control](https://help.syncfusion.com/windowsforms/spell-checker/getting-started#configuring-spellcheckeradv-into-richtextbox-control) to know how to configure SpellCheckerAdv. - -{% tabs %} -{% highlight C# %} - -//Creating a culture instance -CultureInfo culture = new CultureInfo("fr-FR"); - -SpellCheckerAdv SpellChecker = new SpellCheckerAdv(); - -// Adding Hunspell dictonaries in Dictionaries collection -SpellChecker.Dictionaries = new DictionaryCollection(); - -//Add French culture Hunspell dictionary -SpellChecker.Dictionaries.Add( - new HunspellDictionary() - { - Culture = culture, - GrammarPath = @"FrenchDictionary\french.aff", - DictionaryPath = @"FrenchDictionary\french.dic" - } -); - -//Setting a French culture for SpellChecker -SpellChecker.Culture = culture; - -{% endhighlight %} -{% endtabs %} - -N> You can add multiple `HunspellDictionary` with various culture files into the `SpellCheckerAdv.Dictionaries` collection. Based on the `SpellCheckerAdv.Culture` respective `HunspellDictionary` is used for spell check. - -![SpellCheck using Hunspell dictionary](Custom-Dictionary_images/HunSpell.png) - -## SpellCheck using Ispell dictionary - -You can check spelling mistakes using `Ispell` dictionary format. This format contains files as follows, - -`Ispell` dictionary contains two files as follows, - -* Affix file with grammar rules- `*.aff`, -* Basic Words file - `*.xlg` or `*.dic` file. - -### Adding Ispell Dictionary - -1.Add your [IspellDictionary](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.IspellDictionary.html)'s required culture `*.aff` and `*.dic` files and add them as `Resource` into the application. - -![Adding Basic word and Grammar files as resource into the application](Custom-Dictionary_images/IspellAdding.png) - -2.Create a `IspellDictionary` instance and add the basic word & grammar file path to the [IspellDictionary.DictionaryPath](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.IspellDictionary.html#Syncfusion_Windows_Forms_Tools_IspellDictionary_DictionaryPath) & [IspellDictionary.GrammarPath](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.IspellDictionary.html#Syncfusion_Windows_Forms_Tools_IspellDictionary_GrammarPath) properties and add the culture to the [IspellDictionary.Culture](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.IspellDictionary.html) property. - -3.Add the `IspellDictionary` into the `SpellCheckerAdv.Dictionaries` collection - -4.Setting the required culture to the `SpellCheckerAdv.Culture` property. - -N> The following code snippets only explain the insertion of the Ispell dictionary to the `SpellChecker`. You can get code snippets to add a `SpellChecker`, from [Adding SpellCheckerAdv to RichTextBox control](https://help.syncfusion.com/windowsforms/spell-checker/getting-started#configuring-spellcheckeradv-into-richtextbox-control) topic. - -{% tabs %} -{% highlight C# %} - -//Creating a culture instance -CultureInfo culture = new CultureInfo("es-ES"); - -SpellCheckerAdv SpellChecker = new SpellCheckerAdv(); - -// Adding Ispell dictonaries in Dictionaries collection -SpellChecker.Dictionaries = new DictionaryCollection(); - -//Add Spanish culture Ispell dictionary -SpellChecker.Dictionaries.Add( - new IspellDictionary() - { - Culture = culture, - GrammarPath = @"SpanishDictionary\spanish.aff", - DictionaryPath = @"SpanishDictionary\spanish.dic" - } -); - -//Setting a Spanish culture for SpellChecker -SpellChecker.Culture = culture; - -{% endhighlight %} -{% endtabs %} - -N> You can add multiple `IspellDictionary` with various culture files into the `SpellCheckerAdv.Dictionaries` collection. Based on the `SpellCheckerAdv.Culture` respective `IspellDictionary` is used for spell check. - -![SpellCheck using Ispell dictionary](Custom-Dictionary_images/Ispell.png) - -## SpellCheck using OpenOffice dictionary - -You can check spelling mistakes using `OpenOffice` dictionary format. This format contains files as follows, - -`OpenOffice` dictionary contains two files as follows, - -* Affix file with grammar rules- `*.aff`, -* Basic Words file - `*.dic` file. - -### Adding OpenOffice Dictionary - -1.Add your [OpenOfficeDictionary](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.OpenOfficeDictionary.html)'s required culture `*.aff` and `*.dic` files and add them as `Resource` into the application. - -![Adding Basic word and Grammar files as resource into the application](Custom-Dictionary_images/OpenOfficeAdding.png) - -2.Create a `OpenOfficeDictionary` instance and add the basic word & grammar file path to the [OpenOfficeDictionary.DictionaryPath](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.OpenOfficeDictionary.html) & [OpenOfficeDictionary.GrammarPath](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.OpenOfficeDictionary.html) properties and add the culture to the [OpenOfficeDictionary.Culture](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.OpenOfficeDictionary.html) property. - -3.Add the `OpenOfficeDictionary` into the `SpellCheckerAdv.Dictionaries` collection - -4.Setting the required culture to the `SpellCheckerAdv.Culture` property. - -N> The following code snippets only explain the insertion of the OpenOffice dictionary to the `SpellChecker`. You can get code snippets to add a `SpellChecker`, from [Adding SpellCheckerAdv to RichTextBox control](https://help.syncfusion.com/windowsforms/spell-checker/getting-started#configuring-spellcheckeradv-into-richtextbox-control) topic. - -{% tabs %} -{% highlight c# %} - -//Creating a Spanish culture instance -CultureInfo culture = new CultureInfo("es-ES"); - -SpellCheckerAdv SpellChecker = new SpellCheckerAdv(); - -// Adding OpenOffice dictonaries in Dictionaries collection -SpellChecker.Dictionaries = new DictionaryCollection(); - -//Add Spanish culture OpenOffice dictionary -SpellChecker.Dictionaries.Add( - new OpenOfficeDictionary() - { - Culture = culture, - GrammarPath = @"SpanishDictionary\spanish.aff", - DictionaryPath = @"SpanishDictionary\spanish.dic" - } -); - -//Setting a spanish culture for SpellChecker -SpellChecker.Culture = culture; - -{% endhighlight %} -{% endtabs %} - -N> You can add multiple `OpenOfficeDictionary` with various culture files into the `SpellCheckerAdv.Dictionaries` collection. Based on the `SpellCheckerAdv.Culture` respective `OpenOfficeDictionary` is used for spell check. - -![SpellCheck using OpenOffice dictionary](Custom-Dictionary_images/OpenOffice.png) - -## Add custom words to dictionary - -If you want to add words that is not available in dictionary, you can add it using [CustomDictionary](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.CustomDictionary.html). This dictionary does not has a grammar file, it accepts only dictionary file that contains a list of words. Users can also add words to this custom dictionary by clicking `Add to Dictionary` button available in dialog or context menu. - -### Adding Custom Dictionary - -1.Create a custom dictionary text file as `Resource` into the application - -![Adding custom word files as resource into the application](Custom-Dictionary_images/CustomDictionaryAdding.png) - -2.Create a `CustomDictionary` instance and add the custom word file path to the [CustomDictionary.DictionaryPath](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.CustomDictionary.html#Syncfusion_Windows_Forms_Tools_CustomDictionary_DictionaryPath) property and add the culture to the [CustomDictionary.Culture](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.CustomDictionary.html) property. - -3.Add the `CustomDictionary` into the `SpellCheckerAdv.Dictionaries` collection - -4.Setting the required culture to the `SpellCheckerAdv.Culture` property. - -N> The following code snippets only explain the insertion of the custom dictionary to the `SpellChecker`. You can get code snippets to add a `SpellChecker`, from [Adding SpellCheckerAdv to RichTextBox control](https://help.syncfusion.com/windowsforms/spell-checker/getting-started#configuring-spellcheckeradv-into-richtextbox-control) topic. - -{% tabs %} -{% highlight C# %} - -//Creating a culture instance -CultureInfo culture = new CultureInfo("en-US"); - -SpellCheckerAdv SpellChecker = new SpellCheckerAdv(); - -//Add Custom dictionary for US culture -SpellChecker.Dictionaries.Add( - new CustomDictionary() - { - Culture = culture, - DictionaryPath = @"\English\Custom_en-US.txt" - } -); - -//Add US culture OpenOffice dictionary -SpellChecker.Dictionaries.Add( - new OpenOfficeDictionary() - { - Culture = culture, - GrammarPath = @"USDictionary\en-US.aff", - DictionaryPath = @"USDictionary\en-US.dic" - } -); - -//Setting a US culture for SpellChecker -SpellChecker.Culture = culture; - -{% endhighlight %} -{% endtabs %} - -N> If you only use the custom dictionary, all words that are not included in the dictionary will be shown as error words. - -N> You can add multiple `CustomDictionary` with various culture word files into the `SpellCheckerAdv.Dictionaries` collection. Based on the `SpellCheckerAdv.Culture` respective `CustomDictionary` is used for spell check. - -![SpellCheck using Custom dictionary](Custom-Dictionary_images/CustomDictionary.png) - -## Switch language(Culture) at runtime - -You can add `Hunspell`, `Ispell`, or `OpenOffice` dictionaries one or more times with various culture into the `SpellCheckerAdv.Dictionaries` collection. You can change the spell check culture at runtime by changing the `SpellCheckerAdv.Culture` property. Based on the current `SpellCheckerAdv.Culture` respective dictionary is used to spell check. - -{% tabs %} -{% highlight C# %} - -//Creating a culture instance -CultureInfo culture = new CultureInfo("fr-FR"); - -SpellCheckerAdv SpellChecker = new SpellCheckerAdv(); - -// Adding Hunspell dictonaries in Dictionaries collection -SpellChecker.Dictionaries = new DictionaryCollection(); - -//Add French culture Hunspell dictionary -SpellChecker.Dictionaries.Add( - new HunspellDictionary() - { - Culture = culture, - GrammarPath = @"FrenchDictionary\fr-FR.aff", - DictionaryPath = @"FrenchDictionary\fr-FR.dic" - } -); - -//Add Spanish culture Hunspell dictionary -SpellChecker.Dictionaries.Add( - new HunspellDictionary() - { - Culture = new CultureInfo("es-ES"), - GrammarPath = @"SpanishDictionary\es-ES.aff", - DictionaryPath = @"SpanishDictionary\es-ES.dic" - } -); - -//Add US culture Hunspell dictionary -SpellChecker.Dictionaries.Add( - new HunspellDictionary() - { - Culture = new CultureInfo("en-US"), - GrammarPath = @"USDictionary\en-US.aff", - DictionaryPath = @"USDictionary\/en-US.dic" - } -); - -//Setting a French culture for SpellChecker -SpellChecker.Culture = culture; - -{% endhighlight %} -{% endtabs %} - -![SpellCheck using Hunspell dictionary](Custom-Dictionary_images/HunSpell.png) - -Here, `SpellChecker.Culture` is `fr-FR` culture. So, `fr-FR` cultured `Hunspell` dictionary is used as speck check dictionary. - - - - - diff --git a/Customization.md b/Customization.md deleted file mode 100644 index f681a54d1..000000000 --- a/Customization.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -layout: post -title: Customization in Windows Forms Spell Checker control | Syncfusion -description: Learn about Customization support in Syncfusion Windows Forms Spell Checker (SpellCheckerAdv) control and more details. -platform: WindowsForms -control: SpellCheckerAdv -documentation: ug ---- - -# Customization in Windows Forms Spell Checker (SpellCheckerAdv) - -SpellCheckerAdv allows customizing options to add misspelled words from the input text to the error list. - -{% tabs %} - -{% highlight C# %} - -SpellCheckerAdv checker = new SpellCheckerAdv(); - -checker.IgnoreEmailAddress = true; -checker.IgnoreFileNames = true; - -checker.IgnoreHtmlTags = true; - -checker.IgnoreUrl = true; - -checker.IgnoreSpecialSymbols = true; - -checker.IgnoreMixedCaseWords = true; - -checker.IgnoreUpperCaseWords = true; - -checker.IgnoreAlphaNumericWords = true; - - -{% endhighlight %} - - -{% highlight VB %} - - -Private checker As New SpellCheckerAdv() - -checker.IgnoreEmailAddress = True - -checker.IgnoreFileNames = True - -checker.IgnoreHtmlTags = True - -checker.IgnoreUrl = True - -checker.IgnoreSpecialSymbols = True - -checker.IgnoreMixedCaseWords = True - -checker.IgnoreUpperCaseWords = True - -checker.IgnoreAlphaNumericWords = True - -{% endhighlight %} - -{% endtabs %} - -These options are accessible at runtime through the Spell Checker Options dialog. This can be invoked by Options button available in the SpellChecker dialog. - -![SpellCheckerAdv dialog window](Customization_images/Options1.png) - -![SpellCheckerAdv spell checker option window](Customization_images/Options2.png) - - -## Getting suggestions for wrong word - -SpellCheckerAdv provides support to get suggestion list by passing the wrong word in the below methods. - -* [GetSuggestions](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.SpellCheckerAdv.html#Syncfusion_Windows_Forms_Tools_SpellCheckerAdv_GetSuggestions_System_String_) -* [GetPhoneticWords](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.SpellCheckerAdv.html#Syncfusion_Windows_Forms_Tools_SpellCheckerAdv_GetPhoneticWords_System_String_) -* [GetAnagrams](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.SpellCheckerAdv.html#Syncfusion_Windows_Forms_Tools_SpellCheckerAdv_GetAnagrams_System_String_) - -{% tabs %} - -{% highlight C# %} - -this.spellCheckerAdv1.GetSuggestions("Textboxx"); - -this.spellCheckerAdv1.GetPhoneticWords("Textboxx"); - -this.spellCheckerAdv1.GetAnagrams("Textbox"); - -{% endhighlight %} - -{% highlight VB %} - -Me.spellCheckerAdv1.GetSuggestions("Textboxx") - -Me.spellCheckerAdv1.GetPhoneticWords("Textboxx") - -Me.spellCheckerAdv1.GetAnagrams("Textbox") - -{% endhighlight %} - -{% endtabs %} diff --git a/Getting-Started.md b/Getting-Started.md deleted file mode 100644 index d533550c4..000000000 --- a/Getting-Started.md +++ /dev/null @@ -1,400 +0,0 @@ ---- -layout: post -title: Getting Started with Windows Forms Spell Checker control | Syncfusion -description: Learn here about getting started with Syncfusion Windows Forms Spell Checker (SpellCheckerAdv) control, its elements and more details. -platform: WindowsForms -control: SpellCheckerAdv -documentation: ug ---- - -# Getting Started with Windows Forms Spell Checker (SpellCheckerAdv) - -This section describes how to add a [SpellCheckerAdv](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.SpellCheckerAdv.html) control in a Windows Forms application and overview of its basic functionalities. - -## Assembly deployment - -Refer [control dependencies](https://help.syncfusion.com/windowsforms/control-dependencies#spellchecker) section to get the list of assemblies or NuGet package needs to be added as reference to use the control in any application. - -Please find more details regarding how to install the nuget packages in windows form application in the below link: - -[How to install nuget packages](https://help.syncfusion.com/windowsforms/visual-studio-integration/nuget-packages) - -## Creating simple application with SpellCheckerAdv - -You can create the Windows Forms application with SpellCheckerAdv control as follows: - -1. [Creating project](#creating-the-project) -2. [Add control via designer](#add-control-via-designer) -3. [Add control manually using Code](#add-control-manually-using-code) -4. [Configuring SpellCheckerAdv into RichTextBox control](#configuring-spellCheckerAdv-into-RichTextBox-control) -5. [Applying Dictionary](#applying-dictionary) -6. [Applying Custom Dictionary](#applying-custom-dictionary) -7. [Configuring VisualStyle](#configuring-VisualStyle) - -### Creating the project - -Create a new Windows Forms project in the Visual Studio to display the SpellCheckerAdv with basic information. - -## Add control via designer - -SpellCheckerAdv control can be added to the application by dragging it from the toolbox and dropping it in a designer view. The following required assembly references will be added automatically: - -* Syncfusion.Grid.Base.dll -* Syncfusion.Grid.Windows.dll -* Syncfusion.Shared.Base.dll -* Syncfusion.Shared.Windows.dll -* Syncfusion.SpellChecker.Base.dll -* Syncfusion.Tools.Base.dll -* Syncfusion.Tools.Windows.dll - -![Search SpellCheckerAdv in Toolbox](Getting-Started_images/ToolBox.png) - -![SpellCheckerAdv control added in designer](Getting-Started_images/SpellCheckerAdv-img2.png) - -## Add control manually using Code - -To add control manually in C#, follow the given steps: - -**Step 1** : Add the following required assembly references to the project: - - * Syncfusion.Tools.Base.dll - * Syncfusion.Tools.Windows.dll - * Syncfusion.Shared.Base.dll - * Syncfusion.Shared.Windows.dll - * Syncfusion.SpellChecker.Base.dll - * Syncfusion.Grid.Base.dll - * Syncfusion.Grid.Windows.dll - -**Step 2** : Include the namespaces **Syncfusion.Windows.Forms.Tools**. - -{% tabs %} - -{% highlight C# %} - -using Syncfusion.Windows.Forms.Tools; - -{% endhighlight %} - -{% highlight VB %} - -Imports Syncfusion.Windows.Forms.Tools - -{% endhighlight %} - -{% endtabs %} - -**Step 3** : Create `SpellCheckerAdv` control instance. - -{% tabs %} - -{% highlight C# %} - -SpellCheckerAdv spellCheckerAdv1 = new SpellCheckerAdv(); - -{% endhighlight %} - -{% highlight VB %} - -Dim spellCheckerAdv1 As SpellCheckerAdv = New SpellCheckerAdv - -{% endhighlight %} - -{% endtabs %} - -## Configuring SpellCheckerAdv into RichTextBox control - -**Step 1** : Create a class implementing [ISpellCheckerAdvEditorTools](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.ISpellCheckerAdvEditorTools.html) interface as shown below. - -{% tabs %} - -{% highlight C# %} - - class TextBoxSpellEditor : ISpellCheckerAdvEditorTools - { - /// - /// Initializes the TextBoxBase control. - /// - private TextBoxBase textBox; - /// - /// Initializes the new instance of the TextBoxSpellEditor class. - /// - /// - public TextBoxSpellEditor(Control control) - { - Control = control; - } - /// - /// Gets or sets the Control whose Text is to be spell checked. - /// - public Control Control - { - get - { - return textBox; - } - set - { - textBox = value as TextBoxBase; - } - } - /// - /// Gets or sets the current misspelled word. - /// - - public string CurrentWord { get; set; } - - /// - /// Gets or sets the Text to be spell checked by the - /// - public string Text - { - get - { - return textBox.Text; - } - set - { - textBox.Text = value; - } - } - /// - /// Gets or sets the Control whose Text is to be spell checked. - /// - public Control ControlToCheck - { - get - { - return textBox; - } - set - { - textBox = value as TextBoxBase; - } - } - /// - /// Selects the word specified by the index. - /// - /// Zero based index of the word on the Text. - /// length of the word to be selected. - public void SelectText(int selectionStart, int selectionLength) - { - textBox.Select(selectionStart, selectionLength); - } - } - -{% endhighlight %} - -{% highlight VB %} - -class TextBoxSpellEditor - Implements ISpellCheckerAdvEditorTools - ''' - ''' Initializes the TextBoxBase control. - ''' - Private textBox As TextBoxBase; - ''' - ''' Initializes the new instance of the TextBoxSpellEditor class. - ''' - ''' - Public Sub New(control__1 As Control) - Control = control__1 - End Sub - ''' - ''' Gets or sets the Control whose Text is to be spell checked. - ''' - Public Property Control() As Control - Get - Return textBox - End Get - Set - textBox = TryCast(value, TextBoxBase) - End Set - End Property - ''' - ''' Gets or sets the current misspelled word. - ''' - Public Property CurrentWord() As String - Get - Return textBox.Text - End Get - Set - textBox.Text = value - End Set - End Property - ''' - ''' Gets or sets the Control whose Text is to be spell checked. - ''' - Public Property ControlToCheck() As Control - Get - Return textBox - End Get - Set - textBox = value as TextBoxBase - End Set - End Property - ''' - ''' Gets or sets the Text to be spell checked by the - ''' - Public Property Text() As String - Get - Return textBox.Text - End Get - Set - textBox.Text = value - End Set - End Property - ''' - ''' Selects the word specified by the index. - ''' - ''' Zero based index of the word on the Text. - ''' length of the word to be selected. - Public Sub SelectText(selectionStart As Integer, selectionLength As Integer) - textBox.[Select](selectionStart, selectionLength) - End Sub -End Class - -{% endhighlight %} - -{% endtabs %} - -**Step 2** - Create instances `RichTextBox` (Editor Control to be spell checked) and `Button` and add it to the form. - -{% tabs %} - -{% highlight C# %} - -RichTextBox richTextBox1 = new RichTextBox(); -Button button1 = new Button(); - -this.richTextBox1.Text = resources.GetString("richTextBox1.Text"); -this.button1.Text="Spell Check"; - -this.Controls.Add(this.button1); -this.Controls.Add(this.richTextBox1); - -{% endhighlight %} - -{% highlight VB %} - -Dim richTextBox1 As RichTextBox = New RichTextBox -Dim button1 As Button = New Button - -Me.richTextBox1.Text = resources.GetString("richTextBox1.Text") -Me.button1.Text="Spell Check" - -Me.Controls.Add(Me.button1) -Me.Controls.Add(Me.richTextBox1) - -{% endhighlight %} - -{% endtabs %} - -![Spell checker](Getting-Started_images/SpellCheckerAdv-img1.png) - -**Step 3** - Create an instance of the `TextBoxSpellEditor` class by having `RichTextBox` as its Control and it to `SpellCheckerAdv` using [PerformSpellCheckForControl](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.SpellCheckerAdv.html#Syncfusion_Windows_Forms_Tools_SpellCheckerAdv_PerformSpellCheckForControl_Syncfusion_Windows_Forms_Tools_ISpellCheckerAdvEditorTools_) method. - -{% tabs %} - -{% highlight C# %} - -TextBoxSpellEditor TextEditor = new TextBoxSpellEditor(this.richTextBox1); - -this.spellCheckerAdv1.PerformSpellCheckForControl(TextEditor); - -{% endhighlight %} - -{% highlight VB %} - -Dim TextEditor As New TextBoxSpellEditor(Me.richTextBox1) - -Me.spellCheckerAdv1.PerformSpellCheckForControl(TextEditor) - -{% endhighlight %} - -{% endtabs %} - -**Step 4** - Finally trigger `SpellCheckerAdv` through an event such as `Click` of the button as given below. - -{% tabs %} - -{% highlight C# %} - -private void buttonAdv1_Click(object sender, EventArgs e) -{ - this.spellCheckerAdv1.SpellCheck(new SpellCheckerAdvEditorWrapper(this.richTextBox1)); -} - -{% endhighlight %} - -{% highlight VB %} - -Private Sub buttonAdv1_Click(sender As Object, e As EventArgs) - Me.spellCheckerAdv1.SpellCheck(New SpellCheckerAdvEditorWrapper(Me.richTextBox1)) -End Sub - -{% endhighlight %} - -{% endtabs %} - -![SpellChecking for loaded text](Getting-Started_images/GettingStarted2.png) - -## Applying dictionary - -SpellCheckerAdv provide built-in dictionary whose Path can be set using [DictionaryPath](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.SpellCheckerAdv.html#Syncfusion_Windows_Forms_Tools_SpellCheckerAdv_DictionaryPath) property in SpellCheckerAdv. - -{% tabs %} - -{% highlight C# %} - -this.spellCheckerAdv1.DictionaryPath = "Syncfusion_en_us.dic"; - -{% endhighlight %} - -{% highlight VB %} - -Me.spellCheckerAdv1.DictionaryPath = "Syncfusion_en_us.dic" - -{% endhighlight %} - -{% endtabs %} - -## SpellCheck for any language(culture) - -You can spell check any language(culture) by adding the respective culture to the [SpellCheckerAdv.Culture](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.SpellCheckerAdv.html#Syncfusion_Windows_Forms_Tools_SpellCheckerAdv_Culture) property and add the dictionaries which contains the basic word file and grammar file to the [SpellCheckerAdv.Dictionaries](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.SpellCheckerAdv.html#Syncfusion_Windows_Forms_Tools_SpellCheckerAdv_Dictionaries) collection. - -The following dictionary types are used for spell-checking, - - * Hunspell - * Ispell - * OpenOffice - - N> Refer the [Load your own dictionaries for any language] -(https://help.syncfusion.com/windowsforms/spell-checker/custom-dictionary#load-your-own-dictionaries-for-any-language) page to know more about how to add and use the Dictionary for any culture to an application. - -## Add custom words to dictionary - -If you want to add words that is not available in existing dictionary, you can add it using `CustomDictionary`. This dictionary does not has a grammar file, it accepts only dictionary file that contains a list of words. Users can also add words to this custom dictionary by clicking `Add to Dictionary` button available in dialog or context menu. - -N> Refer the [Adding Custom Dictionary](https://help.syncfusion.com/wpf/spellchecker/custom-dictionary-support#adding-custom-dictionary) page to know more about how to add and use the custom dictionary to an application. - -## Configuring VisualStyle - -Look and feel of the SpellCheckerAdv can be customize using [VisualStyle](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.SpellCheckerAdv.html#Syncfusion_Windows_Forms_Tools_SpellCheckerAdv_VisualStyle) property. - -{% tabs %} - -{% highlight C# %} - -this.spellCheckerAdv1.VisualStyle = SpellCheckerAdvStyle.Office2016Colorful; - -{% endhighlight %} - -{% highlight VB %} - -Me.spellCheckerAdv1.VisualStyle = SpellCheckerAdvStyle.Office2016Colorful - -{% endhighlight %} - -{% endtabs %} - -![SpellCheckerAdv style](Getting-Started_images/GettingStarted2.png) diff --git a/Overview.md b/Overview.md deleted file mode 100644 index b386d7309..000000000 --- a/Overview.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -layout: post -title: About Windows Forms Spell Checker control | Syncfusion -description: Learn here all about introduction of Syncfusion Windows Forms Spell Checker (SpellCheckerAdv) control, its elements and more details. -platform: WindowsForms -control: SpellCheckerAdv -documentation: ug ---- - - -# Windows Forms Spell Checker (SpellCheckerAdv) Overview - -SpellCheckerAdv control offers Microsoft Office style spell checking capabilities to your Windows Application. This component is completely customizable and can be attached to any text-editing controls. End users can also use it together with the standard Microsoft text-editing controls. - -![Spell Checker dialog to correct error words](Overview_images/Overview-2.png) - -## Key features - -* **Ignore and replace** - Provides options to Ignore and replace words one by one as well as all words at once. - -* **Dictionary settings** - Provides built-in dictionary for English Language and also helps to configure based on your own language, using its Custom Dictionary option. - -* **Ignores special expressions** - Provides options to ignore e-mail, URL, numbers, mixed case words and much more. - -* **Visual style** - Provide rich set of visual style to customize the look and feel of SpellCheckerAdv. - - diff --git a/README.md b/README.md index 13286e008..a77158296 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Syncfusion WinForms Documentation -This is the GitHub repository for the technical product documentation for Syncfusion WinForms components. This documentation is published to http://help.syncfusion.com/windowsforms +This is the GitHub repository for the technical product documentation for Syncfusion WinForms components. This documentation is published to https://help.syncfusion.com/windowsforms/ ## Contributions Welcome! -We welcome the [pull request](https://docs.github.com/en/github/managing-files-in-a-repository/editing-files-in-another-users-repository) for improving the WinForms Components user guide documentation. Your contribution towards this will be greatly appreciated. +We welcome the [pull request](https://docs.github.com/en/repositories/working-with-files/managing-files/editing-files) for improving the WinForms Components user guide documentation. Your contribution towards this will be greatly appreciated. diff --git a/VisualStyle.md b/VisualStyle.md deleted file mode 100644 index b751c7f49..000000000 --- a/VisualStyle.md +++ /dev/null @@ -1,169 +0,0 @@ ---- -layout: post -title: VisualStyle in Windows Forms Spell Checker control | Syncfusion -description: Learn about VisualStyle support in Syncfusion Windows Forms Spell Checker (SpellCheckerAdv) control and more details. -platform: WindowsForms -control: SpellCheckerAdv -documentation: ug ---- - -# VisualStyle in Windows Forms Spell Checker (SpellCheckerAdv) - -The SpellCheckerAdv control has rich set of themes for professional representation. You can easily modify the look and feel of the SpellCheckerAdv using the built-in themes. - -It has the below themes. - -• Default - -• Metro - -• Office2016Colorful - -• Office2016White - -• Office2016DarkGray - -• Office2016Black - -The following code example allows you to set the [VisualStyle](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.SpellCheckerAdv.html#Syncfusion_Windows_Forms_Tools_SpellCheckerAdv_VisualStyle) for the SpellCheckerAdv. - -## Default - -This option helps to set the Default theme. - -{% tabs %} - -{% highlight C# %} - -this.spellCheckerAdv1.VisualStyle = Syncfusion.Windows.Forms.Tools.SpellCheckerAdvStyle.Default; - -{% endhighlight %} - - -{% highlight VB %} - -Me.spellCheckerAdv1.VisualStyle = Syncfusion.Windows.Forms.Tools.SpellCheckerAdvStyle.Default - -{% endhighlight %} - -{% endtabs %} - -![Default Theme appearance in SpellCheckerAdv](VisualStyle_images/VisualStyle_img1.png) - -## Metro - -This option helps to set the Metro theme. - -{% tabs %} - -{% highlight C# %} - -this.spellCheckerAdv1.VisualStyle = Syncfusion.Windows.Forms.Tools.SpellCheckerAdvStyle.Metro; - -{% endhighlight %} - - -{% highlight VB %} - -Me.spellCheckerAdv1.VisualStyle = Syncfusion.Windows.Forms.Tools.SpellCheckerAdvStyle.Metro - -{% endhighlight %} - -{% endtabs %} - -![Metro Theme appearance in SpellCheckerAdv](VisualStyle_images/VisualStyle_img2.png) - -## Office2016Colorful - -This option helps to set the Office2016Colorful theme. - -{% tabs %} - -{% highlight C# %} - -this.spellCheckerAdv1.VisualStyle = Syncfusion.Windows.Forms.Tools.SpellCheckerAdvStyle.Office2016Colorful; - -{% endhighlight %} - - -{% highlight VB %} - -Me.spellCheckerAdv1.VisualStyle = Syncfusion.Windows.Forms.Tools.SpellCheckerAdvStyle.Office2016Colorful - -{% endhighlight %} - -{% endtabs %} - -![Office2016 Colorful Theme appearance in SpellCheckerAdv](VisualStyle_images/VisualStyle_img3.png) - -## Office2016White - -This option helps to set the Office2016White theme. - -{% tabs %} - -{% highlight C# %} - -this.spellCheckerAdv1.VisualStyle = Syncfusion.Windows.Forms.Tools.SpellCheckerAdvStyle.Office2016White; - -{% endhighlight %} - - -{% highlight VB %} - -Me.spellCheckerAdv1.VisualStyle = Syncfusion.Windows.Forms.Tools.SpellCheckerAdvStyle.Office2016White - -{% endhighlight %} - -{% endtabs %} - -![Office2016 White Theme appearance in SpellCheckerAdv](VisualStyle_images/VisualStyle_img4.png) - -## Office2016DarkGray - -This option helps to set the Office2016DarkGray theme. - -{% tabs %} - -{% highlight C# %} - -this.spellCheckerAdv1.VisualStyle = Syncfusion.Windows.Forms.Tools.SpellCheckerAdvStyle.Office2016DarkGray; - -{% endhighlight %} - - -{% highlight VB %} - -Me.spellCheckerAdv1.VisualStyle = Syncfusion.Windows.Forms.Tools.SpellCheckerAdvStyle.Office2016DarkGray - -{% endhighlight %} - -{% endtabs %} - -![Office2016 DarkGray Theme appearance in SpellCheckerAdv](VisualStyle_images/VisualStyle_img5.png) - -## Office2016Black - -This option helps to set the Office2016Black theme. - -{% tabs %} - -{% highlight C# %} - -this.spellCheckerAdv1.VisualStyle = Syncfusion.Windows.Forms.Tools.SpellCheckerAdvStyle.Office2016Black; - -{% endhighlight %} - - -{% highlight VB %} - -Me.spellCheckerAdv1.VisualStyle = Syncfusion.Windows.Forms.Tools.SpellCheckerAdvStyle.Office2016Black - -{% endhighlight %} - -{% endtabs %} - -![Office2016 Black Theme appearance in SpellCheckerAdv](VisualStyle_images/VisualStyle_img6.png) - - -N> Refer to the following sample [link](http://www.syncfusion.com/downloads/support/directtrac/general/ze/SpellCheckerAdv_Demo-2092294700.zip) that demonstrates the Visual Style support in SpellCheckerAdv. diff --git a/WindowsForms-toc.html b/WindowsForms-toc.html index 3de706d57..6bbbf9753 100644 --- a/WindowsForms-toc.html +++ b/WindowsForms-toc.html @@ -20,6 +20,9 @@
  • Installation