SurfaceViewer Class
Definition
Section titled “Definition”Draws a ICellSurface within an area. Optionally supports scroll bars.
[DataContract]public class SurfaceViewer : CompositeControl, IContainer, IList<ControlBase>, ICollection<ControlBase>, IEnumerable<ControlBase>, IEnumerableInheritance object → ControlBase → CompositeControl
Implements IContainer, IList<ControlBase>, ICollection<ControlBase>, IEnumerable<ControlBase>, IEnumerable
Constructors
Section titled “Constructors”SurfaceViewer(int, int, ICellSurface?)
Section titled “SurfaceViewer(int, int, ICellSurface?)”Creates a new drawing surface control with the specified width and height.
public SurfaceViewer(int width, int height, ICellSurface? surface = null)Parameters
Section titled “Parameters”width int
Width of the control.
height int
Height of the control.
surface ICellSurface
The surface to view.
Fields
Section titled “Fields”HorizontalScroller
Section titled “HorizontalScroller”The horizontal scroll bar. This shouldn’t be changed.
public ScrollBar HorizontalScrollerVerticalScroller
Section titled “VerticalScroller”The vertical scroll bar. This shouldn’t be changed.
public ScrollBar VerticalScrollerProperties
Section titled “Properties”ScrollBarMode
Section titled “ScrollBarMode”Sets the visual behavior of the scroll bars for the control.
[DataMember]public SurfaceViewer.ScrollBarModes ScrollBarMode { get; set; }Methods
Section titled “Methods”ResetSurface()
Section titled “ResetSurface()”Resets the control’s surface to a 1x1 surface transparent surface.
public void ResetSurface()OnSurfaceChanged(ICellSurface, ICellSurface)
Section titled “OnSurfaceChanged(ICellSurface, ICellSurface)”Handles and dehandles the IsDirtyChanged event for the backing surface.
protected override void OnSurfaceChanged(ICellSurface oldSurface, ICellSurface newSurface)Parameters
Section titled “Parameters”oldSurface ICellSurface
The previous surface instance.
newSurface ICellSurface
The new surface instance.
UpdateAndRedraw(TimeSpan)
Section titled “UpdateAndRedraw(TimeSpan)”Updates each control hosted by this control.
public override void UpdateAndRedraw(TimeSpan time)Parameters
Section titled “Parameters”time TimeSpan
The game frame time delta.