Skip to main content

RepositoryItemTokenEdit.BeforeShowPopupPanel Event

Occurs before the peek panel assigned to this TokenEdit is displayed.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DXCategory("Events")]
public event TokenEditBeforeShowPopupPanelEventHandler BeforeShowPopupPanel

Event Data

The BeforeShowPopupPanel event's data class is TokenEditBeforeShowPopupPanelEventArgs. The following properties provide information specific to this event:

Property
DataObject
DataSourceIndex
Token

Remarks

To assign a FlyoutPanel to your TokenEdit control, use the RepositoryItemTokenEdit.PopupPanel property. When a user moves the mouse pointer over a selected token, the BeforeShowPopupPanel event fires. Handle it to customize the flyout panel that is about to pop up.

Event arguments expose the following properties:

  • e.Token - the hovered token;
  • e.Value, e.Description - the value and description of the hovered token;
  • e.DataObject - in bound mode, returns an Object that is the data source record. In unbound mode, returns the hovered token as an Object.
  • e.DataSourceIndex - in bound mode, returns the index of a data source record. In unbound mode, returns the index of the hovered token within the RepositoryItemTokenEdit.Tokens collection.
  • e.Bounds - flyout panel bounds.

The code below populates two flyout panel labels with the token description and the value of the corresponding data source record’s “Modified Date” column.

void TokenEdit1_BeforeShowPopupPanel(object sender, TokenEditBeforeShowPopupPanelEventArgs e) {
    labelControl2.Text = e.Token.Description;
    labelControl4.Text = (e.DataObject as DevExpress.DataAccess.Sql.DataApi.IRow)["ModifiedDate"].ToString();
}
See Also