Status: Current. Reference for users. The rows of the tables are generated by
docs/scripts/controls-table.mjsfrom the library sources and from the list of tester members in that script;npm testfails when the rows differ from its output or a tester is missing.
Each row names a type of the UI framework, the substitute class that replaces it, the kind of
substitution, the tester that finds it by name, the testing events the substitute raises, including
those it inherits from another substitute class, and the members the tester adds beyond Target
and Handle.
Test a Windows Forms application and Test an Avalonia application
explain how to use them.
Windows Forms
Section titled “Windows Forms”Allors.Immersive.Winforms substitutes 82 types of System.Windows.Forms, in the namespace
Allors.Immersive.Winforms.Substitutes, with testers in Allors.Immersive.Winforms.Testers. The
common dialogs, five of which are sealed, are substituted explicitly by classes that derive from
CommonDialog; MessageBox is substituted through its static Show overloads. Every other
substitute derives from the type it replaces.
| Substituted type | Substitute | Substitution | Tester | Events reported | Tester members |
|---|---|---|---|---|---|
System.Windows.Forms.BindingNavigator | BindingNavigator | Base | BindingNavigatorTester | AddNewItem() | |
System.Windows.Forms.Button | Button | Base | ButtonTester | Click, DoubleClick | Click() |
System.Windows.Forms.CheckBox | CheckBox | Base | CheckBoxTester | CheckedChanged | |
System.Windows.Forms.CheckedListBox | CheckedListBox | Base | CheckedListBoxTester | ItemCheck | |
System.Windows.Forms.ColorDialog | ColorDialog | Explicit | ColorDialogTester | Shown | |
System.Windows.Forms.ComboBox | ComboBox | Base | ComboBoxTester | SelectedItemChanged | Select<T>(Predicate<T>) |
System.Windows.Forms.ContextMenu | ContextMenu | Base | ContextMenuTester | ||
System.Windows.Forms.ContextMenuStrip | ContextMenuStrip | Base | ContextMenuStripTester | ||
System.Windows.Forms.DataGrid | DataGrid | Base | DataGridTester | ||
System.Windows.Forms.DataGridTextBox | DataGridTextBox | Base | DataGridTextBoxTester | ||
System.Windows.Forms.DataGridView | DataGridView | Base | DataGridViewTester | FindRow(predicate), FindRows(predicate) | |
System.Windows.Forms.DataGridViewComboBoxEditingControl | DataGridViewComboBoxEditingControl | Base | DataGridViewComboBoxEditingControlTester | ||
System.Windows.Forms.DataGridViewRow | DataGridViewRow | Base | DataGridViewRowTester | ||
System.Windows.Forms.DataGridViewTextBoxEditingControl | DataGridViewTextBoxEditingControl | Base | DataGridViewTextBoxEditingControlTester | ||
System.Windows.Forms.DateTimePicker | DateTimePicker | Base | DateTimePickerTester | ||
System.Windows.Forms.DomainUpDown | DomainUpDown | Base | DomainUpDownTester | ||
System.Windows.Forms.ErrorProvider | ErrorProvider | Base | ErrorProviderTester | ||
System.Windows.Forms.FileDialog | FileDialog | Explicit | — | Shown | |
System.Windows.Forms.FlowLayoutPanel | FlowLayoutPanel | Base | FlowLayoutPanelTester | ||
System.Windows.Forms.FolderBrowserDialog | FolderBrowserDialog | Explicit | FolderBrowserDialogTester | Shown | |
System.Windows.Forms.FontDialog | FontDialog | Explicit | FontDialogTester | Shown | |
System.Windows.Forms.Form | Form | Base | FormTester | Activated, Shown | |
System.Windows.Forms.GroupBox | GroupBox | Base | GroupBoxTester | ||
System.Windows.Forms.HScrollBar | HScrollBar | Base | HScrollBarTester | ||
System.Windows.Forms.HelpProvider | HelpProvider | Base | HelpProviderTester | ||
System.Windows.Forms.Label | Label | Base | LabelTester | ||
System.Windows.Forms.LinkLabel | LinkLabel | Base | LinkLabelTester | ||
System.Windows.Forms.ListBox | ListBox | Base | ListBoxTester | ||
System.Windows.Forms.ListView | ListView | Base | ListViewTester | ||
System.Windows.Forms.MainMenu | MainMenu | Base | MainMenuTester | ||
System.Windows.Forms.MaskedTextBox | MaskedTextBox | Base | MaskedTextBoxTester | ||
System.Windows.Forms.MenuItem | MenuItem | Base | MenuItemTester | Click() | |
System.Windows.Forms.MenuStrip | MenuStrip | Base | MenuStripTester | ||
System.Windows.Forms.MessageBox | MessageBox | Static Show overloads | MessageBoxTester | Shown | |
System.Windows.Forms.MonthCalendar | MonthCalendar | Base | MonthCalendarTester | ||
System.Windows.Forms.NumericUpDown | NumericUpDown | Base | NumericUpDownTester | ||
System.Windows.Forms.OpenFileDialog | OpenFileDialog | Explicit | OpenFileDialogTester | Shown | |
System.Windows.Forms.PageSetupDialog | PageSetupDialog | Explicit | PageSetupDialogTester | Shown | |
System.Windows.Forms.Panel | Panel | Base | PanelTester | ||
System.Windows.Forms.PictureBox | PictureBox | Base | PictureBoxTester | ||
System.Windows.Forms.PrintDialog | PrintDialog | Explicit | PrintDialogTester | Shown | |
System.Windows.Forms.PrintPreviewControl | PrintPreviewControl | Base | PrintPreviewControlTester | ||
System.Windows.Forms.PrintPreviewDialog | PrintPreviewDialog | Base | PrintPreviewDialogTester | ||
System.Windows.Forms.ProgressBar | ProgressBar | Base | ProgressBarTester | ||
System.Windows.Forms.PropertyGrid | PropertyGrid | Base | PropertyGridTester | FindGridItem(params string[] names) | |
System.Windows.Forms.RadioButton | RadioButton | Base | RadioButtonTester | ||
System.Windows.Forms.RichTextBox | RichTextBox | Base | RichTextBoxTester | ||
System.Windows.Forms.SaveFileDialog | SaveFileDialog | Explicit | SaveFileDialogTester | Shown | |
System.Windows.Forms.SplitContainer | SplitContainer | Base | SplitContainerTester | ||
System.Windows.Forms.Splitter | Splitter | Base | SplitterTester | ||
System.Windows.Forms.StatusBar | StatusBar | Base | StatusBarTester | ||
System.Windows.Forms.StatusBarPanel | StatusBarPanel | Base | StatusBarPanelTester | ||
System.Windows.Forms.StatusStrip | StatusStrip | Base | StatusStripTester | ||
System.Windows.Forms.TabControl | TabControl | Base | TabControlTester | ||
System.Windows.Forms.TabPage | TabPage | Base | TabPageTester | ||
System.Windows.Forms.TableLayoutPanel | TableLayoutPanel | Base | TableLayoutPanelTester | ||
System.Windows.Forms.TextBox | TextBox | Base | TextBoxTester | ||
System.Windows.Forms.Timer | Timer | Base | TimerTester | ||
System.Windows.Forms.ToolBar | ToolBar | Base | ToolBarTester | Click(ToolBarButtonTester) | |
System.Windows.Forms.ToolBarButton | ToolBarButton | Base | ToolBarButtonTester | Click() | |
System.Windows.Forms.ToolStrip | ToolStrip | Base | ToolStripTester | ||
System.Windows.Forms.ToolStripButton | ToolStripButton | Base | ToolStripButtonTester | Click() | |
System.Windows.Forms.ToolStripComboBox | ToolStripComboBox | Base | ToolStripComboBoxTester | ||
System.Windows.Forms.ToolStripContainer | ToolStripContainer | Base | ToolStripContainerTester | ||
System.Windows.Forms.ToolStripContentPanel | ToolStripContentPanel | Base | ToolStripContentPanelTester | ||
System.Windows.Forms.ToolStripDropDown | ToolStripDropDown | Base | ToolStripDropDownTester | ||
System.Windows.Forms.ToolStripDropDownButton | ToolStripDropDownButton | Base | ToolStripDropDownButtonTester | ||
System.Windows.Forms.ToolStripDropDownMenu | ToolStripDropDownMenu | Base | ToolStripDropDownMenuTester | ||
System.Windows.Forms.ToolStripLabel | ToolStripLabel | Base | ToolStripLabelTester | ||
System.Windows.Forms.ToolStripMenuItem | ToolStripMenuItem | Base | ToolStripMenuItemTester | ||
System.Windows.Forms.ToolStripPanel | ToolStripPanel | Base | ToolStripPanelTester | ||
System.Windows.Forms.ToolStripProgressBar | ToolStripProgressBar | Base | ToolStripProgressBarTester | ||
System.Windows.Forms.ToolStripSeparator | ToolStripSeparator | Base | ToolStripSeparatorTester | ||
System.Windows.Forms.ToolStripSplitButton | ToolStripSplitButton | Base | ToolStripSplitButtonTester | ||
System.Windows.Forms.ToolStripStatusLabel | ToolStripStatusLabel | Base | ToolStripStatusLabelTester | ||
System.Windows.Forms.ToolStripTextBox | ToolStripTextBox | Base | ToolStripTextBoxTester | ||
System.Windows.Forms.ToolTip | ToolTip | Base | ToolTipTester | ||
System.Windows.Forms.TrackBar | TrackBar | Base | TrackBarTester | ||
System.Windows.Forms.TreeView | TreeView | Base | TreeViewTester | NodeMouseClick, NodeMouseHover | SelectNode(params int[]), SelectNode(TreeNodeTester), FindNode(params int[]), SelectedNode, this[string[] ancestors] |
System.Windows.Forms.UserControl | UserControl | Base | UserControlTester | ||
System.Windows.Forms.VScrollBar | VScrollBar | Base | VScrollBarTester | ||
System.Windows.Forms.WebBrowser | WebBrowser | Base | WebBrowserTester |
Two testers address parts of a control rather than a control: GridItemTester, returned by
PropertyGridTester.FindGridItem, with Value, Children and Edit(); and TreeNodeTester,
returned by TreeViewTester.FindNode and its indexer, with Target, TreeViewTester, Select(),
Click(), FindByTagType(Type) and an indexer for child nodes.
Testing events
Section titled “Testing events”TestingWinformsEventKind lists many kinds of event, but the substitutes raise these nine:
Activated, CheckedChanged, Click, DoubleClick, ItemCheck, NodeMouseClick,
NodeMouseHover, SelectedItemChanged and Shown. Shown is raised by Form, by every
common dialog from RunDialog, and by MessageBox.Show.
Avalonia
Section titled “Avalonia”Allors.Immersive.Avalonia substitutes 49 controls of Avalonia.Controls, in the namespace
Allors.Immersive.Avalonia.Substitutes, with testers in Allors.Immersive.Avalonia.Testers.
Every substitute derives from the control it replaces and overrides StyleKeyOverride so that
the theme still applies.
| Substituted type | Substitute | Substitution | Tester | Events reported | Tester members |
|---|---|---|---|---|---|
Avalonia.Controls.AutoCompleteBox | AutoCompleteBox | Base | AutoCompleteBoxTester | TextChanged | |
Avalonia.Controls.Border | Border | Base | BorderTester | ||
Avalonia.Controls.Button | Button | Base | ButtonTester | Click | Click() |
Avalonia.Controls.Calendar | Calendar | Base | CalendarTester | SelectionChanged | |
Avalonia.Controls.CalendarDatePicker | CalendarDatePicker | Base | CalendarDatePickerTester | ValueChanged | |
Avalonia.Controls.Canvas | Canvas | Base | CanvasTester | ||
Avalonia.Controls.Carousel | Carousel | Base | CarouselTester | ||
Avalonia.Controls.CheckBox | CheckBox | Base | CheckBoxTester | IsCheckedChanged | |
Avalonia.Controls.ComboBox | ComboBox | Base | ComboBoxTester | SelectionChanged | |
Avalonia.Controls.ContentControl | ContentControl | Base | ContentControlTester | ||
Avalonia.Controls.ContextMenu | ContextMenu | Base | ContextMenuTester | ||
Avalonia.Controls.DatePicker | DatePicker | Base | DatePickerTester | ValueChanged | |
Avalonia.Controls.DockPanel | DockPanel | Base | DockPanelTester | ||
Avalonia.Controls.Expander | Expander | Base | ExpanderTester | IsExpandedChanged | |
Avalonia.Controls.Grid | Grid | Base | GridTester | ||
Avalonia.Controls.GridSplitter | GridSplitter | Base | GridSplitterTester | ||
Avalonia.Controls.Image | Image | Base | ImageTester | ||
Avalonia.Controls.ItemsControl | ItemsControl | Base | ItemsControlTester | ||
Avalonia.Controls.Label | Label | Base | LabelTester | ||
Avalonia.Controls.ListBox | ListBox | Base | ListBoxTester | SelectionChanged | |
Avalonia.Controls.ListBoxItem | ListBoxItem | Base | ListBoxItemTester | ||
Avalonia.Controls.Menu | Menu | Base | MenuTester | ||
Avalonia.Controls.MenuItem | MenuItem | Base | MenuItemTester | Click | Click() |
Avalonia.Controls.NumericUpDown | NumericUpDown | Base | NumericUpDownTester | ValueChanged | |
Avalonia.Controls.Panel | Panel | Base | PanelTester | ||
Avalonia.Controls.ProgressBar | ProgressBar | Base | ProgressBarTester | ValueChanged | |
Avalonia.Controls.RadioButton | RadioButton | Base | RadioButtonTester | IsCheckedChanged | |
Avalonia.Controls.RepeatButton | RepeatButton | Base | RepeatButtonTester | Click | Click() |
Avalonia.Controls.ScrollViewer | ScrollViewer | Base | ScrollViewerTester | ||
Avalonia.Controls.SelectableTextBlock | SelectableTextBlock | Base | SelectableTextBlockTester | ||
Avalonia.Controls.Separator | Separator | Base | SeparatorTester | ||
Avalonia.Controls.Slider | Slider | Base | SliderTester | ValueChanged | |
Avalonia.Controls.SplitButton | SplitButton | Base | SplitButtonTester | Click | Click() |
Avalonia.Controls.SplitView | SplitView | Base | SplitViewTester | ||
Avalonia.Controls.StackPanel | StackPanel | Base | StackPanelTester | ||
Avalonia.Controls.TabControl | TabControl | Base | TabControlTester | SelectionChanged | |
Avalonia.Controls.TabItem | TabItem | Base | TabItemTester | ||
Avalonia.Controls.TextBlock | TextBlock | Base | TextBlockTester | ||
Avalonia.Controls.TextBox | TextBox | Base | TextBoxTester | TextChanged | |
Avalonia.Controls.TimePicker | TimePicker | Base | TimePickerTester | ValueChanged | |
Avalonia.Controls.Primitives.ToggleButton | ToggleButton | Base | ToggleButtonTester | Click, IsCheckedChanged | Click() |
Avalonia.Controls.ToggleSplitButton | ToggleSplitButton | Base | ToggleSplitButtonTester | Click, IsCheckedChanged | Click() |
Avalonia.Controls.ToggleSwitch | ToggleSwitch | Base | ToggleSwitchTester | IsCheckedChanged | |
Avalonia.Controls.TreeView | TreeView | Base | TreeViewTester | SelectionChanged | |
Avalonia.Controls.TreeViewItem | TreeViewItem | Base | TreeViewItemTester | ||
Avalonia.Controls.UserControl | UserControl | Base | UserControlTester | ||
Avalonia.Controls.Viewbox | Viewbox | Base | ViewboxTester | ||
Avalonia.Controls.Window | Window | Base | WindowTester | Closed, Opened | |
Avalonia.Controls.WrapPanel | WrapPanel | Base | WrapPanelTester |
Testing events
Section titled “Testing events”TestingAvaloniaEventKind has eight kinds, all raised by substitutes: Click, Closed,
IsCheckedChanged, IsExpandedChanged, Opened, SelectionChanged, TextChanged and
ValueChanged.