Class WinFormsDisplay
Represents a WinForms graphics display
Assembly: WinForms.dll
View Source
public class WinFormsDisplay : Form, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl, IResizablePixelDisplay, IPixelDisplay, IDisplay, ITouchScreen
Inheritance: System.Object -> System.MarshalByRefObject -> System.ComponentModel.Component -> System.Windows.Forms.Control -> System.Windows.Forms.ScrollableControl -> System.Windows.Forms.ContainerControl -> System.Windows.Forms.Form
Implements:
Expand
System.Windows.Forms.IDropTarget, System.ComponentModel.ISynchronizeInvoke, System.Windows.Forms.IWin32Window, System.Windows.Forms.IBindableComponent, System.ComponentModel.IComponent, System.IDisposable, System.Windows.Forms.IContainerControl, Meadow.Peripherals.Displays.IResizablePixelDisplay, Meadow.Peripherals.Displays.IPixelDisplay, Meadow.Peripherals.Displays.IDisplay, Meadow.Hardware.ITouchScreen
Properties
Width
Width of the display in pixels
View Source
public int Width { get; }
Height
Height of the display in pixels
View Source
public int Height { get; }
DisplayScale
The rendering scale of the display
View Source
public float DisplayScale { get; }
Rotation
Gets the current rotation of the touchscreen
View Source
public RotationType Rotation { get; }
ColorMode
The currently set color mode for the display
View Source
public ColorMode ColorMode { get; }
PixelBuffer
Provide a buffer that matches this display's color depth, height, and width This should be the buffer that is sent to the device when Show is called
View Source
public IPixelBuffer PixelBuffer { get; }
SupportedColorModes
The Color mode supported by the display
View Source
public ColorMode SupportedColorModes { get; }
IsTouched
Returns <b>true</b> if the touchscreen is currently being touched, otherwise <b>false</b>
View Source
public bool IsTouched { get; }
Methods
Dispose(bool)
Disposes of the resources (other than memory) used by the System.Windows.Forms.Form.
View Source
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
System.Boolean | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
OnMouseDown(MouseEventArgs)
Raises the System.Windows.Forms.Control.MouseDown event.
View Source
protected override void OnMouseDown(MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
System.Windows.Forms.MouseEventArgs | e | A System.Windows.Forms.MouseEventArgs that contains the event data. |
OnMouseUp(MouseEventArgs)
Raises the System.Windows.Forms.Control.MouseUp event.
View Source
protected override void OnMouseUp(MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
System.Windows.Forms.MouseEventArgs | e | A System.Windows.Forms.MouseEventArgs that contains the event data. |
OnClick(EventArgs)
Raises the System.Windows.Forms.Control.Click event.
View Source
protected override void OnClick(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
System.EventArgs | e | An System.EventArgs that contains the event data. |
OnPaint(PaintEventArgs)
Raises the System.Windows.Forms.Control.Paint event.
View Source
protected override void OnPaint(PaintEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
System.Windows.Forms.PaintEventArgs | e | A System.Windows.Forms.PaintEventArgs that contains the event data. |
Events
TouchDown
Event raised when the touchscreen is pressed
View Source
public event TouchEventHandler? TouchDown
Event Type
Meadow.Hardware.TouchEventHandler
TouchUp
Event raised when the touchscreen is released
View Source
public event TouchEventHandler? TouchUp
Event Type
Meadow.Hardware.TouchEventHandler
TouchClick
Event raised when a cycle of press and release has occurred
View Source
public event TouchEventHandler? TouchClick
Event Type
Meadow.Hardware.TouchEventHandler
TouchMoved
Event raised when a cycle of press and release has occurred
View Source
public event TouchEventHandler? TouchMoved
Event Type
Meadow.Hardware.TouchEventHandler
Implements
System.Windows.Forms.IDropTargetSystem.ComponentModel.ISynchronizeInvokeSystem.Windows.Forms.IWin32WindowSystem.Windows.Forms.IBindableComponentSystem.ComponentModel.IComponentSystem.IDisposableSystem.Windows.Forms.IContainerControlMeadow.Peripherals.Displays.IResizablePixelDisplayMeadow.Peripherals.Displays.IPixelDisplayMeadow.Peripherals.Displays.IDisplayMeadow.Hardware.ITouchScreen