Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Collapse]Editors and Simple Controls
   [Collapse]Simple Editors
    [Expand]Included Components
    [Expand]Editors Structure
    [Expand]Editors Features
    [Expand]Member Tables
    [Collapse]Examples
     [Expand]Data Binding
      How to: Add Scrollbars for PictureBox
      How to: Add Value Entered by User to LookUpEdit's Data Source
      How to: Assign Custom Shortcut Used to Open/Close Popup Editor's Window
      How to: Change Current UI Culture
      How to: Change Item's Height in ComboBoxEdit
      How to: Change Page's Position in XtraTabControl
      How to: Control Appearance of Multiple Controls via StyleController
      How to: Copy Selected Text in TextEdit Control
      How to: Create and Place Onto Form Horizontal Scroll Bar at Runtime
      How to: Create and Populate CheckedListBoxControl at Runtime
      How to: Create ButtonEdit Control in Code
      How to: Create Column with Custom Data in LookUpEdit
      How to: Create ImageComboBoxEdit Control at Runtime
      How to: Create ListBoxControl at Runtime
      How to: Create Lookup Editor and Bind It to Data Source
      How to: Create New DataNavigator Control
      How to: Create New Vertical ScrollBar at Runtime
      How to: Create Radio Group and Respond to Value Selection
      How to: Create SimpleButton Control
      How to: Create XtraTabControl at Runtime
      How to: Custom Paint ComboBoxEdit's Items
      How to: Custom Paint ListBoxControl's Items
      How to: Customize HyperLinkEdit's Command via Event
      How to: Customize Operand Editor Properties in FilterControl
      How to: Delete ListBoxControl's Items That Include Specific Strings
      How to: Disable CheckedComboBoxEdit's Items via Event
      How to: Disable Specific Items in CheckedListBoxControl via Event
      How to: Display Custom Button Within XtraTab Control
      How to: Display Custom Controls in Popup
      How to: Display File Operation's Progress via ProgressBarControl
      How to: Display QR Bar Code in BarCodeControl
      How to: Display Set of Boolean Options in CheckedComboBoxEdit Control
      How to: Enable Opening ComboBox's Dropdown Window Based on Custom Logic
      How to: Format Text in CheckEdit Using HTML Tags
      How to: Format Text in LabelControl Using HTML Tags
      How to: Implement Custom Tooltip for TrackBarControl's Thumb
      How to: Implement Error Notifications for Custom Business Object on Data Source Level
      How to: Implement Hyperlink Functionality by Handling OpenLink Event
      How to: Paint Background of Numbers in DateEdit Using Skin Element
      How to: Paste Clipboard's Text to TextBox Control
      How to: Perform Custom Actions when End-Users Click Navigator Buttons
      How to: Prevent Displaying TextEdit Menu via BeforeShowMenu Event
      How to: Prevent Popup Window Closing for PopupContainerEdit
      How to: Remove Specific Operators from FilterControl
      How to: Respond to Changing CheckEdit's State
      How to: Respond to Checking Items in CheckedListBoxControl
      How to: Respond to Clicking ButtonEdit's Embedded Buttons
      How to: Respond to Clicking Close Button in XtraTabControl
      How to: Respond to Editor's Value Modification
      How to: Respond to Selecting ComboBoxEdit's Items
      How to: Respond to Selecting ListBoxControl's Items
      How to: Restrict User Input in Date Editor
      How to: Restrict Values Being Entered in Editors
      How to: Set Custom Height for Specific Items in ListBoxControl
      How to: Share Editors Between Multiple XtraGrid Controls
      How to: Show Array of Strings in ListBoxControl
      How to: Show Enumeration's Values in ImageComboBoxEdit Control
      How to: Show Values of Enumeration in CheckedComboBoxEdit
      How to: Supply Custom Error Icon for Editor
      How to: Use Custom Value Editor in FilterControl
      How to: Validate Data via DXValidationProvider Component
   [Expand]Lookup Editors
   [Expand]Token Edit Control
   [Expand]Breadcrumb Edit Control
   [Expand]Range Control
   [Expand]Image Slider
    Camera Control
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Customize HyperLinkEdit's Command via Event

Suppose that a hyperlink editor is used to display e-mails. When you activate the hyperlink, the default mail client should be opened for the specified address. The problem is that a hyperlink editor will run the mail client only if the command contains a "mailto:" prefix. So a command such as "support@devexpress.com" is not recognized by the editor by default.

Assuming that the hyperlink editor represents e-mails, we handle the HyperLinkEdit.OpenLink event and check whether the command contains the "mailto:" prefix. If not, we add it to the command. After the event handler is processed, the command will be executed by the editor (the OpenLinkEventArgs.Handled property of the event parameter is false by default) and this will open the mail client.

How would you rate this topic?​​​​​​​