[This is preliminary documentation and is subject to change.]
Provides technology-independent managed base class for WinForms and WPF message boxes
Namespace:
Tools.WindowsT.IndependentTAssembly: Tools.Windows (in Tools.Windows.dll) Version: 1.5.2.0
Author: Đonny (dzonny@dzonny.cz)
Vertion history
- 1.5.2 (Nightly)
- VersionAttribute and AuthorAttribute removed
- Fixed: Some static functions throws exception when icon is not set or when default button is used (even implicitly)
Syntax
| C# |
|---|
[DefaultEventAttribute("Closed")] [DefaultPropertyAttribute("Prompt")] public abstract class MessageBox : Component, IReportsChange |
| Visual Basic (Declaration) |
|---|
<DefaultEventAttribute("Closed")> _ <DefaultPropertyAttribute("Prompt")> _ Public MustInherit Class MessageBox _ Inherits Component _ Implements IReportsChange |
| Visual C++ |
|---|
[DefaultEventAttribute(L"Closed")] [DefaultPropertyAttribute(L"Prompt")] public ref class MessageBox abstract : public Component, IReportsChange |
| J# |
|---|
/** @attribute DefaultEventAttribute("Closed") */ /** @attribute DefaultPropertyAttribute("Prompt") */ public abstract class MessageBox extends Component implements IReportsChange |
| JScript |
|---|
public abstract class MessageBox extends Component implements IReportsChange |
Remarks
This class implements IReportsChange and has plenty of events fo reporting changes of property values. Also types of some properties reports events when their properties are changed.
The aim of such behavior is to provide dynamic message box which can be changed as it is displayd.
However it is up to derived class which changes it will track and interpret as changes of dialog.
After message box is closed, it can be shown again (so called re-cycling; see Recycle()()()).
In order to prevent confusing multiple overloads, names of Modal_*, ModalF_*, ModelEx_* and Error_* functions are suffixed with abberivations of accepted parameters. The Show(Window, String) method stays overloaded. Meaning of abberivations are following:
| Abbr. | Meaning |
|---|---|
| a | args - Formatting string arguments |
| B | Buttons - Either MessageBox..::.MessageBoxButton objects or or-ed values of MessageBox..::.MessageBoxButton..::.Buttons |
| E | Items - assorted items to be shown on message box such as buttons, checkboxes, comboboxes etc. |
| H | ShowHandler - delegate to be called when message box is shown |
| I | Icon - Either Icon, Image or MessageBox..::.MessageBoxIcons defining picture to be shown on message box |
| M | Timer - Defines count-down time for self-closing message box |
| O | Options - A MessageBox..::.MessageBoxOptions value |
| P | Prompt - Main text to be shown to user |
| S | Sound - Sound to be played when message box is shown |
| T | Title - Text of message box header (title bar) |
| W | Owner - Owner of messagebox - the window to which the message box will be modal |
| X | Exception - Exception message box will show information about |
Inheritance Hierarchy
System..::.Object
System..::.MarshalByRefObject
System.ComponentModel..::.Component
Tools.WindowsT.IndependentT..::.MessageBox
Tools.WindowsT.FormsT..::.MessageBox
Tools.WindowsT.IndependentT..::.MessageBox..::.FakeBox
Tools.WindowsT.WPF.DialogsT..::.MessageBox
System..::.MarshalByRefObject
System.ComponentModel..::.Component
Tools.WindowsT.IndependentT..::.MessageBox
Tools.WindowsT.FormsT..::.MessageBox
Tools.WindowsT.IndependentT..::.MessageBox..::.FakeBox
Tools.WindowsT.WPF.DialogsT..::.MessageBox