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

ContextButton Class

A regular context button that can be clicked.

Namespace: DevExpress.Utils

Assembly: DevExpress.Utils.v24.2.dll

NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core

#Declaration

public class ContextButton :
    ContextButtonBase

#Remarks

The ContextButton is a button that displays a caption and/or glyph and can be clicked by an end-user. See the ContextItem base class for the list of controls that support displaying context buttons. In the figure below, you can see the ContextButton displayed in the PictureEdit control.

ContextButton

The ContextButtonBase.Caption property specifies the button caption. If the ContextButtonBase.AllowHtmlText setting is enabled, you can display a hyperlink in the caption using the href tag and handle the ContextButtonBase.HyperlinkClick event. To customize the hyperlink color, use the ContextButtonBase.HyperLinkColor property.

You can also specify the button’s maximum width and height using the ContextButtonBase.MaxWidth and ContextButtonBase.MaxHeight properties, and the amount of space around the button using the ContextButtonBase.Padding property.

#Inheritance

See Also