Skip to main content

Class WinFormsDisplay

Represents a WinForms graphics display

Assembly: WinForms.dll​
View Source​
Declaration
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​
Declaration
public int Width { get; }

Height​

Height of the display in pixels

View Source​
Declaration
public int Height { get; }

DisplayScale​

The rendering scale of the display

View Source​
Declaration
public float DisplayScale { get; }

Rotation​

Gets the current rotation of the touchscreen

View Source​
Declaration
public RotationType Rotation { get; }

ColorMode​

The currently set color mode for the display

View Source​
Declaration
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​
Declaration
public IPixelBuffer PixelBuffer { get; }

SupportedColorModes​

The Color mode supported by the display

View Source​
Declaration
public ColorMode SupportedColorModes { get; }

IsTouched​

Returns <b>true</b> if the touchscreen is currently being touched, otherwise <b>false</b>

View Source​
Declaration
public bool IsTouched { get; }

Methods​

Dispose(bool)​

Disposes of the resources (other than memory) used by the System.Windows.Forms.Form.

View Source​
Declaration
protected override void Dispose(bool disposing)
Parameters​
TypeNameDescription
System.Booleandisposingtrue 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​
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters​
TypeNameDescription
System.Windows.Forms.MouseEventArgseA System.Windows.Forms.MouseEventArgs that contains the event data.

OnMouseUp(MouseEventArgs)​

Raises the System.Windows.Forms.Control.MouseUp event.

View Source​
Declaration
protected override void OnMouseUp(MouseEventArgs e)
Parameters​
TypeNameDescription
System.Windows.Forms.MouseEventArgseA System.Windows.Forms.MouseEventArgs that contains the event data.

OnClick(EventArgs)​

Raises the System.Windows.Forms.Control.Click event.

View Source​
Declaration
protected override void OnClick(EventArgs e)
Parameters​
TypeNameDescription
System.EventArgseAn System.EventArgs that contains the event data.

OnPaint(PaintEventArgs)​

Raises the System.Windows.Forms.Control.Paint event.

View Source​
Declaration
protected override void OnPaint(PaintEventArgs e)
Parameters​
TypeNameDescription
System.Windows.Forms.PaintEventArgseA System.Windows.Forms.PaintEventArgs that contains the event data.

Events​

TouchDown​

Event raised when the touchscreen is pressed

View Source​
Declaration
public event TouchEventHandler? TouchDown
Event Type​

Meadow.Hardware.TouchEventHandler

TouchUp​

Event raised when the touchscreen is released

View Source​
Declaration
public event TouchEventHandler? TouchUp
Event Type​

Meadow.Hardware.TouchEventHandler

TouchClick​

Event raised when a cycle of press and release has occurred

View Source​
Declaration
public event TouchEventHandler? TouchClick
Event Type​

Meadow.Hardware.TouchEventHandler

TouchMoved​

Event raised when a cycle of press and release has occurred

View Source​
Declaration
public event TouchEventHandler? TouchMoved
Event Type​

Meadow.Hardware.TouchEventHandler

Implements​

  • 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