Example T1253691
Visible to All Users

Integrate DevExpress AI-Powered Text Extensions into Console, WinForms, and WPF Apps

This example registers an Azure OpenAI service and uses AI APIs within a .NET 8 console application and adds AI-powered text processing features to the following DevExpress UI components:

[!Note]
DevExpress does not provide a REST API or include built-in LLMs/SLMs. To use AI services, you need an active Azure/OpenAI subscription to obtain the necessary REST API endpoint, key, and model deployment name. This information must be added at application startup to register AI clients and enable DevExpress AI-powered features in your application.

Implementation Details

Install the following NuGet packages:

  1. Azure.AI.OpenAI
  2. DevExpress.AIIntegration
  3. Microsoft.Extensions.AI.Ollama
  4. Microsoft.Extensions.AI.OpenAI

Register AI Services

The following code in the Program.cs file registers an Azure AI service in the application:

C#
// Modify the following lines to obtain and pass your personal Azure OpenAI credentials to the `Register~` method. static string AzureOpenAIEndpoint { get { return Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT"); } } static string AzureOpenAIKey { get { return Environment.GetEnvironmentVariable("AZURE_OPENAI_APIKEY"); } } static string DeploymentName { get { return Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENTNAME"); } } AIExtensionsContainerDefault defaultAIContainer; public SampleAITextModifier() { ///To register Ollama //OllamaChatClient ollamaChatClient = new OllamaChatClient("http://localhost:11434/api/chat", "yourModelName"); //defaultAIContainer = AIExtensionsContainerConsole.CreateDefaultAIExtensionContainer(ollamaChatClient); ///To register Azure OpenAI AzureOpenAIClient azureOpenAIClient = new AzureOpenAIClient(new Uri(AzureOpenAIEndpoint), new System.ClientModel.ApiKeyCredential(AzureOpenAIKey)); defaultAIContainer = AIExtensionsContainerConsole.CreateDefaultAIExtensionContainer(azureOpenAIClient.AsChatClient(DeploymentName)); }

[!Tip]
Refer to the following help topic for instructions on registering OpenAI, Azure OpenAI, Ollama, and Semantic Kernel: Register AI Clients.

WinForms

Use the BehaviorManager component to activate AI-powered text transform extensions for DevExpress WinForms UI controls.

Drop the BehaviorManager component from the Toolbox onto a Form. Open the behavior manager's smart tag menu and click "Edit Behaviors" to edit behaviors. In the Behavior Collection Editor, create desired AI-powered text processing behaviors, attach them to corresponding UI controls, and configure behavior settings (for example, the Temperature):

devexpress ai integration collection editor

Run the application. Select text in the MemoEdit or RichTextEdit control and invoke the context menu. The context menu will display an "AI Text Transform" submenu with AI-driven commands.

Click the desired command. AI will process the command and generate an answer. The AI-generated answer is displayed within a dialog. You can insert the answer directly into a document or text field with a single click. You can insert AI answers above/below the cursor, replace all content or selected text, or copy the answer to the clipboard.

WPF

To introduce AI-powered capabilities in DevExpress WPF UI controls, add the following namespaces to a Window:

XAML
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm" xmlns:dxai="http://schemas.devexpress.com/winfx/2008/xaml/ai"

The following code snippet attaches AI-powered text processing behaviors to a DevExpress Text Editor:

XAML
<dxe:TextEdit TextWrapping="Wrap"> <dxmvvm:Interaction.Behaviors> <dxai:ExpandBehavior /> <dxai:ShortenBehavior/> <dxai:SummarizeBehavior/> <dxai:ExplainBehavior/> <dxai:ChangeToneBehavior /> <dxai:ProofreadBehavior/> <dxai:ChangeStyleBehavior/> <dxai:TranslateBehavior> <dxai:LanguageInfo Culture="en-US"/> <dxai:LanguageInfo Culture="de-DE"/> <dxai:LanguageInfo Culture="fr-FR"/> </dxai:TranslateBehavior> <dxai:CustomRequestBehavior/> </dxmvvm:Interaction.Behaviors> </dxe:TextEdit>

Files to Review

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

Example Code

console-ai-extension/Program.cs
C#
using Azure.AI.OpenAI; using DevExpress.AIIntegration; using DevExpress.AIIntegration.Extensions; using DevExpress.AIIntegration.Localization; using DevExpress.Data; using Microsoft.Extensions.AI; using System; using System.Globalization; namespace Runtime_AI_Extensions { internal class Program { static void Main(string[] args) { Console.OutputEncoding = System.Text.Encoding.UTF8; //Enable localization //AIIntegrationLocalizer.Active = new CustomAILocalizer(); SampleAITextModifier s = new SampleAITextModifier(); s.ChangeDefaults(); Console.WriteLine(s.GetTranslation("William Shakespeare is a great famous British writer", "Spanish").Result); Console.WriteLine(); Console.WriteLine("William Shakespeare about Elon Musk:" + Environment.NewLine); Console.WriteLine(s.GetShakespeareText("Elon Reeve Musk FRS (born June 28, 1971) is a businessman and investor known for his key roles in space company SpaceX and automotive company Tesla, Inc..").Result); Console.WriteLine(); Console.WriteLine("Mark Twain about Elon Musk:" + Environment.NewLine); Console.WriteLine(s.GetMarkTwainText("Elon Reeve Musk FRS (born June 28, 1971) is a businessman and investor known for his key roles in space company SpaceX and automotive company Tesla, Inc..").Result); Console.WriteLine("Press any key to exit..."); Console.ReadKey(); } public class SampleAITextModifier { //Modify the following lines to obtain and pass your personal Azure OpenAI credentails to the Register* method. string AzureOpenAIEndpoint { get { return Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT"); } } string AzureOpenAIKey { get { return Environment.GetEnvironmentVariable("AZURE_OPENAI_APIKEY"); } } string DeploymentName { get { return Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENTNAME"); } } AIExtensionsContainerDefault defaultAIContainer; public SampleAITextModifier() { ///To register Ollama //OllamaChatClient ollamaChatClient = new OllamaChatClient("http://localhost:11434/", "llama3.1"); //defaultAIContainer = AIExtensionsContainerConsole.CreateDefaultAIExtensionContainer(ollamaChatClient); ///To register Azure OpenAI AzureOpenAIClient azureOpenAIClient = new AzureOpenAIClient(new Uri(AzureOpenAIEndpoint), new System.ClientModel.ApiKeyCredential(AzureOpenAIKey)); defaultAIContainer = AIExtensionsContainerConsole.CreateDefaultAIExtensionContainer(azureOpenAIClient.AsChatClient(DeploymentName)); } public void ChangeDefaults() { AIIntegration.ChatTemperatureDefault = 0.9f; } public async Task<string> GetTranslation(string textToTranslate, string language) { TextResponse result = await defaultAIContainer.TranslateAsync(new TranslateRequest(textToTranslate, language)); if (result.IsCompleted) return result.Response; if (!result.IsRestrictedOrFailed) { string translatedText = result.Response; while (result.IsContinuationRequired) { await result.ContinueAsync(); translatedText += result.Response; } return translatedText; } // When something unexpected has happened switch (result.Status) { case ResponseStatus.MaxTokenLimitExceeded: case ResponseStatus.InputSizeLimitExceeded: return "The text you're trying to send within a request is too long and exceeds the limit."; case ResponseStatus.ContentFiltered: return "Potentially harmful content was detected in your request."; case ResponseStatus.Error: return "An error occurred while processing the request."; } throw new NotSupportedException(); } // How to replace the default extension public async Task<string> GetShakespeareText(string textToModify) { defaultAIContainer.Register<ChangeStyleRequest, WilliamShakespeareStyleExtension>(); string res = await defaultAIContainer.ChangeStyleAsync(new ChangeStyleRequest(textToModify, WritingStyle.Formal)); return res; } //How to register and call your own extension public async Task<string> GetMarkTwainText(string textToModify) { var localContainer = new AIExtensionsContainerLocal(defaultAIContainer); localContainer.Register<AuthoredStyleRequest, AuthoredStyleExtension>(); AuthoredStyleExtension extension = localContainer.CreateAuthoredStyleExtension(); var request = new AuthoredStyleRequest("Mark Twain", textToModify); //Here you can set up the Temperature variable that will be used to execute this request request.Options.Temperature = 0.9f; string result = await extension.ExecuteAsync(request, CancellationToken.None); return result; } } } #region How to modify the default extension public class WilliamShakespeareStyleExtension : ChangeStyleExtension { public WilliamShakespeareStyleExtension(IServiceProvider serviceProvider) : base(serviceProvider) { } protected override string GetSystemPrompt(ChangeStyleRequest request) { return "Rewrite this text in the William Shakespeare style."; } } #endregion #region implement your own extension public class AuthoredStyleExtension : ChangeTextExtension<AuthoredStyleRequest> { public AuthoredStyleExtension(IServiceProvider serviceProvider) : base(serviceProvider) { } protected override string GetSystemPrompt(AuthoredStyleRequest request) { return $"Rewrite this text in the {request.Author} style"; } } // Custom text processing request public class AuthoredStyleRequest : TextRequest { public AuthoredStyleRequest(string Author, string Text) : base(Text) { this.Author = Author; } public string Author { get; init; } } // This is a class that contains some useful extension methods public static class CustomAIIntegration { public static AuthoredStyleExtension CreateAuthoredStyleExtension(this IAIExtensionsContainer container) { return (AuthoredStyleExtension)container.GetExtension(typeof(AuthoredStyleRequest)); } } #endregion #region how to localize prompts public class CustomAILocalizer : AIIntegrationLocalizer { public override string GetLocalizedString(AIIntegrationStringId id) { switch (id) { case AIIntegrationStringId.TranslateSystemPrompt: return GetTranslateLocalizedPrompt(CultureInfo.CurrentUICulture.Name); // Add cases for other prompts as needed default: return base.GetLocalizedString(id); } } private string GetTranslateLocalizedPrompt(string cultureName) { // Implement logic to return the localized prompt based on the user's culture if (cultureName.StartsWith("es")) { return "Traducir este texto a {0} idioma."; } else { return "Translate this text to {0} language."; } } } #endregion }
winforms-ai-extensions/Program.cs(vb)
C#
using Azure.AI.OpenAI; using DevExpress.AIIntegration; using Microsoft.Extensions.AI; namespace WinForms_AI_Extensions { internal static class Program { //Modify the following lines to obtain and pass your personal Azure OpenAI credentails to the Register* method. static string AzureOpenAIEndpoint { get { return Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT"); } } static string AzureOpenAIKey { get { return Environment.GetEnvironmentVariable("AZURE_OPENAI_APIKEY"); } } static string DeploymentName { get { return Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENTNAME"); } } /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { // To customize application configuration such as set high DPI settings or default font, // see https://aka.ms/applicationconfiguration. ApplicationConfiguration.Initialize(); RegisterDevExpressAI(); //Application.Run(new MemoEditForm()); Application.Run(new RichEditForm()); } private static void RegisterDevExpressAI() { ///To register Ollama //OllamaChatClient ollamaChatClient = new OllamaChatClient("http://localhost:11434/", "llama3.1"); AzureOpenAIClient azureOpenAIClient = new AzureOpenAIClient(new Uri(AzureOpenAIEndpoint), new System.ClientModel.ApiKeyCredential(AzureOpenAIKey)); AIExtensionsContainerDesktop.Default.RegisterChatClient(azureOpenAIClient.AsChatClient(DeploymentName)); } } }
winforms-ai-extensions/RichEditForm.Designer.cs(vb)
C#
namespace WinForms_AI_Extensions { partial class RichEditForm { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { components = new System.ComponentModel.Container(); DevExpress.AIIntegration.Desktop.LanguageInfo languageInfo1 = new DevExpress.AIIntegration.Desktop.LanguageInfo(); DevExpress.AIIntegration.Desktop.LanguageInfo languageInfo2 = new DevExpress.AIIntegration.Desktop.LanguageInfo(); DevExpress.AIIntegration.Desktop.LanguageInfo languageInfo3 = new DevExpress.AIIntegration.Desktop.LanguageInfo(); DevExpress.XtraBars.Ribbon.GalleryItemGroup galleryItemGroup1 = new DevExpress.XtraBars.Ribbon.GalleryItemGroup(); DevExpress.XtraBars.Ribbon.ReduceOperation reduceOperation1 = new DevExpress.XtraBars.Ribbon.ReduceOperation(); richEditControl1 = new DevExpress.XtraRichEdit.RichEditControl(); ribbonControl1 = new DevExpress.XtraBars.Ribbon.RibbonControl(); undoItem1 = new DevExpress.XtraRichEdit.UI.UndoItem(); redoItem1 = new DevExpress.XtraRichEdit.UI.RedoItem(); fileNewItem1 = new DevExpress.XtraRichEdit.UI.FileNewItem(); fileOpenItem1 = new DevExpress.XtraRichEdit.UI.FileOpenItem(); fileSaveItem1 = new DevExpress.XtraRichEdit.UI.FileSaveItem(); fileSaveAsItem1 = new DevExpress.XtraRichEdit.UI.FileSaveAsItem(); quickPrintItem1 = new DevExpress.XtraRichEdit.UI.QuickPrintItem(); printItem1 = new DevExpress.XtraRichEdit.UI.PrintItem(); printPreviewItem1 = new DevExpress.XtraRichEdit.UI.PrintPreviewItem(); encryptDocumentItem1 = new DevExpress.XtraRichEdit.UI.EncryptDocumentItem(); showDocumentPropertiesFormItem1 = new DevExpress.XtraRichEdit.UI.ShowDocumentPropertiesFormItem(); pasteItem1 = new DevExpress.XtraRichEdit.UI.PasteItem(); cutItem1 = new DevExpress.XtraRichEdit.UI.CutItem(); copyItem1 = new DevExpress.XtraRichEdit.UI.CopyItem(); pasteSpecialItem1 = new DevExpress.XtraRichEdit.UI.PasteSpecialItem(); barButtonGroup1 = new DevExpress.XtraBars.BarButtonGroup(); changeFontNameItem1 = new DevExpress.XtraRichEdit.UI.ChangeFontNameItem(); repositoryItemFontEditRichEdit1 = new DevExpress.XtraRichEdit.UI.RepositoryItemFontEditRichEdit(); changeFontSizeItem1 = new DevExpress.XtraRichEdit.UI.ChangeFontSizeItem(); repositoryItemRichEditFontSizeEdit1 = new DevExpress.XtraRichEdit.Design.RepositoryItemRichEditFontSizeEdit(); fontSizeIncreaseItem1 = new DevExpress.XtraRichEdit.UI.FontSizeIncreaseItem(); fontSizeDecreaseItem1 = new DevExpress.XtraRichEdit.UI.FontSizeDecreaseItem(); barButtonGroup2 = new DevExpress.XtraBars.BarButtonGroup(); toggleFontBoldItem1 = new DevExpress.XtraRichEdit.UI.ToggleFontBoldItem(); toggleFontItalicItem1 = new DevExpress.XtraRichEdit.UI.ToggleFontItalicItem(); toggleFontUnderlineItem1 = new DevExpress.XtraRichEdit.UI.ToggleFontUnderlineItem(); toggleFontDoubleUnderlineItem1 = new DevExpress.XtraRichEdit.UI.ToggleFontDoubleUnderlineItem(); toggleFontStrikeoutItem1 = new DevExpress.XtraRichEdit.UI.ToggleFontStrikeoutItem(); toggleFontDoubleStrikeoutItem1 = new DevExpress.XtraRichEdit.UI.ToggleFontDoubleStrikeoutItem(); toggleFontSuperscriptItem1 = new DevExpress.XtraRichEdit.UI.ToggleFontSuperscriptItem(); toggleFontSubscriptItem1 = new DevExpress.XtraRichEdit.UI.ToggleFontSubscriptItem(); barButtonGroup3 = new DevExpress.XtraBars.BarButtonGroup(); changeFontColorItem1 = new DevExpress.XtraRichEdit.UI.ChangeFontColorItem(); changeFontHighlightColorItem1 = new DevExpress.XtraRichEdit.UI.ChangeFontHighlightColorItem(); changeTextCaseItem1 = new DevExpress.XtraRichEdit.UI.ChangeTextCaseItem(); makeTextUpperCaseItem1 = new DevExpress.XtraRichEdit.UI.MakeTextUpperCaseItem(); makeTextLowerCaseItem1 = new DevExpress.XtraRichEdit.UI.MakeTextLowerCaseItem(); capitalizeEachWordCaseItem1 = new DevExpress.XtraRichEdit.UI.CapitalizeEachWordCaseItem(); toggleTextCaseItem1 = new DevExpress.XtraRichEdit.UI.ToggleTextCaseItem(); clearFormattingItem1 = new DevExpress.XtraRichEdit.UI.ClearFormattingItem(); barButtonGroup4 = new DevExpress.XtraBars.BarButtonGroup(); toggleBulletedListItem1 = new DevExpress.XtraRichEdit.UI.ToggleBulletedListItem(); toggleNumberingListItem1 = new DevExpress.XtraRichEdit.UI.ToggleNumberingListItem(); toggleMultiLevelListItem1 = new DevExpress.XtraRichEdit.UI.ToggleMultiLevelListItem(); barButtonGroup5 = new DevExpress.XtraBars.BarButtonGroup(); decreaseIndentItem1 = new DevExpress.XtraRichEdit.UI.DecreaseIndentItem(); increaseIndentItem1 = new DevExpress.XtraRichEdit.UI.IncreaseIndentItem(); rtlToggleBulletedListItem1 = new DevExpress.XtraRichEdit.UI.RtlToggleBulletedListItem(); rtlToggleNumberingListItem1 = new DevExpress.XtraRichEdit.UI.RtlToggleNumberingListItem(); rtlToggleMultiLevelListItem1 = new DevExpress.XtraRichEdit.UI.RtlToggleMultiLevelListItem(); rtlDecreaseIndentItem1 = new DevExpress.XtraRichEdit.UI.RtlDecreaseIndentItem(); rtlIncreaseIndentItem1 = new DevExpress.XtraRichEdit.UI.RtlIncreaseIndentItem(); toggleParagraphLeftToRightItem1 = new DevExpress.XtraRichEdit.UI.ToggleParagraphLeftToRightItem(); toggleParagraphRightToLeftItem1 = new DevExpress.XtraRichEdit.UI.ToggleParagraphRightToLeftItem(); barButtonGroup6 = new DevExpress.XtraBars.BarButtonGroup(); toggleParagraphAlignmentLeftItem1 = new DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentLeftItem(); toggleParagraphAlignmentCenterItem1 = new DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentCenterItem(); toggleParagraphAlignmentRightItem1 = new DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentRightItem(); toggleParagraphAlignmentJustifyItem1 = new DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentJustifyItem(); toggleParagraphAlignmentArabicJustifyGroupItem1 = new DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentArabicJustifyGroupItem(); toggleParagraphAlignmentArabicJustifyItem1 = new DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentArabicJustifyItem(); toggleParagraphAlignmentJustifyLowItem1 = new DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentJustifyLowItem(); toggleParagraphAlignmentJustifyMediumItem1 = new DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentJustifyMediumItem(); toggleParagraphAlignmentJustifyHighItem1 = new DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentJustifyHighItem(); toggleParagraphAlignmentDistributeItem1 = new DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentDistributeItem(); toggleParagraphAlignmentThaiDistributeItem1 = new DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentThaiDistributeItem(); toggleShowWhitespaceItem1 = new DevExpress.XtraRichEdit.UI.ToggleShowWhitespaceItem(); barButtonGroup7 = new DevExpress.XtraBars.BarButtonGroup(); changeParagraphLineSpacingItem1 = new DevExpress.XtraRichEdit.UI.ChangeParagraphLineSpacingItem(); setSingleParagraphSpacingItem1 = new DevExpress.XtraRichEdit.UI.SetSingleParagraphSpacingItem(); setSesquialteralParagraphSpacingItem1 = new DevExpress.XtraRichEdit.UI.SetSesquialteralParagraphSpacingItem(); setDoubleParagraphSpacingItem1 = new DevExpress.XtraRichEdit.UI.SetDoubleParagraphSpacingItem(); showLineSpacingFormItem1 = new DevExpress.XtraRichEdit.UI.ShowLineSpacingFormItem(); addSpacingBeforeParagraphItem1 = new DevExpress.XtraRichEdit.UI.AddSpacingBeforeParagraphItem(); removeSpacingBeforeParagraphItem1 = new DevExpress.XtraRichEdit.UI.RemoveSpacingBeforeParagraphItem(); addSpacingAfterParagraphItem1 = new DevExpress.XtraRichEdit.UI.AddSpacingAfterParagraphItem(); removeSpacingAfterParagraphItem1 = new DevExpress.XtraRichEdit.UI.RemoveSpacingAfterParagraphItem(); changeParagraphBackColorItem1 = new DevExpress.XtraRichEdit.UI.ChangeParagraphBackColorItem(); galleryChangeStyleItem1 = new DevExpress.XtraRichEdit.UI.GalleryChangeStyleItem(); findItem1 = new DevExpress.XtraRichEdit.UI.FindItem(); replaceItem1 = new DevExpress.XtraRichEdit.UI.ReplaceItem(); insertPageBreakItem21 = new DevExpress.XtraRichEdit.UI.InsertPageBreakItem2(); insertTableItem1 = new DevExpress.XtraRichEdit.UI.InsertTableItem(); insertFloatingPictureItem1 = new DevExpress.XtraRichEdit.UI.InsertFloatingPictureItem(); insertBookmarkItem1 = new DevExpress.XtraRichEdit.UI.InsertBookmarkItem(); insertHyperlinkItem1 = new DevExpress.XtraRichEdit.UI.InsertHyperlinkItem(); editPageHeaderItem1 = new DevExpress.XtraRichEdit.UI.EditPageHeaderItem(); editPageFooterItem1 = new DevExpress.XtraRichEdit.UI.EditPageFooterItem(); insertPageNumberItem1 = new DevExpress.XtraRichEdit.UI.InsertPageNumberItem(); insertPageCountItem1 = new DevExpress.XtraRichEdit.UI.InsertPageCountItem(); insertTextBoxItem1 = new DevExpress.XtraRichEdit.UI.InsertTextBoxItem(); insertObjectItem1 = new DevExpress.XtraRichEdit.UI.InsertObjectItem(); insertSymbolItem1 = new DevExpress.XtraRichEdit.UI.InsertSymbolItem(); fileRibbonPage1 = new DevExpress.XtraRichEdit.UI.FileRibbonPage(); commonRibbonPageGroup1 = new DevExpress.XtraRichEdit.UI.CommonRibbonPageGroup(); infoRibbonPageGroup1 = new DevExpress.XtraRichEdit.UI.InfoRibbonPageGroup(); homeRibbonPage1 = new DevExpress.XtraRichEdit.UI.HomeRibbonPage(); clipboardRibbonPageGroup1 = new DevExpress.XtraRichEdit.UI.ClipboardRibbonPageGroup(); fontRibbonPageGroup1 = new DevExpress.XtraRichEdit.UI.FontRibbonPageGroup(); paragraphRibbonPageGroup1 = new DevExpress.XtraRichEdit.UI.ParagraphRibbonPageGroup(); stylesRibbonPageGroup1 = new DevExpress.XtraRichEdit.UI.StylesRibbonPageGroup(); editingRibbonPageGroup1 = new DevExpress.XtraRichEdit.UI.EditingRibbonPageGroup(); insertRibbonPage1 = new DevExpress.XtraRichEdit.UI.InsertRibbonPage(); pagesRibbonPageGroup1 = new DevExpress.XtraRichEdit.UI.PagesRibbonPageGroup(); tablesRibbonPageGroup1 = new DevExpress.XtraRichEdit.UI.TablesRibbonPageGroup(); illustrationsRibbonPageGroup1 = new DevExpress.XtraRichEdit.UI.IllustrationsRibbonPageGroup(); linksRibbonPageGroup1 = new DevExpress.XtraRichEdit.UI.LinksRibbonPageGroup(); headerFooterRibbonPageGroup1 = new DevExpress.XtraRichEdit.UI.HeaderFooterRibbonPageGroup(); textRibbonPageGroup1 = new DevExpress.XtraRichEdit.UI.TextRibbonPageGroup(); symbolsRibbonPageGroup1 = new DevExpress.XtraRichEdit.UI.SymbolsRibbonPageGroup(); richEditBarController1 = new DevExpress.XtraRichEdit.UI.RichEditBarController(components); behaviorManager1 = new DevExpress.Utils.Behaviors.BehaviorManager(components); ((System.ComponentModel.ISupportInitialize)ribbonControl1).BeginInit(); ((System.ComponentModel.ISupportInitialize)repositoryItemFontEditRichEdit1).BeginInit(); ((System.ComponentModel.ISupportInitialize)repositoryItemRichEditFontSizeEdit1).BeginInit(); ((System.ComponentModel.ISupportInitialize)richEditBarController1).BeginInit(); ((System.ComponentModel.ISupportInitialize)behaviorManager1).BeginInit(); SuspendLayout(); // // richEditControl1 // languageInfo1.Culture = new System.Globalization.CultureInfo("pt"); languageInfo2.Culture = new System.Globalization.CultureInfo("es"); languageInfo3.Culture = new System.Globalization.CultureInfo("de"); behaviorManager1.SetBehaviors(richEditControl1, new DevExpress.Utils.Behaviors.Behavior[] { DevExpress.AIIntegration.WinForms.ExpandBehavior.Create(typeof(DevExpress.AIIntegration.WinForms.RichEditExpandBehaviorSource)), DevExpress.AIIntegration.WinForms.ShortenBehavior.Create(typeof(DevExpress.AIIntegration.WinForms.RichEditShortenBehaviorSource)), DevExpress.AIIntegration.WinForms.SummarizeBehavior.Create(typeof(DevExpress.AIIntegration.WinForms.RichEditSummarizeBehaviorSource), DevExpress.AIIntegration.SummarizationMode.Abstractive), DevExpress.AIIntegration.WinForms.ExplainBehavior.Create(typeof(DevExpress.AIIntegration.WinForms.RichEditExplainBehaviorSource)), DevExpress.AIIntegration.WinForms.ChangeToneBehavior.Create(typeof(DevExpress.AIIntegration.WinForms.RichEditChangeToneBehaviorSource)), DevExpress.AIIntegration.WinForms.ProofreadBehavior.Create(typeof(DevExpress.AIIntegration.WinForms.RichEditProofreadBehaviorSource)), DevExpress.AIIntegration.WinForms.ChangeStyleBehavior.Create(typeof(DevExpress.AIIntegration.WinForms.RichEditChangeStyleBehaviorSource)), DevExpress.AIIntegration.WinForms.TranslateBehavior.Create(typeof(DevExpress.AIIntegration.WinForms.RichEditTranslateBehaviorSource), new DevExpress.AIIntegration.Desktop.LanguageInfo[] { languageInfo1, languageInfo2, languageInfo3 }), DevExpress.AIIntegration.WinForms.CustomRequestBehavior.Create(typeof(DevExpress.AIIntegration.WinForms.RichEditCustomRequestBehaviorSource)), DevExpress.AIIntegration.WinForms.GenerateImageDescriptionBehavior.Create(typeof(DevExpress.AIIntegration.WinForms.RichEditGenerateDescriptionBehaviorSource)) }); richEditControl1.Dock = DockStyle.Fill; richEditControl1.Location = new Point(0, 231); richEditControl1.Margin = new Padding(2, 2, 2, 2); richEditControl1.MenuManager = ribbonControl1; richEditControl1.Name = "richEditControl1"; richEditControl1.Options.DocumentSaveOptions.CurrentFormat = DevExpress.XtraRichEdit.DocumentFormat.PlainText; richEditControl1.Size = new Size(1421, 1004); richEditControl1.TabIndex = 0; richEditControl1.Text = "Text"; // // ribbonControl1 // ribbonControl1.EmptyAreaImageOptions.ImagePadding = new Padding(22, 23, 22, 23); ribbonControl1.ExpandCollapseItem.Id = 0; ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, undoItem1, redoItem1, fileNewItem1, fileOpenItem1, fileSaveItem1, fileSaveAsItem1, quickPrintItem1, printItem1, printPreviewItem1, encryptDocumentItem1, showDocumentPropertiesFormItem1, pasteItem1, cutItem1, copyItem1, pasteSpecialItem1, barButtonGroup1, changeFontNameItem1, changeFontSizeItem1, fontSizeIncreaseItem1, fontSizeDecreaseItem1, barButtonGroup2, toggleFontBoldItem1, toggleFontItalicItem1, toggleFontUnderlineItem1, toggleFontDoubleUnderlineItem1, toggleFontStrikeoutItem1, toggleFontDoubleStrikeoutItem1, toggleFontSuperscriptItem1, toggleFontSubscriptItem1, barButtonGroup3, changeFontColorItem1, changeFontHighlightColorItem1, changeTextCaseItem1, makeTextUpperCaseItem1, makeTextLowerCaseItem1, capitalizeEachWordCaseItem1, toggleTextCaseItem1, clearFormattingItem1, barButtonGroup4, toggleBulletedListItem1, toggleNumberingListItem1, toggleMultiLevelListItem1, barButtonGroup5, decreaseIndentItem1, increaseIndentItem1, rtlToggleBulletedListItem1, rtlToggleNumberingListItem1, rtlToggleMultiLevelListItem1, rtlDecreaseIndentItem1, rtlIncreaseIndentItem1, toggleParagraphLeftToRightItem1, toggleParagraphRightToLeftItem1, barButtonGroup6, toggleParagraphAlignmentLeftItem1, toggleParagraphAlignmentCenterItem1, toggleParagraphAlignmentRightItem1, toggleParagraphAlignmentJustifyItem1, toggleParagraphAlignmentArabicJustifyGroupItem1, toggleParagraphAlignmentArabicJustifyItem1, toggleParagraphAlignmentJustifyLowItem1, toggleParagraphAlignmentJustifyMediumItem1, toggleParagraphAlignmentJustifyHighItem1, toggleParagraphAlignmentDistributeItem1, toggleParagraphAlignmentThaiDistributeItem1, toggleShowWhitespaceItem1, barButtonGroup7, changeParagraphLineSpacingItem1, setSingleParagraphSpacingItem1, setSesquialteralParagraphSpacingItem1, setDoubleParagraphSpacingItem1, showLineSpacingFormItem1, addSpacingBeforeParagraphItem1, removeSpacingBeforeParagraphItem1, addSpacingAfterParagraphItem1, removeSpacingAfterParagraphItem1, changeParagraphBackColorItem1, galleryChangeStyleItem1, findItem1, replaceItem1, insertPageBreakItem21, insertTableItem1, insertFloatingPictureItem1, insertBookmarkItem1, insertHyperlinkItem1, editPageHeaderItem1, editPageFooterItem1, insertPageNumberItem1, insertPageCountItem1, insertTextBoxItem1, insertObjectItem1, insertSymbolItem1 }); ribbonControl1.Location = new Point(0, 0); ribbonControl1.Margin = new Padding(2, 2, 2, 2); ribbonControl1.MaxItemId = 92; ribbonControl1.Name = "ribbonControl1"; ribbonControl1.OptionsMenuMinWidth = 247; ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { fileRibbonPage1, homeRibbonPage1, insertRibbonPage1 }); ribbonControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { repositoryItemFontEditRichEdit1, repositoryItemRichEditFontSizeEdit1 }); ribbonControl1.Size = new Size(1421, 231); // // undoItem1 // undoItem1.Id = 1; undoItem1.Name = "undoItem1"; // // redoItem1 // redoItem1.Id = 2; redoItem1.Name = "redoItem1"; // // fileNewItem1 // fileNewItem1.Id = 3; fileNewItem1.Name = "fileNewItem1"; // // fileOpenItem1 // fileOpenItem1.Id = 4; fileOpenItem1.Name = "fileOpenItem1"; // // fileSaveItem1 // fileSaveItem1.Id = 5; fileSaveItem1.Name = "fileSaveItem1"; // // fileSaveAsItem1 // fileSaveAsItem1.Id = 6; fileSaveAsItem1.Name = "fileSaveAsItem1"; // // quickPrintItem1 // quickPrintItem1.Id = 7; quickPrintItem1.Name = "quickPrintItem1"; // // printItem1 // printItem1.Id = 8; printItem1.Name = "printItem1"; // // printPreviewItem1 // printPreviewItem1.Id = 9; printPreviewItem1.Name = "printPreviewItem1"; // // encryptDocumentItem1 // encryptDocumentItem1.Id = 10; encryptDocumentItem1.Name = "encryptDocumentItem1"; // // showDocumentPropertiesFormItem1 // showDocumentPropertiesFormItem1.Id = 11; showDocumentPropertiesFormItem1.Name = "showDocumentPropertiesFormItem1"; // // pasteItem1 // pasteItem1.Id = 19; pasteItem1.Name = "pasteItem1"; // // cutItem1 // cutItem1.Id = 20; cutItem1.Name = "cutItem1"; // // copyItem1 // copyItem1.Id = 21; copyItem1.Name = "copyItem1"; // // pasteSpecialItem1 // pasteSpecialItem1.Id = 22; pasteSpecialItem1.Name = "pasteSpecialItem1"; // // barButtonGroup1 // barButtonGroup1.Id = 12; barButtonGroup1.Name = "barButtonGroup1"; barButtonGroup1.Tag = "{97BBE334-159B-44d9-A168-0411957565E8}"; // // changeFontNameItem1 // changeFontNameItem1.Edit = repositoryItemFontEditRichEdit1; changeFontNameItem1.Id = 23; changeFontNameItem1.Name = "changeFontNameItem1"; // // repositoryItemFontEditRichEdit1 // repositoryItemFontEditRichEdit1.AutoHeight = false; repositoryItemFontEditRichEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); repositoryItemFontEditRichEdit1.Name = "repositoryItemFontEditRichEdit1"; // // changeFontSizeItem1 // changeFontSizeItem1.Edit = repositoryItemRichEditFontSizeEdit1; changeFontSizeItem1.Id = 24; changeFontSizeItem1.Name = "changeFontSizeItem1"; // // repositoryItemRichEditFontSizeEdit1 // repositoryItemRichEditFontSizeEdit1.AutoHeight = false; repositoryItemRichEditFontSizeEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); repositoryItemRichEditFontSizeEdit1.Control = richEditControl1; repositoryItemRichEditFontSizeEdit1.Name = "repositoryItemRichEditFontSizeEdit1"; // // fontSizeIncreaseItem1 // fontSizeIncreaseItem1.Id = 25; fontSizeIncreaseItem1.Name = "fontSizeIncreaseItem1"; // // fontSizeDecreaseItem1 // fontSizeDecreaseItem1.Id = 26; fontSizeDecreaseItem1.Name = "fontSizeDecreaseItem1"; // // barButtonGroup2 // barButtonGroup2.Id = 13; barButtonGroup2.Name = "barButtonGroup2"; barButtonGroup2.Tag = "{433DA7F0-03E2-4650-9DB5-66DD92D16E39}"; // // toggleFontBoldItem1 // toggleFontBoldItem1.Id = 27; toggleFontBoldItem1.Name = "toggleFontBoldItem1"; // // toggleFontItalicItem1 // toggleFontItalicItem1.Id = 28; toggleFontItalicItem1.Name = "toggleFontItalicItem1"; // // toggleFontUnderlineItem1 // toggleFontUnderlineItem1.Id = 29; toggleFontUnderlineItem1.Name = "toggleFontUnderlineItem1"; // // toggleFontDoubleUnderlineItem1 // toggleFontDoubleUnderlineItem1.Id = 30; toggleFontDoubleUnderlineItem1.Name = "toggleFontDoubleUnderlineItem1"; // // toggleFontStrikeoutItem1 // toggleFontStrikeoutItem1.Id = 31; toggleFontStrikeoutItem1.Name = "toggleFontStrikeoutItem1"; // // toggleFontDoubleStrikeoutItem1 // toggleFontDoubleStrikeoutItem1.Id = 32; toggleFontDoubleStrikeoutItem1.Name = "toggleFontDoubleStrikeoutItem1"; // // toggleFontSuperscriptItem1 // toggleFontSuperscriptItem1.Id = 33; toggleFontSuperscriptItem1.Name = "toggleFontSuperscriptItem1"; // // toggleFontSubscriptItem1 // toggleFontSubscriptItem1.Id = 34; toggleFontSubscriptItem1.Name = "toggleFontSubscriptItem1"; // // barButtonGroup3 // barButtonGroup3.Id = 14; barButtonGroup3.Name = "barButtonGroup3"; barButtonGroup3.Tag = "{DF8C5334-EDE3-47c9-A42C-FE9A9247E180}"; // // changeFontColorItem1 // changeFontColorItem1.Id = 35; changeFontColorItem1.Name = "changeFontColorItem1"; // // changeFontHighlightColorItem1 // changeFontHighlightColorItem1.Id = 36; changeFontHighlightColorItem1.Name = "changeFontHighlightColorItem1"; // // changeTextCaseItem1 // changeTextCaseItem1.Id = 37; changeTextCaseItem1.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { new DevExpress.XtraBars.LinkPersistInfo(makeTextUpperCaseItem1), new DevExpress.XtraBars.LinkPersistInfo(makeTextLowerCaseItem1), new DevExpress.XtraBars.LinkPersistInfo(capitalizeEachWordCaseItem1), new DevExpress.XtraBars.LinkPersistInfo(toggleTextCaseItem1) }); changeTextCaseItem1.Name = "changeTextCaseItem1"; // // makeTextUpperCaseItem1 // makeTextUpperCaseItem1.Id = 38; makeTextUpperCaseItem1.Name = "makeTextUpperCaseItem1"; // // makeTextLowerCaseItem1 // makeTextLowerCaseItem1.Id = 39; makeTextLowerCaseItem1.Name = "makeTextLowerCaseItem1"; // // capitalizeEachWordCaseItem1 // capitalizeEachWordCaseItem1.Id = 40; capitalizeEachWordCaseItem1.Name = "capitalizeEachWordCaseItem1"; // // toggleTextCaseItem1 // toggleTextCaseItem1.Id = 41; toggleTextCaseItem1.Name = "toggleTextCaseItem1"; // // clearFormattingItem1 // clearFormattingItem1.Id = 42; clearFormattingItem1.Name = "clearFormattingItem1"; // // barButtonGroup4 // barButtonGroup4.Id = 15; barButtonGroup4.Name = "barButtonGroup4"; barButtonGroup4.Tag = "{0B3A7A43-3079-4ce0-83A8-3789F5F6DC9F}"; // // toggleBulletedListItem1 // toggleBulletedListItem1.Id = 43; toggleBulletedListItem1.Name = "toggleBulletedListItem1"; // // toggleNumberingListItem1 // toggleNumberingListItem1.Id = 44; toggleNumberingListItem1.Name = "toggleNumberingListItem1"; // // toggleMultiLevelListItem1 // toggleMultiLevelListItem1.Id = 45; toggleMultiLevelListItem1.Name = "toggleMultiLevelListItem1"; // // barButtonGroup5 // barButtonGroup5.Id = 16; barButtonGroup5.Name = "barButtonGroup5"; barButtonGroup5.Tag = "{4747D5AB-2BEB-4ea6-9A1D-8E4FB36F1B40}"; // // decreaseIndentItem1 // decreaseIndentItem1.Id = 46; decreaseIndentItem1.Name = "decreaseIndentItem1"; // // increaseIndentItem1 // increaseIndentItem1.Id = 47; increaseIndentItem1.Name = "increaseIndentItem1"; // // rtlToggleBulletedListItem1 // rtlToggleBulletedListItem1.Id = 48; rtlToggleBulletedListItem1.Name = "rtlToggleBulletedListItem1"; // // rtlToggleNumberingListItem1 // rtlToggleNumberingListItem1.Id = 49; rtlToggleNumberingListItem1.Name = "rtlToggleNumberingListItem1"; // // rtlToggleMultiLevelListItem1 // rtlToggleMultiLevelListItem1.Id = 50; rtlToggleMultiLevelListItem1.Name = "rtlToggleMultiLevelListItem1"; // // rtlDecreaseIndentItem1 // rtlDecreaseIndentItem1.Id = 51; rtlDecreaseIndentItem1.Name = "rtlDecreaseIndentItem1"; // // rtlIncreaseIndentItem1 // rtlIncreaseIndentItem1.Id = 52; rtlIncreaseIndentItem1.Name = "rtlIncreaseIndentItem1"; // // toggleParagraphLeftToRightItem1 // toggleParagraphLeftToRightItem1.Id = 53; toggleParagraphLeftToRightItem1.Name = "toggleParagraphLeftToRightItem1"; // // toggleParagraphRightToLeftItem1 // toggleParagraphRightToLeftItem1.Id = 54; toggleParagraphRightToLeftItem1.Name = "toggleParagraphRightToLeftItem1"; // // barButtonGroup6 // barButtonGroup6.Id = 17; barButtonGroup6.Name = "barButtonGroup6"; barButtonGroup6.Tag = "{8E89E775-996E-49a0-AADA-DE338E34732E}"; // // toggleParagraphAlignmentLeftItem1 // toggleParagraphAlignmentLeftItem1.Id = 55; toggleParagraphAlignmentLeftItem1.Name = "toggleParagraphAlignmentLeftItem1"; // // toggleParagraphAlignmentCenterItem1 // toggleParagraphAlignmentCenterItem1.Id = 56; toggleParagraphAlignmentCenterItem1.Name = "toggleParagraphAlignmentCenterItem1"; // // toggleParagraphAlignmentRightItem1 // toggleParagraphAlignmentRightItem1.Id = 57; toggleParagraphAlignmentRightItem1.Name = "toggleParagraphAlignmentRightItem1"; // // toggleParagraphAlignmentJustifyItem1 // toggleParagraphAlignmentJustifyItem1.Id = 58; toggleParagraphAlignmentJustifyItem1.Name = "toggleParagraphAlignmentJustifyItem1"; // // toggleParagraphAlignmentArabicJustifyGroupItem1 // toggleParagraphAlignmentArabicJustifyGroupItem1.Id = 59; toggleParagraphAlignmentArabicJustifyGroupItem1.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { new DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.KeyTip, toggleParagraphAlignmentArabicJustifyItem1, "", false, true, true, 0, null, DevExpress.XtraBars.BarItemPaintStyle.Standard, "AJ", ""), new DevExpress.XtraBars.LinkPersistInfo(toggleParagraphAlignmentJustifyLowItem1), new DevExpress.XtraBars.LinkPersistInfo(toggleParagraphAlignmentJustifyMediumItem1), new DevExpress.XtraBars.LinkPersistInfo(toggleParagraphAlignmentJustifyHighItem1) }); toggleParagraphAlignmentArabicJustifyGroupItem1.Name = "toggleParagraphAlignmentArabicJustifyGroupItem1"; // // toggleParagraphAlignmentArabicJustifyItem1 // toggleParagraphAlignmentArabicJustifyItem1.Id = 60; toggleParagraphAlignmentArabicJustifyItem1.Name = "toggleParagraphAlignmentArabicJustifyItem1"; // // toggleParagraphAlignmentJustifyLowItem1 // toggleParagraphAlignmentJustifyLowItem1.Id = 61; toggleParagraphAlignmentJustifyLowItem1.Name = "toggleParagraphAlignmentJustifyLowItem1"; // // toggleParagraphAlignmentJustifyMediumItem1 // toggleParagraphAlignmentJustifyMediumItem1.Id = 62; toggleParagraphAlignmentJustifyMediumItem1.Name = "toggleParagraphAlignmentJustifyMediumItem1"; // // toggleParagraphAlignmentJustifyHighItem1 // toggleParagraphAlignmentJustifyHighItem1.Id = 63; toggleParagraphAlignmentJustifyHighItem1.Name = "toggleParagraphAlignmentJustifyHighItem1"; // // toggleParagraphAlignmentDistributeItem1 // toggleParagraphAlignmentDistributeItem1.Id = 64; toggleParagraphAlignmentDistributeItem1.Name = "toggleParagraphAlignmentDistributeItem1"; // // toggleParagraphAlignmentThaiDistributeItem1 // toggleParagraphAlignmentThaiDistributeItem1.Id = 65; toggleParagraphAlignmentThaiDistributeItem1.Name = "toggleParagraphAlignmentThaiDistributeItem1"; // // toggleShowWhitespaceItem1 // toggleShowWhitespaceItem1.Id = 66; toggleShowWhitespaceItem1.Name = "toggleShowWhitespaceItem1"; // // barButtonGroup7 // barButtonGroup7.Id = 18; barButtonGroup7.Name = "barButtonGroup7"; barButtonGroup7.Tag = "{9A8DEAD8-3890-4857-A395-EC625FD02217}"; // // changeParagraphLineSpacingItem1 // changeParagraphLineSpacingItem1.Id = 67; changeParagraphLineSpacingItem1.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { new DevExpress.XtraBars.LinkPersistInfo(setSingleParagraphSpacingItem1), new DevExpress.XtraBars.LinkPersistInfo(setSesquialteralParagraphSpacingItem1), new DevExpress.XtraBars.LinkPersistInfo(setDoubleParagraphSpacingItem1), new DevExpress.XtraBars.LinkPersistInfo(showLineSpacingFormItem1), new DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.KeyTip, addSpacingBeforeParagraphItem1, "", false, true, true, 0, null, DevExpress.XtraBars.BarItemPaintStyle.Standard, "B", ""), new DevExpress.XtraBars.LinkPersistInfo(removeSpacingBeforeParagraphItem1), new DevExpress.XtraBars.LinkPersistInfo(addSpacingAfterParagraphItem1), new DevExpress.XtraBars.LinkPersistInfo(removeSpacingAfterParagraphItem1) }); changeParagraphLineSpacingItem1.Name = "changeParagraphLineSpacingItem1"; // // setSingleParagraphSpacingItem1 // setSingleParagraphSpacingItem1.Id = 68; setSingleParagraphSpacingItem1.Name = "setSingleParagraphSpacingItem1"; // // setSesquialteralParagraphSpacingItem1 // setSesquialteralParagraphSpacingItem1.Id = 69; setSesquialteralParagraphSpacingItem1.Name = "setSesquialteralParagraphSpacingItem1"; // // setDoubleParagraphSpacingItem1 // setDoubleParagraphSpacingItem1.Id = 70; setDoubleParagraphSpacingItem1.Name = "setDoubleParagraphSpacingItem1"; // // showLineSpacingFormItem1 // showLineSpacingFormItem1.Id = 71; showLineSpacingFormItem1.Name = "showLineSpacingFormItem1"; // // addSpacingBeforeParagraphItem1 // addSpacingBeforeParagraphItem1.Id = 72; addSpacingBeforeParagraphItem1.Name = "addSpacingBeforeParagraphItem1"; // // removeSpacingBeforeParagraphItem1 // removeSpacingBeforeParagraphItem1.Id = 73; removeSpacingBeforeParagraphItem1.Name = "removeSpacingBeforeParagraphItem1"; // // addSpacingAfterParagraphItem1 // addSpacingAfterParagraphItem1.Id = 74; addSpacingAfterParagraphItem1.Name = "addSpacingAfterParagraphItem1"; // // removeSpacingAfterParagraphItem1 // removeSpacingAfterParagraphItem1.Id = 75; removeSpacingAfterParagraphItem1.Name = "removeSpacingAfterParagraphItem1"; // // changeParagraphBackColorItem1 // changeParagraphBackColorItem1.Id = 76; changeParagraphBackColorItem1.Name = "changeParagraphBackColorItem1"; // // galleryChangeStyleItem1 // // // // galleryChangeStyleItem1.Gallery.ColumnCount = 10; galleryChangeStyleItem1.Gallery.Groups.AddRange(new DevExpress.XtraBars.Ribbon.GalleryItemGroup[] { galleryItemGroup1 }); galleryChangeStyleItem1.Gallery.ImageSize = new Size(97, 70); galleryChangeStyleItem1.Id = 77; galleryChangeStyleItem1.Name = "galleryChangeStyleItem1"; // // findItem1 // findItem1.Id = 78; findItem1.Name = "findItem1"; // // replaceItem1 // replaceItem1.Id = 79; replaceItem1.Name = "replaceItem1"; // // insertPageBreakItem21 // insertPageBreakItem21.Id = 80; insertPageBreakItem21.Name = "insertPageBreakItem21"; // // insertTableItem1 // insertTableItem1.Id = 81; insertTableItem1.Name = "insertTableItem1"; // // insertFloatingPictureItem1 // insertFloatingPictureItem1.Id = 82; insertFloatingPictureItem1.Name = "insertFloatingPictureItem1"; // // insertBookmarkItem1 // insertBookmarkItem1.Id = 83; insertBookmarkItem1.Name = "insertBookmarkItem1"; // // insertHyperlinkItem1 // insertHyperlinkItem1.Id = 84; insertHyperlinkItem1.Name = "insertHyperlinkItem1"; // // editPageHeaderItem1 // editPageHeaderItem1.Id = 85; editPageHeaderItem1.Name = "editPageHeaderItem1"; // // editPageFooterItem1 // editPageFooterItem1.Id = 86; editPageFooterItem1.Name = "editPageFooterItem1"; // // insertPageNumberItem1 // insertPageNumberItem1.Id = 87; insertPageNumberItem1.Name = "insertPageNumberItem1"; // // insertPageCountItem1 // insertPageCountItem1.Id = 88; insertPageCountItem1.Name = "insertPageCountItem1"; // // insertTextBoxItem1 // insertTextBoxItem1.Id = 89; insertTextBoxItem1.Name = "insertTextBoxItem1"; // // insertObjectItem1 // insertObjectItem1.Id = 90; insertObjectItem1.Name = "insertObjectItem1"; // // insertSymbolItem1 // insertSymbolItem1.Id = 91; insertSymbolItem1.Name = "insertSymbolItem1"; // // fileRibbonPage1 // fileRibbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { commonRibbonPageGroup1, infoRibbonPageGroup1 }); fileRibbonPage1.Name = "fileRibbonPage1"; // // commonRibbonPageGroup1 // commonRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False; commonRibbonPageGroup1.Name = "commonRibbonPageGroup1"; commonRibbonPageGroup1.Text = ""; // // infoRibbonPageGroup1 // infoRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False; infoRibbonPageGroup1.Name = "infoRibbonPageGroup1"; infoRibbonPageGroup1.Text = ""; // // homeRibbonPage1 // homeRibbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { clipboardRibbonPageGroup1, fontRibbonPageGroup1, paragraphRibbonPageGroup1, stylesRibbonPageGroup1, editingRibbonPageGroup1 }); homeRibbonPage1.Name = "homeRibbonPage1"; reduceOperation1.Behavior = DevExpress.XtraBars.Ribbon.ReduceOperationBehavior.UntilAvailable; reduceOperation1.GroupName = null; reduceOperation1.ItemLinkIndex = 0; reduceOperation1.ItemLinksCount = 0; reduceOperation1.Operation = DevExpress.XtraBars.Ribbon.ReduceOperationType.Gallery; homeRibbonPage1.ReduceOperations.Add(reduceOperation1); // // clipboardRibbonPageGroup1 // clipboardRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False; clipboardRibbonPageGroup1.Name = "clipboardRibbonPageGroup1"; clipboardRibbonPageGroup1.Text = ""; // // fontRibbonPageGroup1 // fontRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.True; fontRibbonPageGroup1.Name = "fontRibbonPageGroup1"; fontRibbonPageGroup1.Text = ""; // // paragraphRibbonPageGroup1 // paragraphRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.True; paragraphRibbonPageGroup1.Name = "paragraphRibbonPageGroup1"; paragraphRibbonPageGroup1.Text = ""; // // stylesRibbonPageGroup1 // stylesRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.True; stylesRibbonPageGroup1.Name = "stylesRibbonPageGroup1"; stylesRibbonPageGroup1.Text = ""; // // editingRibbonPageGroup1 // editingRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False; editingRibbonPageGroup1.Name = "editingRibbonPageGroup1"; editingRibbonPageGroup1.Text = ""; // // insertRibbonPage1 // insertRibbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { pagesRibbonPageGroup1, tablesRibbonPageGroup1, illustrationsRibbonPageGroup1, linksRibbonPageGroup1, headerFooterRibbonPageGroup1, textRibbonPageGroup1, symbolsRibbonPageGroup1 }); insertRibbonPage1.Name = "insertRibbonPage1"; // // pagesRibbonPageGroup1 // pagesRibbonPageGroup1.AllowTextClipping = false; pagesRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False; pagesRibbonPageGroup1.Name = "pagesRibbonPageGroup1"; pagesRibbonPageGroup1.Text = ""; // // tablesRibbonPageGroup1 // tablesRibbonPageGroup1.AllowTextClipping = false; tablesRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False; tablesRibbonPageGroup1.Name = "tablesRibbonPageGroup1"; tablesRibbonPageGroup1.Text = ""; // // illustrationsRibbonPageGroup1 // illustrationsRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False; illustrationsRibbonPageGroup1.Name = "illustrationsRibbonPageGroup1"; illustrationsRibbonPageGroup1.Text = ""; // // linksRibbonPageGroup1 // linksRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False; linksRibbonPageGroup1.Name = "linksRibbonPageGroup1"; linksRibbonPageGroup1.Text = ""; // // headerFooterRibbonPageGroup1 // headerFooterRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False; headerFooterRibbonPageGroup1.Name = "headerFooterRibbonPageGroup1"; headerFooterRibbonPageGroup1.Text = ""; // // textRibbonPageGroup1 // textRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False; textRibbonPageGroup1.Name = "textRibbonPageGroup1"; textRibbonPageGroup1.Text = ""; // // symbolsRibbonPageGroup1 // symbolsRibbonPageGroup1.AllowTextClipping = false; symbolsRibbonPageGroup1.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False; symbolsRibbonPageGroup1.Name = "symbolsRibbonPageGroup1"; symbolsRibbonPageGroup1.Text = ""; // // richEditBarController1 // richEditBarController1.BarItems.Add(undoItem1); richEditBarController1.BarItems.Add(redoItem1); richEditBarController1.BarItems.Add(fileNewItem1); richEditBarController1.BarItems.Add(fileOpenItem1); richEditBarController1.BarItems.Add(fileSaveItem1); richEditBarController1.BarItems.Add(fileSaveAsItem1); richEditBarController1.BarItems.Add(quickPrintItem1); richEditBarController1.BarItems.Add(printItem1); richEditBarController1.BarItems.Add(printPreviewItem1); richEditBarController1.BarItems.Add(encryptDocumentItem1); richEditBarController1.BarItems.Add(showDocumentPropertiesFormItem1); richEditBarController1.BarItems.Add(pasteItem1); richEditBarController1.BarItems.Add(cutItem1); richEditBarController1.BarItems.Add(copyItem1); richEditBarController1.BarItems.Add(pasteSpecialItem1); richEditBarController1.BarItems.Add(changeFontNameItem1); richEditBarController1.BarItems.Add(changeFontSizeItem1); richEditBarController1.BarItems.Add(fontSizeIncreaseItem1); richEditBarController1.BarItems.Add(fontSizeDecreaseItem1); richEditBarController1.BarItems.Add(toggleFontBoldItem1); richEditBarController1.BarItems.Add(toggleFontItalicItem1); richEditBarController1.BarItems.Add(toggleFontUnderlineItem1); richEditBarController1.BarItems.Add(toggleFontDoubleUnderlineItem1); richEditBarController1.BarItems.Add(toggleFontStrikeoutItem1); richEditBarController1.BarItems.Add(toggleFontDoubleStrikeoutItem1); richEditBarController1.BarItems.Add(toggleFontSuperscriptItem1); richEditBarController1.BarItems.Add(toggleFontSubscriptItem1); richEditBarController1.BarItems.Add(changeFontColorItem1); richEditBarController1.BarItems.Add(changeFontHighlightColorItem1); richEditBarController1.BarItems.Add(makeTextUpperCaseItem1); richEditBarController1.BarItems.Add(makeTextLowerCaseItem1); richEditBarController1.BarItems.Add(capitalizeEachWordCaseItem1); richEditBarController1.BarItems.Add(toggleTextCaseItem1); richEditBarController1.BarItems.Add(changeTextCaseItem1); richEditBarController1.BarItems.Add(clearFormattingItem1); richEditBarController1.BarItems.Add(toggleBulletedListItem1); richEditBarController1.BarItems.Add(toggleNumberingListItem1); richEditBarController1.BarItems.Add(toggleMultiLevelListItem1); richEditBarController1.BarItems.Add(decreaseIndentItem1); richEditBarController1.BarItems.Add(increaseIndentItem1); richEditBarController1.BarItems.Add(rtlToggleBulletedListItem1); richEditBarController1.BarItems.Add(rtlToggleNumberingListItem1); richEditBarController1.BarItems.Add(rtlToggleMultiLevelListItem1); richEditBarController1.BarItems.Add(rtlDecreaseIndentItem1); richEditBarController1.BarItems.Add(rtlIncreaseIndentItem1); richEditBarController1.BarItems.Add(toggleParagraphLeftToRightItem1); richEditBarController1.BarItems.Add(toggleParagraphRightToLeftItem1); richEditBarController1.BarItems.Add(toggleParagraphAlignmentLeftItem1); richEditBarController1.BarItems.Add(toggleParagraphAlignmentCenterItem1); richEditBarController1.BarItems.Add(toggleParagraphAlignmentRightItem1); richEditBarController1.BarItems.Add(toggleParagraphAlignmentJustifyItem1); richEditBarController1.BarItems.Add(toggleParagraphAlignmentArabicJustifyItem1); richEditBarController1.BarItems.Add(toggleParagraphAlignmentJustifyLowItem1); richEditBarController1.BarItems.Add(toggleParagraphAlignmentJustifyMediumItem1); richEditBarController1.BarItems.Add(toggleParagraphAlignmentJustifyHighItem1); richEditBarController1.BarItems.Add(toggleParagraphAlignmentArabicJustifyGroupItem1); richEditBarController1.BarItems.Add(toggleParagraphAlignmentDistributeItem1); richEditBarController1.BarItems.Add(toggleParagraphAlignmentThaiDistributeItem1); richEditBarController1.BarItems.Add(toggleShowWhitespaceItem1); richEditBarController1.BarItems.Add(setSingleParagraphSpacingItem1); richEditBarController1.BarItems.Add(setSesquialteralParagraphSpacingItem1); richEditBarController1.BarItems.Add(setDoubleParagraphSpacingItem1); richEditBarController1.BarItems.Add(showLineSpacingFormItem1); richEditBarController1.BarItems.Add(addSpacingBeforeParagraphItem1); richEditBarController1.BarItems.Add(removeSpacingBeforeParagraphItem1); richEditBarController1.BarItems.Add(addSpacingAfterParagraphItem1); richEditBarController1.BarItems.Add(removeSpacingAfterParagraphItem1); richEditBarController1.BarItems.Add(changeParagraphLineSpacingItem1); richEditBarController1.BarItems.Add(changeParagraphBackColorItem1); richEditBarController1.BarItems.Add(galleryChangeStyleItem1); richEditBarController1.BarItems.Add(findItem1); richEditBarController1.BarItems.Add(replaceItem1); richEditBarController1.BarItems.Add(insertPageBreakItem21); richEditBarController1.BarItems.Add(insertTableItem1); richEditBarController1.BarItems.Add(insertFloatingPictureItem1); richEditBarController1.BarItems.Add(insertBookmarkItem1); richEditBarController1.BarItems.Add(insertHyperlinkItem1); richEditBarController1.BarItems.Add(editPageHeaderItem1); richEditBarController1.BarItems.Add(editPageFooterItem1); richEditBarController1.BarItems.Add(insertPageNumberItem1); richEditBarController1.BarItems.Add(insertPageCountItem1); richEditBarController1.BarItems.Add(insertTextBoxItem1); richEditBarController1.BarItems.Add(insertObjectItem1); richEditBarController1.BarItems.Add(insertSymbolItem1); richEditBarController1.Control = richEditControl1; // // RichEditForm // AutoScaleDimensions = new SizeF(9F, 19F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(1421, 1235); Controls.Add(richEditControl1); Controls.Add(ribbonControl1); Margin = new Padding(2, 2, 2, 2); Name = "RichEditForm"; Ribbon = ribbonControl1; Text = "RichEditForm"; ((System.ComponentModel.ISupportInitialize)ribbonControl1).EndInit(); ((System.ComponentModel.ISupportInitialize)repositoryItemFontEditRichEdit1).EndInit(); ((System.ComponentModel.ISupportInitialize)repositoryItemRichEditFontSizeEdit1).EndInit(); ((System.ComponentModel.ISupportInitialize)richEditBarController1).EndInit(); ((System.ComponentModel.ISupportInitialize)behaviorManager1).EndInit(); ResumeLayout(false); PerformLayout(); } #endregion private DevExpress.XtraRichEdit.RichEditControl richEditControl1; private DevExpress.Utils.Behaviors.BehaviorManager behaviorManager1; private DevExpress.XtraRichEdit.UI.RichEditBarController richEditBarController1; private DevExpress.XtraBars.Ribbon.RibbonControl ribbonControl1; private DevExpress.XtraRichEdit.UI.UndoItem undoItem1; private DevExpress.XtraRichEdit.UI.RedoItem redoItem1; private DevExpress.XtraRichEdit.UI.FileNewItem fileNewItem1; private DevExpress.XtraRichEdit.UI.FileOpenItem fileOpenItem1; private DevExpress.XtraRichEdit.UI.FileSaveItem fileSaveItem1; private DevExpress.XtraRichEdit.UI.FileSaveAsItem fileSaveAsItem1; private DevExpress.XtraRichEdit.UI.QuickPrintItem quickPrintItem1; private DevExpress.XtraRichEdit.UI.PrintItem printItem1; private DevExpress.XtraRichEdit.UI.PrintPreviewItem printPreviewItem1; private DevExpress.XtraRichEdit.UI.EncryptDocumentItem encryptDocumentItem1; private DevExpress.XtraRichEdit.UI.ShowDocumentPropertiesFormItem showDocumentPropertiesFormItem1; private DevExpress.XtraRichEdit.UI.PasteItem pasteItem1; private DevExpress.XtraRichEdit.UI.CutItem cutItem1; private DevExpress.XtraRichEdit.UI.CopyItem copyItem1; private DevExpress.XtraRichEdit.UI.PasteSpecialItem pasteSpecialItem1; private DevExpress.XtraBars.BarButtonGroup barButtonGroup1; private DevExpress.XtraRichEdit.UI.ChangeFontNameItem changeFontNameItem1; private DevExpress.XtraRichEdit.UI.RepositoryItemFontEditRichEdit repositoryItemFontEditRichEdit1; private DevExpress.XtraRichEdit.UI.ChangeFontSizeItem changeFontSizeItem1; private DevExpress.XtraRichEdit.Design.RepositoryItemRichEditFontSizeEdit repositoryItemRichEditFontSizeEdit1; private DevExpress.XtraRichEdit.UI.FontSizeIncreaseItem fontSizeIncreaseItem1; private DevExpress.XtraRichEdit.UI.FontSizeDecreaseItem fontSizeDecreaseItem1; private DevExpress.XtraBars.BarButtonGroup barButtonGroup2; private DevExpress.XtraRichEdit.UI.ToggleFontBoldItem toggleFontBoldItem1; private DevExpress.XtraRichEdit.UI.ToggleFontItalicItem toggleFontItalicItem1; private DevExpress.XtraRichEdit.UI.ToggleFontUnderlineItem toggleFontUnderlineItem1; private DevExpress.XtraRichEdit.UI.ToggleFontDoubleUnderlineItem toggleFontDoubleUnderlineItem1; private DevExpress.XtraRichEdit.UI.ToggleFontStrikeoutItem toggleFontStrikeoutItem1; private DevExpress.XtraRichEdit.UI.ToggleFontDoubleStrikeoutItem toggleFontDoubleStrikeoutItem1; private DevExpress.XtraRichEdit.UI.ToggleFontSuperscriptItem toggleFontSuperscriptItem1; private DevExpress.XtraRichEdit.UI.ToggleFontSubscriptItem toggleFontSubscriptItem1; private DevExpress.XtraBars.BarButtonGroup barButtonGroup3; private DevExpress.XtraRichEdit.UI.ChangeFontColorItem changeFontColorItem1; private DevExpress.XtraRichEdit.UI.ChangeFontHighlightColorItem changeFontHighlightColorItem1; private DevExpress.XtraRichEdit.UI.ChangeTextCaseItem changeTextCaseItem1; private DevExpress.XtraRichEdit.UI.MakeTextUpperCaseItem makeTextUpperCaseItem1; private DevExpress.XtraRichEdit.UI.MakeTextLowerCaseItem makeTextLowerCaseItem1; private DevExpress.XtraRichEdit.UI.CapitalizeEachWordCaseItem capitalizeEachWordCaseItem1; private DevExpress.XtraRichEdit.UI.ToggleTextCaseItem toggleTextCaseItem1; private DevExpress.XtraRichEdit.UI.ClearFormattingItem clearFormattingItem1; private DevExpress.XtraBars.BarButtonGroup barButtonGroup4; private DevExpress.XtraRichEdit.UI.ToggleBulletedListItem toggleBulletedListItem1; private DevExpress.XtraRichEdit.UI.ToggleNumberingListItem toggleNumberingListItem1; private DevExpress.XtraRichEdit.UI.ToggleMultiLevelListItem toggleMultiLevelListItem1; private DevExpress.XtraBars.BarButtonGroup barButtonGroup5; private DevExpress.XtraRichEdit.UI.DecreaseIndentItem decreaseIndentItem1; private DevExpress.XtraRichEdit.UI.IncreaseIndentItem increaseIndentItem1; private DevExpress.XtraRichEdit.UI.RtlToggleBulletedListItem rtlToggleBulletedListItem1; private DevExpress.XtraRichEdit.UI.RtlToggleNumberingListItem rtlToggleNumberingListItem1; private DevExpress.XtraRichEdit.UI.RtlToggleMultiLevelListItem rtlToggleMultiLevelListItem1; private DevExpress.XtraRichEdit.UI.RtlDecreaseIndentItem rtlDecreaseIndentItem1; private DevExpress.XtraRichEdit.UI.RtlIncreaseIndentItem rtlIncreaseIndentItem1; private DevExpress.XtraRichEdit.UI.ToggleParagraphLeftToRightItem toggleParagraphLeftToRightItem1; private DevExpress.XtraRichEdit.UI.ToggleParagraphRightToLeftItem toggleParagraphRightToLeftItem1; private DevExpress.XtraBars.BarButtonGroup barButtonGroup6; private DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentLeftItem toggleParagraphAlignmentLeftItem1; private DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentCenterItem toggleParagraphAlignmentCenterItem1; private DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentRightItem toggleParagraphAlignmentRightItem1; private DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentJustifyItem toggleParagraphAlignmentJustifyItem1; private DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentArabicJustifyGroupItem toggleParagraphAlignmentArabicJustifyGroupItem1; private DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentArabicJustifyItem toggleParagraphAlignmentArabicJustifyItem1; private DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentJustifyLowItem toggleParagraphAlignmentJustifyLowItem1; private DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentJustifyMediumItem toggleParagraphAlignmentJustifyMediumItem1; private DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentJustifyHighItem toggleParagraphAlignmentJustifyHighItem1; private DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentDistributeItem toggleParagraphAlignmentDistributeItem1; private DevExpress.XtraRichEdit.UI.ToggleParagraphAlignmentThaiDistributeItem toggleParagraphAlignmentThaiDistributeItem1; private DevExpress.XtraRichEdit.UI.ToggleShowWhitespaceItem toggleShowWhitespaceItem1; private DevExpress.XtraBars.BarButtonGroup barButtonGroup7; private DevExpress.XtraRichEdit.UI.ChangeParagraphLineSpacingItem changeParagraphLineSpacingItem1; private DevExpress.XtraRichEdit.UI.SetSingleParagraphSpacingItem setSingleParagraphSpacingItem1; private DevExpress.XtraRichEdit.UI.SetSesquialteralParagraphSpacingItem setSesquialteralParagraphSpacingItem1; private DevExpress.XtraRichEdit.UI.SetDoubleParagraphSpacingItem setDoubleParagraphSpacingItem1; private DevExpress.XtraRichEdit.UI.ShowLineSpacingFormItem showLineSpacingFormItem1; private DevExpress.XtraRichEdit.UI.AddSpacingBeforeParagraphItem addSpacingBeforeParagraphItem1; private DevExpress.XtraRichEdit.UI.RemoveSpacingBeforeParagraphItem removeSpacingBeforeParagraphItem1; private DevExpress.XtraRichEdit.UI.AddSpacingAfterParagraphItem addSpacingAfterParagraphItem1; private DevExpress.XtraRichEdit.UI.RemoveSpacingAfterParagraphItem removeSpacingAfterParagraphItem1; private DevExpress.XtraRichEdit.UI.ChangeParagraphBackColorItem changeParagraphBackColorItem1; private DevExpress.XtraRichEdit.UI.GalleryChangeStyleItem galleryChangeStyleItem1; private DevExpress.XtraRichEdit.UI.FindItem findItem1; private DevExpress.XtraRichEdit.UI.ReplaceItem replaceItem1; private DevExpress.XtraRichEdit.UI.InsertPageBreakItem2 insertPageBreakItem21; private DevExpress.XtraRichEdit.UI.InsertTableItem insertTableItem1; private DevExpress.XtraRichEdit.UI.InsertFloatingPictureItem insertFloatingPictureItem1; private DevExpress.XtraRichEdit.UI.InsertBookmarkItem insertBookmarkItem1; private DevExpress.XtraRichEdit.UI.InsertHyperlinkItem insertHyperlinkItem1; private DevExpress.XtraRichEdit.UI.EditPageHeaderItem editPageHeaderItem1; private DevExpress.XtraRichEdit.UI.EditPageFooterItem editPageFooterItem1; private DevExpress.XtraRichEdit.UI.InsertPageNumberItem insertPageNumberItem1; private DevExpress.XtraRichEdit.UI.InsertPageCountItem insertPageCountItem1; private DevExpress.XtraRichEdit.UI.InsertTextBoxItem insertTextBoxItem1; private DevExpress.XtraRichEdit.UI.InsertObjectItem insertObjectItem1; private DevExpress.XtraRichEdit.UI.InsertSymbolItem insertSymbolItem1; private DevExpress.XtraRichEdit.UI.FileRibbonPage fileRibbonPage1; private DevExpress.XtraRichEdit.UI.CommonRibbonPageGroup commonRibbonPageGroup1; private DevExpress.XtraRichEdit.UI.InfoRibbonPageGroup infoRibbonPageGroup1; private DevExpress.XtraRichEdit.UI.HomeRibbonPage homeRibbonPage1; private DevExpress.XtraRichEdit.UI.ClipboardRibbonPageGroup clipboardRibbonPageGroup1; private DevExpress.XtraRichEdit.UI.FontRibbonPageGroup fontRibbonPageGroup1; private DevExpress.XtraRichEdit.UI.ParagraphRibbonPageGroup paragraphRibbonPageGroup1; private DevExpress.XtraRichEdit.UI.StylesRibbonPageGroup stylesRibbonPageGroup1; private DevExpress.XtraRichEdit.UI.EditingRibbonPageGroup editingRibbonPageGroup1; private DevExpress.XtraRichEdit.UI.InsertRibbonPage insertRibbonPage1; private DevExpress.XtraRichEdit.UI.PagesRibbonPageGroup pagesRibbonPageGroup1; private DevExpress.XtraRichEdit.UI.TablesRibbonPageGroup tablesRibbonPageGroup1; private DevExpress.XtraRichEdit.UI.IllustrationsRibbonPageGroup illustrationsRibbonPageGroup1; private DevExpress.XtraRichEdit.UI.LinksRibbonPageGroup linksRibbonPageGroup1; private DevExpress.XtraRichEdit.UI.HeaderFooterRibbonPageGroup headerFooterRibbonPageGroup1; private DevExpress.XtraRichEdit.UI.TextRibbonPageGroup textRibbonPageGroup1; private DevExpress.XtraRichEdit.UI.SymbolsRibbonPageGroup symbolsRibbonPageGroup1; } }
winforms-ai-extensions/MemoEditForm.Designer.cs(vb)
C#
namespace WinForms_AI_Extensions { partial class MemoEditForm { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { components = new System.ComponentModel.Container(); DevExpress.AIIntegration.Desktop.LanguageInfo languageInfo1 = new DevExpress.AIIntegration.Desktop.LanguageInfo(); DevExpress.AIIntegration.Desktop.LanguageInfo languageInfo2 = new DevExpress.AIIntegration.Desktop.LanguageInfo(); DevExpress.AIIntegration.Desktop.LanguageInfo languageInfo3 = new DevExpress.AIIntegration.Desktop.LanguageInfo(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MemoEditForm)); memoEdit1 = new DevExpress.XtraEditors.MemoEdit(); behaviorManager1 = new DevExpress.Utils.Behaviors.BehaviorManager(components); ((System.ComponentModel.ISupportInitialize)memoEdit1.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)behaviorManager1).BeginInit(); SuspendLayout(); // // memoEdit1 // languageInfo1.Culture = new System.Globalization.CultureInfo("pt"); languageInfo2.Culture = new System.Globalization.CultureInfo("es"); languageInfo3.Culture = new System.Globalization.CultureInfo("de"); behaviorManager1.SetBehaviors(memoEdit1, new DevExpress.Utils.Behaviors.Behavior[] { DevExpress.AIIntegration.WinForms.ExpandBehavior.Create(typeof(DevExpress.AIIntegration.WinForms.MemoEditExpandBehaviorSource)), DevExpress.AIIntegration.WinForms.ShortenBehavior.Create(typeof(DevExpress.AIIntegration.WinForms.MemoEditShortenBehaviorSource)), DevExpress.AIIntegration.WinForms.SummarizeBehavior.Create(typeof(DevExpress.AIIntegration.WinForms.MemoEditSummarizeBehaviorSource), DevExpress.AIIntegration.SummarizationMode.Abstractive), DevExpress.AIIntegration.WinForms.ExplainBehavior.Create(typeof(DevExpress.AIIntegration.WinForms.MemoEditExplainBehaviorSource)), DevExpress.AIIntegration.WinForms.ChangeToneBehavior.Create(typeof(DevExpress.AIIntegration.WinForms.MemoEditChangeToneBehaviorSource)), DevExpress.AIIntegration.WinForms.ProofreadBehavior.Create(typeof(DevExpress.AIIntegration.WinForms.MemoEditProofreadBehaviorSource)), DevExpress.AIIntegration.WinForms.ChangeStyleBehavior.Create(typeof(DevExpress.AIIntegration.WinForms.MemoEditChangeStyleBehaviorSource)), DevExpress.AIIntegration.WinForms.TranslateBehavior.Create(typeof(DevExpress.AIIntegration.WinForms.MemoEditTranslateBehaviorSource), new DevExpress.AIIntegration.Desktop.LanguageInfo[] { languageInfo1, languageInfo2, languageInfo3 }), DevExpress.AIIntegration.WinForms.CustomRequestBehavior.Create(typeof(DevExpress.AIIntegration.WinForms.MemoEditCustomRequestBehaviorSource)) }); memoEdit1.Dock = DockStyle.Fill; memoEdit1.EditValue = resources.GetString("memoEdit1.EditValue"); memoEdit1.Location = new Point(0, 0); memoEdit1.Margin = new Padding(2, 2, 2, 2); memoEdit1.Name = "memoEdit1"; memoEdit1.Size = new Size(951, 496); memoEdit1.TabIndex = 0; // // MemoEditForm // AutoScaleDimensions = new SizeF(9F, 19F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(951, 496); Controls.Add(memoEdit1); Margin = new Padding(2, 2, 2, 2); Name = "MemoEditForm"; Text = "Form1"; ((System.ComponentModel.ISupportInitialize)memoEdit1.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)behaviorManager1).EndInit(); ResumeLayout(false); } #endregion private DevExpress.XtraEditors.MemoEdit memoEdit1; private DevExpress.Utils.Behaviors.BehaviorManager behaviorManager1; } }
wpf-ai-extensions/App.xaml.cs(vb)
C#
using Azure.AI.OpenAI; using DevExpress.AIIntegration; using DevExpress.Xpf.Core; using System.Configuration; using System.Data; using System.Windows; namespace WPF_AI_Extensions { /// <summary> /// Interaction logic for App.xaml /// </summary> /// public partial class App : System.Windows.Application { //Modify the following lines to obtain and pass your personal Azure OpenAI credentails to the Register* method. string AzureOpenAIEndpoint { get { return Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT"); } } string AzureOpenAIKey { get { return Environment.GetEnvironmentVariable("AZURE_OPENAI_APIKEY"); } } string DeploymentName { get { return Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENTNAME"); } } protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); ApplicationThemeHelper.ApplicationThemeName = "Office2019Colorful"; ///To register Ollama //OllamaChatClient ollamaChatClient = new OllamaChatClient("http://localhost:11434/", "llama3.1"); AzureOpenAIClient azureOpenAIClient = new AzureOpenAIClient(new Uri(AzureOpenAIEndpoint), new System.ClientModel.ApiKeyCredential(AzureOpenAIKey)); AIExtensionsContainerDesktop.Default.RegisterChatClient(azureOpenAIClient.AsChatClient(DeploymentName)); } } }
wpf-ai-extensions/MainWindow.xaml
XAML
<Window x:Class="WPF_AI_Extensions.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:WPF_AI_Extensions" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm" xmlns:dxai="http://schemas.devexpress.com/winfx/2008/xaml/ai" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="*" /> </Grid.RowDefinitions> <dxe:TextEdit TextWrapping="Wrap" Text="We are proud to announce the immediate availability of DevExpress Universal v24.1, our award-winning software development platform for .NET and Visual Studio developers. With numerous new products and dozens of high-impact features, v24.1 allows you to build your best, without limits or compromise. From the desktop, the web or your mobile world, DevExpress dev tools help you address a broad range of usage scenarios and deliver intuitive solutions that amaze." VerticalScrollBarVisibility="Auto" VerticalContentAlignment="Top"> <dxmvvm:Interaction.Behaviors> <dxai:ExpandBehavior /> <dxai:ShortenBehavior/> <dxai:SummarizeBehavior/> <dxai:ExplainBehavior/> <dxai:ChangeToneBehavior /> <dxai:ProofreadBehavior/> <dxai:ChangeStyleBehavior/> <dxai:TranslateBehavior> <dxai:LanguageInfo Culture="en-US"/> <dxai:LanguageInfo Culture="de-DE"/> <dxai:LanguageInfo Culture="fr-FR"/> </dxai:TranslateBehavior> <dxai:CustomRequestBehavior/> </dxmvvm:Interaction.Behaviors> </dxe:TextEdit> </Grid> </Window>
wpf-ai-extensions/RichEditWindow.xaml
XAML
<Window x:Class="WPF_AI_Extensions.RichEditWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:WPF_AI_Extensions" xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm" xmlns:dxre="http://schemas.devexpress.com/winfx/2008/xaml/richedit" xmlns:dxai="http://schemas.devexpress.com/winfx/2008/xaml/ai" mc:Ignorable="d" Title="RichEditWindow" Height="450" Width="800"> <Grid> <dxre:RichEditControl x:Name="richEditControl" CommandBarStyle="Ribbon"> <dxmvvm:Interaction.Behaviors> <dxai:ExpandBehavior /> <dxai:ShortenBehavior/> <dxai:SummarizeBehavior/> <dxai:ExplainBehavior/> <dxai:ChangeToneBehavior /> <dxai:ProofreadBehavior/> <dxai:ChangeStyleBehavior/> <dxai:TranslateBehavior> <dxai:LanguageInfo Culture="en-US"/> <dxai:LanguageInfo Culture="de-DE"/> <dxai:LanguageInfo Culture="fr-FR"/> </dxai:TranslateBehavior> <dxai:GenerateImageDescriptionBehavior/> <dxai:CustomRequestBehavior/> </dxmvvm:Interaction.Behaviors> </dxre:RichEditControl> </Grid> </Window>

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.