Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to create a custom XtraMessageBox with the extended functionality

$
0
0

This example demonstrates how to create a MessageBox with an extended functionality. For this, create MyXtraMessageBox class descendant that is inherited from the XtraMessageBox class and uses the XtraMessageBoxArgs class - a MyXtraMessageArgs descendant which contains properties to customize the XtraMessageBox behavior. 
- ShowCountDown. If this property is true, the message box title will show you how many seconds are left before the timeout. When the countdown is over, the title will show its usual value.
- ShowNextTime. This property allows you to show a CheckBox on your message form. When you close the form, the result will be saved in the ShowMessageNextTime property of MyXtraMessageArgs and you can use this value later.
- DisableButtons. If this property value is true, all buttons except for "Cancel" will be disabled on the form.
- DisableCancel. This property gives you an opportunity to disable the "Cancel" button on the form.
- AutoClose. If you want to close your form, after the countdown is over, set this property to true. Also, you need to define the value of the AutoCloseResult property. This property shows what value will be received from the MyXtraMessageBox.Show method if the form is automatically closed.
- Center. If this property value is true, the MessageBox will be center aligned against its parent form.
- Timeout. This property sets the timer for the AutoClose and ShowCountDown properties in seconds. Its value should be greater than 0, otherwise, these properties will be unavailable.
- Buttons. This property specifies what buttons will be available on the form.
- Icon. This property specifies the MessageBox icon.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>