Canvas Class
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Defines an area, or canvas, within which you can explicitly position child elements by using coordinates that are relative to the upper-left corner of the canvas.
Inheritance Hierarchy
System. . :: . .Object
Microsoft.SPOT. . :: . .DispatcherObject
Microsoft.SPOT.Presentation. . :: . .UIElement
Microsoft.SPOT.Presentation.Controls. . :: . .Panel
Microsoft.SPOT.Presentation.Controls..::..Canvas
Microsoft.SPOT.Presentation. . :: . .WindowManager
Namespace: Microsoft.SPOT.Presentation.Controls
Assembly: Microsoft.SPOT.TinyCore (in Microsoft.SPOT.TinyCore.dll)
Syntax
'Declaration
Public Class Canvas _
Inherits Panel
public class Canvas : Panel
public ref class Canvas : public Panel
type Canvas =
class
inherit Panel
end
public class Canvas extends Panel
The Canvas type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Canvas | Initializes a new instance of the Canvas class. |
Top
Properties
Name | Description | |
---|---|---|
ActualHeight | Gets the rendered height of this element. (Inherited from UIElement.) | |
ActualWidth | Gets the rendered width of this element. (Inherited from UIElement.) | |
Children | Gets the collection of child elements in the current panel. (Inherited from Panel.) | |
Height | Gets or sets the suggested height of this element. (Inherited from UIElement.) | |
HorizontalAlignment | Gets or sets the horizontal alignment characteristics that are applied to this element when it is composed within a parent element, such as a Panel. (Inherited from UIElement.) | |
InstanceEventHandlersStore | Gets the event-handler store for this element. (Inherited from UIElement.) | |
IsArrangeValid | Gets a value indicating whether the computed size and position of child elements in this element's layout are valid. (Inherited from UIElement.) | |
IsEnabled | Gets or sets a value indicating whether this element is enabled in the user interface (UI). (Inherited from UIElement.) | |
IsFocused | Gets a value that determines whether this element has logical focus. (Inherited from UIElement.) | |
IsMeasureValid | Gets a value indicating whether the current size returned by layout measure is valid. (Inherited from UIElement.) | |
IsVisible | Gets a value indicating whether this element is visible in the user interface (UI). (Inherited from UIElement.) | |
LogicalChildren | Gets an enumerator for this element's logical child elements. (Inherited from UIElement.) | |
Parent | Gets the logical parent element of this element. (Inherited from UIElement.) | |
RootUIElement | Gets the logical root element of this element. (Inherited from UIElement.) | |
VerticalAlignment | Gets or sets the vertical alignment characteristics that are applied to this element when it is composed within a parent element, such as a Panel. (Inherited from UIElement.) | |
Visibility | Gets or sets the user interface (UI) visibility of this element. (Inherited from UIElement.) | |
Width | Gets or sets the suggested width of this element. (Inherited from UIElement.) |
Top
Methods
Name | Description | |
---|---|---|
AddHandler | Adds a routed-event handler for a specified routed event, adding the handler to the current element's event handler collection. (Inherited from UIElement.) | |
AddToEventRoute | Adds handlers to the specified event route for the current element's event handler collection. (Inherited from UIElement.) | |
Arrange | Positions child elements in a particular region on the screen. (Inherited from UIElement.) | |
ArrangeOverride | Arranges the contents of a specific canvas element. (Overrides UIElement. . :: . .ArrangeOverride(Int32, Int32).) | |
CheckAccess | Determines whether the calling thread has access to the current DispatcherObject object. (Inherited from DispatcherObject.) | |
ChildElementFromPoint | Returns the most recently created child control that is located at a specified point on the display. (Inherited from UIElement.) | |
ContainsPoint | Determines whether a specified point is contained by this UIElement. (Inherited from UIElement.) | |
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetBottom | Retrieves the row number of the bottom of the rectangular area that contains a specified child element. | |
GetDesiredSize | Gets the current element's size, as computed during the measure pass of the layout process. (Inherited from UIElement.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetLayoutOffset | Gets the current element's offset, relative to the upper-left corner of the screen. (Inherited from UIElement.) | |
GetLeft | Retrieves the number of the leftmost column in the rectangular area that contains a specified child element. | |
GetMargin | Gets the width of the current element's margins. (Inherited from UIElement.) | |
GetPointerTarget | Returns the visible child of this UIElement that contains a specified screen point. (Inherited from UIElement.) | |
GetRenderSize | Gets the final render size of the current element. (Inherited from UIElement.) | |
GetRight | Retrieves the number of the rightmost column in the rectangular area that contains a specified child element. | |
GetTop | Retrieves the row number of the top of the rectangular area that contains a specified child element. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetUnclippedSize | Returns the unclipped size of this element. (Inherited from UIElement.) | |
Invalidate | Invalidates the rendering of the current element and forces a complete new layout pass. (Inherited from UIElement.) | |
InvalidateArrange | Invalidates the arrange state of the current element's layout. (Inherited from UIElement.) | |
InvalidateMeasure | Invalidates the measurement state of the current element's layout. (Inherited from UIElement.) | |
InvalidateRect | Invalidates the specified rectangle. (Inherited from UIElement.) | |
Measure | Determines the size requirements for the layout of a child element. (Inherited from UIElement.) | |
MeasureOverride | Measures the child elements in a canvas in anticipation of arranging them during the ArrangeOverride pass. (Overrides Panel. . :: . .MeasureOverride(Int32, Int32, Int32%, Int32%).) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnButtonDown | Adds class handling for an unhandled ButtonDownEvent attached event when that event reaches, by way of its route, an element that is derived from the UIElement class. (Inherited from UIElement.) | |
OnButtonUp | Adds class handling for an unhandled ButtonUpEvent attached event when that event reaches, by way of its route, an element that is derived from the UIElement class. (Inherited from UIElement.) | |
OnChildDesiredSizeChanged | Supports the layout system when a child element is resized. (Inherited from UIElement.) | |
OnChildrenChanged | Called when the UIElementCollection of this UIElement is edited. (Inherited from UIElement.) | |
OnGenericEvent | Called when this UIElement generates a generic event. (Inherited from UIElement.) | |
OnGotFocus | Adds class handling for an unhandled GotFocusEvent attached event when that event reaches, by way of its route, an element that is derived from the UIElement class. (Inherited from UIElement.) | |
OnLostFocus | Adds class handling for an unhandled LostFocusEvent attached event when that event reaches, by way of its route, an element that is derived from the UIElement class. (Inherited from UIElement.) | |
OnPreviewButtonDown | Adds class handling for an unhandled PreviewButtonDownEvent attached event when that event reaches, by way of its route, an element that is derived from the UIElement class. (Inherited from UIElement.) | |
OnPreviewButtonUp | Adds class handling for an unhandled PreviewButtonUpEvent attached event when that event reaches, by way of its route, an element that is derived from the UIElement class. (Inherited from UIElement.) | |
OnRender | Participates in rendering operations that are directed by the layout system when implemented in a derived class. (Inherited from UIElement.) | |
OnTouchDown | Handles a touch down (or stylus down) event. (Inherited from UIElement.) | |
OnTouchGestureChanged | Handles a TouchGestureChanged event. (Inherited from UIElement.) | |
OnTouchGestureEnded | Handles a TouchGestureEnd event. (Inherited from UIElement.) | |
OnTouchGestureStarted | Handles a TouchGestureStart event. (Inherited from UIElement.) | |
OnTouchMove | Invoked when an unhandled TouchMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from UIElement.) | |
OnTouchUp | Invoked when an unhandled TouchUp attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from UIElement.) | |
PointToClient | Returns the client UIElement that is the top-level ancestor of this UIElement object, and expresses the given point in the coordinate space of that ancestor. (Inherited from UIElement.) | |
PointToScreen | Converts a point expressed in the coordinate space of this UIElement into screen coordinates. (Inherited from UIElement.) | |
RaiseEvent | Raises a specific routed event. (Inherited from UIElement.) | |
RenderRecursive | Renders this element and all its child elements. (Inherited from UIElement.) | |
SetBottom | Sets the row number of the bottom of the rectangular area that contains a specified child element. | |
SetLeft | Sets the number of the leftmost column in the rectangular area that contains a specified child element. | |
SetMargin(Int32) | Sets the size of the current element's margin, using the same (specified) width for each of the four sides of the element. (Inherited from UIElement.) | |
SetMargin(Int32, Int32, Int32, Int32) | Sets the size of the current element's margin, using a specified width for each of the four sides of the element. (Inherited from UIElement.) | |
SetRight | Sets the rightmost column number in the area that contains the specified child element. | |
SetTop | Sets the row number of the top of the area that contains the specified child element. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
UpdateLayout | Ensures that all visual child elements of the current element are properly updated for layout. (Inherited from UIElement.) | |
VerifyAccess | Determines whether the calling thread has access to the current DispatcherObject object. (Inherited from DispatcherObject.) |
Top
Events
Name | Description | |
---|---|---|
IsEnabledChanged | Occurs when the value of the IsEnabled property changes for the current element. (Inherited from UIElement.) | |
IsVisibleChanged | Occurs when the value of the IsVisible property changes for the current element. (Inherited from UIElement.) | |
TouchDown | Occurs when the user initially touches the tablet screen or puts the tip of the stylus onto the tablet screen. (Inherited from UIElement.) | |
TouchGestureChanged | Indicates that a touch or stylus gesture changed. (Inherited from UIElement.) | |
TouchGestureEnd | Indicates that a touch or stylus gesture ended. (Inherited from UIElement.) | |
TouchGestureStart | Indicates that a touch or stylus gesture started. (Inherited from UIElement.) | |
TouchMove | Occurs when the user's finger or stylus moves while it is touching the tablet. (Inherited from UIElement.) | |
TouchUp | Occurs when the user raises their finger or stylus from the touch screen. (Inherited from UIElement.) |
Top
Fields
Name | Description | |
---|---|---|
_horizontalAlignment | Specifies the horizontal alignment characteristics that are applied to the current element when it is composed within a parent element, such as a Panel object. (Inherited from UIElement.) | |
_verticalAlignment | Specifies the vertical alignment characteristics that are applied to the current element when it is composed within a parent element, such as a Panel object. (Inherited from UIElement.) | |
Dispatcher | Contains the Dispatcher object that the current DispatcherObject object is associated with. (Inherited from DispatcherObject.) |
Top
Remarks
A Canvas object represents the canvas element in the layout of a group of user interface elements. Likewise, all of the user interface elements on the canvas are seen as child elements of the canvas and are represented by instances of classes derived from the UIElement class. The Canvas object manages this collection of child elements. The children of a Canvas object are also referred to as child controls.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.