Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

HyperlinkFormShowingEventArgs.ControllerParameters Property

Gets the information for initializing the Edit Hyperlink dialog controls.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.XtraRichEdit.v24.2.dll

NuGet Package: DevExpress.Win.RichEdit

#Declaration

public HyperlinkFormControllerParameters ControllerParameters { get; }

#Property Value

Type Description
DevExpress.XtraRichEdit.Forms.HyperlinkFormControllerParameters

A DevExpress.XtraRichEdit.Forms.HyperlinkFormControllerParameters object containing information to be displayed in the form.

#Example

This example demonstrates how to replace the standard Hyperlink dialog with a custom form using the RichEditControl.HyperlinkFormShowing event.

private void richEditControl1_HyperlinkFormShowing(object sender,HyperlinkFormShowingEventArgs e)
{
    using (MyHyperlinkForm form = new MyHyperlinkForm(e.ControllerParameters))
    {
        e.DialogResult = form.ShowDialog();
        e.Handled = true;
    }
}
using System;
using DevExpress.XtraRichEdit.Forms;

namespace CustomDialogs {
    class MyHyperlinkForm : HyperlinkForm {
        public MyHyperlinkForm(HyperlinkFormControllerParameters controllerParameters)
            : base(controllerParameters)
        {
            btnEditAddress.EditValueChanged += new EventHandler(btnEditAddress_EditValueChanged);
            btnEditAddress.LostFocus += new EventHandler(btnEditAddress_LostFocus);
        }

        void btnEditAddress_LostFocus(object sender, EventArgs e) {
            this.btnEditAddress.Text = Controller.NavigateUri;
        }

        void btnEditAddress_EditValueChanged(object sender, EventArgs e) {
            Controller.NavigateUri = ValidateUrl(btnEditAddress.Text);
            this.btnOk.Enabled = true;
        }

        private string ValidateUrl(string p) {
            string s = p.Replace("devexpres.com", "devexpress.com");
            return s;
        }

    }
}
See Also