Click or drag to resize
CoronaPanel Class
Corona Xaml control used to execute a Corona project's Lua scripts and render its content via Direct3D.
Inheritance Hierarchy

Namespace: CoronaLabs.Corona.WinRT.Phone
Assembly: CoronaLabs.Corona.Controls.DotNet (in CoronaLabs.Corona.Controls.DotNet.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[ContentPropertyAttribute("Children")]
public class CoronaPanel : UserControl

The CoronaPanel type exposes the following members.

Constructors
  NameDescription
Public methodCoronaPanel
Creates a new Corona panel.
Top
Methods
  NameDescription
Public methodAddHandler
Adds a routed event handler for a specified routed event, adding the handler to the handler collection on the current element. Specify handledEventsToo as true to have the provided handler be invoked for routed event that had already been marked as handled by another element along the event route.
(Inherited from UIElement.)
Public methodApplyTemplate
Loads the relevant control template so that its parts can be referenced.
(Inherited from Control.)
Public methodArrange
Positions child objects and determines a size for a UIElement. Parent objects that implement custom layout for their child elements should call this method from their layout override implementations to form a recursive layout update.
(Inherited from UIElement.)
Protected methodArrangeOverride
Provides the behavior for the Arrange pass of Windows Phone layout. Classes can override this method to define their own Arrange pass behavior.
(Inherited from FrameworkElement.)
Public methodCaptureMouse
Sets touch capture to a UIElement.
(Inherited from UIElement.)
Public methodCheckAccess
Determines whether the calling thread has access to this object.
(Inherited from DependencyObject.)
Public methodClearValue
Clears the local value of a dependency property.
(Inherited from DependencyObject.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFindName
Retrieves an object that has the specified identifier name.
(Inherited from FrameworkElement.)
Public methodFocus
Attempts to set the focus on the control.
(Inherited from Control.)
Public methodGetAnimationBaseValue
Returns any base value established for a Windows Phone dependency property, which would apply in cases where an animation is not active.
(Inherited from DependencyObject.)
Public methodGetBindingExpression
Retrieves the BindingExpression for a dependency property where a binding is established.
(Inherited from FrameworkElement.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Protected methodGetTemplateChild
Retrieves the named element in the instantiated ControlTemplate visual tree.
(Inherited from Control.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValue
Returns the current effective value of a dependency property from a DependencyObject.
(Inherited from DependencyObject.)
Public methodInvalidateArrange
Invalidates the arrange state (layout) for a UIElement. After the invalidation, the UIElement will have its layout updated, which will occur asynchronously.
(Inherited from UIElement.)
Public methodInvalidateMeasure
Invalidates the measurement state (layout) for a UIElement.
(Inherited from UIElement.)
Public methodMeasure
Updates the DesiredSize of a UIElement. Typically, objects that implement custom layout for their layout children call this method from their own MeasureOverride(Size) implementations to form a recursive layout update.
(Inherited from UIElement.)
Protected methodMeasureOverride
Provides the behavior for the Measure pass of Windows Phone layout. Classes can override this method to define their own Measure pass behavior.
(Inherited from FrameworkElement.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodOnApplyTemplate
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.
(Inherited from FrameworkElement.)
Protected methodOnCreateAutomationPeer
When implemented in a derived class, returns class-specific AutomationPeer implementations for the Windows Phone automation infrastructure.
(Inherited from UIElement.)
Protected methodOnDoubleTap
Called before the DoubleTap event occurs.For information on using gestures on Windows Phone, see How to handle manipulation events for Windows Phone.
(Inherited from Control.)
Protected methodOnDragEnter
Called before a drag enter event occurs.
(Inherited from Control.)
Protected methodOnDragLeave
Called before a drag leave event occurs.
(Inherited from Control.)
Protected methodOnDragOver
Called before a drag over event occurs.
(Inherited from Control.)
Protected methodOnDrop
Called before a drop event occurs.
(Inherited from Control.)
Protected methodOnGotFocus
Called before the GotFocus event occurs.
(Inherited from Control.)
Protected methodOnHold
Called before the Hold event occurs.For information on using gestures on Windows Phone, see How to handle manipulation events for Windows Phone.
(Inherited from Control.)
Protected methodOnKeyDown
Called before the KeyDown event occurs.
(Inherited from Control.)
Protected methodOnKeyUp
Called before the KeyUp event occurs.
(Inherited from Control.)
Protected methodOnLostFocus
Called before the LostFocus event occurs.
(Inherited from Control.)
Protected methodOnLostMouseCapture
Called before the LostMouseCapture event occurs to provide handling for the event in a derived class without attaching a delegate.
(Inherited from Control.)
Protected methodOnManipulationCompleted
Called before the ManipulationCompleted event occurs.
(Inherited from Control.)
Protected methodOnManipulationDelta
Called before the ManipulationDelta event occurs.
(Inherited from Control.)
Protected methodOnManipulationStarted
Called before the ManipulationStarted event occurs.
(Inherited from Control.)
Protected methodOnMouseEnter
Called before the MouseEnter event occurs.
(Inherited from Control.)
Protected methodOnMouseLeave
Called before the MouseLeave event occurs.
(Inherited from Control.)
Protected methodOnMouseLeftButtonDown
Called before the MouseLeftButtonDown event occurs.
(Inherited from Control.)
Protected methodOnMouseLeftButtonUp
Called before the MouseLeftButtonUp event occurs.
(Inherited from Control.)
Protected methodOnMouseMove
Called before the MouseMove event occurs.
(Inherited from Control.)
Protected methodOnMouseRightButtonDown
Called before a right mouse button down event occurs.
(Inherited from Control.)
Protected methodOnMouseRightButtonUp
Called before a right mouse button up event occurs.
(Inherited from Control.)
Protected methodOnMouseWheel
Called before the MouseWheel event occurs to provide handling for the event in a derived class without attaching a delegate.
(Inherited from Control.)
Protected methodOnTap
Called before the Tap event occurs.For information on using gestures on Windows Phone, see How to handle manipulation events for Windows Phone.
(Inherited from Control.)
Protected methodOnTextInput
Called before the TextInput event occurs.
(Inherited from Control.)
Protected methodOnTextInputStart (Inherited from Control.)
Protected methodOnTextInputUpdate (Inherited from Control.)
Public methodReadLocalValue
Returns the local value of a dependency property, if a local value is set.
(Inherited from DependencyObject.)
Public methodReleaseMouseCapture
Removes touch capture from a UIElement. After this call, typically no object holds touch capture.
(Inherited from UIElement.)
Public methodRemoveHandler
Removes the specified routed event handler from this UIElement.
(Inherited from UIElement.)
Public methodSetBinding
Attaches a binding to a FrameworkElement, using the provided binding object, and returns a BindingExpressionBase for possible later use.
(Inherited from FrameworkElement.)
Public methodSetValue
Sets the local value of a dependency property on a DependencyObject.
(Inherited from DependencyObject.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTransformToVisual
Returns a transform object that can be used to transform coordinates from the UIElement to the specified object.
(Inherited from UIElement.)
Public methodUpdateLayout
Ensures that all positions of child objects of a UIElement are properly updated for layout.
(Inherited from UIElement.)
Top
Properties
  NameDescription
Public propertyActualHeight
Gets the rendered height of a FrameworkElement.
(Inherited from FrameworkElement.)
Public propertyActualWidth
Gets the rendered width of a FrameworkElement.
(Inherited from FrameworkElement.)
Public propertyAllowDrop
Gets or sets a value that determines whether this UIElement can be a drop target for purposes of drag-and-drop operations.
(Inherited from UIElement.)
Public propertyAutoLaunchEnabled
Sets whether or not this control will automatically start the Corona runtime when loaded onto the page.
Public propertyAutoLaunchSettings

Gets the settings to be used when this control automatically starts up the Corona runtime when loaded onto the page.

Only applicable when the AutoLaunchEnabled property has been set to true.

Public propertyBackground
Gets or sets a brush that provides the background of the control.
(Inherited from Control.)
Public propertyBackgroundContentProvider
Gets an object used to render content to a DrawingSurfaceBackgroundGrid Xaml control if the BackgroundRenderingEnabled property is set to true.
Public propertyBackgroundManipulationHandler
Gets an object used to receive touch input from a DrawingSurfaceBackgroundGrid Xaml control if the BackgroundRenderingEnabled property is set to true.
Public propertyBackgroundRenderingEnabled
Gets or sets whether or not Corona will render content within this control's bounds or to a DrawingSurfaceBackgroundGrid Xaml control.
Public propertyBorderBrush
Gets or sets a brush that describes the border background of a control.
(Inherited from Control.)
Public propertyBorderThickness
Gets or sets the border thickness of a control.
(Inherited from Control.)
Public propertyCacheMode
Gets or sets a value that indicates that rendered content should be cached when possible.
(Inherited from UIElement.)
Public propertyCharacterSpacing
Gets or sets the distance between characters of text in the control measured in 1000ths of the font size.
(Inherited from Control.)
Public propertyChildren
Gets a collection of child UI elements/control to be displayed within the Corona panel's bounds.
Public propertyClip
Gets or sets the Geometry used to define the outline of the contents of a UIElement.
(Inherited from UIElement.)
Public propertyContent
Gets or sets the content that is contained within a user control.
(Inherited from UserControl.)
Public propertyCursor
Gets or sets the cursor image that displays while the pointer is over a FrameworkElement.
(Inherited from FrameworkElement.)
Public propertyDataContext
Gets or sets the data context for a FrameworkElement when it participates in data binding.
(Inherited from FrameworkElement.)
Protected propertyDefaultStyleKey
Gets or sets the key that references the default style for the control.
(Inherited from Control.)
Public propertyDesiredSize
Gets the size that this UIElement computed during the measure pass of the layout process.
(Inherited from UIElement.)
Public propertyDispatcher
Gets the Dispatcher this object is associated with.
(Inherited from DependencyObject.)
Public propertyFlowDirection
Gets or sets the direction that text and other user interface elements flow within any parent element that controls their layout.
(Inherited from FrameworkElement.)
Public propertyFontFamily
Gets or sets the font used to display text in the control.
(Inherited from Control.)
Public propertyFontSize
Gets or sets the size of the text in this control.
(Inherited from Control.)
Public propertyFontStretch
Gets or sets the degree to which a font is condensed or expanded on the screen.
(Inherited from Control.)
Public propertyFontStyle
Gets or sets the style in which the text is rendered.
(Inherited from Control.)
Public propertyFontWeight
Gets or sets the thickness of the specified font.
(Inherited from Control.)
Public propertyForeground
Gets or sets a brush that describes the foreground color.
(Inherited from Control.)
Public propertyHeight
Gets or sets the suggested height of a FrameworkElement.
(Inherited from FrameworkElement.)
Public propertyHorizontalAlignment
Gets or sets the horizontal alignment characteristics that are applied to a FrameworkElement when it is composed in a layout parent, such as a panel or items control.
(Inherited from FrameworkElement.)
Public propertyHorizontalContentAlignment
Gets or sets the horizontal alignment of the control's content.
(Inherited from Control.)
Public propertyIsEnabled
Gets or sets a value indicating whether the user can interact with the control.
(Inherited from Control.)
Public propertyIsHitTestVisible
Gets or sets whether the contained area of this UIElement can return true values for hit testing.
(Inherited from UIElement.)
Public propertyIsTabStop
Gets or sets a value that indicates whether a control is included in tab navigation.
(Inherited from Control.)
Public propertyLanguage
Gets or sets localization/globalization language information that applies to a FrameworkElement.
(Inherited from FrameworkElement.)
Public propertyMargin
Gets or sets the outer margin of a FrameworkElement.
(Inherited from FrameworkElement.)
Public propertyMaxHeight
Gets or sets the maximum height constraint of a FrameworkElement.
(Inherited from FrameworkElement.)
Public propertyMaxWidth
Gets or sets the maximum width constraint of a FrameworkElement.
(Inherited from FrameworkElement.)
Public propertyMinHeight
Gets or sets the minimum height constraint of a FrameworkElement.
(Inherited from FrameworkElement.)
Public propertyMinWidth
Gets or sets the minimum width constraint of a FrameworkElement.
(Inherited from FrameworkElement.)
Public propertyName
Gets or sets the identifying name of the object. When a XAML processor creates the object tree from XAML markup, run-time code can refer to the XAML-declared object by this name.
(Inherited from FrameworkElement.)
Public propertyOpacity
Gets or sets the degree of the object's opacity.
(Inherited from UIElement.)
Public propertyOpacityMask
Gets or sets the brush used to alter the opacity of regions of this object.
(Inherited from UIElement.)
Public propertyPadding
Gets or sets the padding inside a control.
(Inherited from Control.)
Public propertyParent
Gets the parent object of this FrameworkElement in the object tree.
(Inherited from FrameworkElement.)
Public propertyProjection
Gets or sets the perspective projection (3-D effect) to apply when rendering this UIElement.
(Inherited from UIElement.)
Public propertyRenderSize
Gets the final render size of a UIElement.
(Inherited from UIElement.)
Public propertyRenderSurface
Gets the 3D rendering surface that the Corona runtime renders to.
Public propertyRenderTransform
Gets or sets transform information that affects the rendering position of a UIElement.
(Inherited from UIElement.)
Public propertyRenderTransformOrigin
Gets or sets the origin point of any possible render transform declared by RenderTransform, relative to the bounds of the UIElement.
(Inherited from UIElement.)
Public propertyResources
Gets the locally defined resource dictionary. In XAML, you can establish resource items as child object elements of a frameworkElement.Resources property element, through XAML implicit collection syntax.
(Inherited from FrameworkElement.)
Public propertyRuntime
Gets a Corona runtime used to run, suspend, resume, and terminate a Corona project.
Public propertyStyle
Gets or sets an instance Style that is applied for this object during rendering.
(Inherited from FrameworkElement.)
Public propertyTabIndex
Gets or sets a value that determines the order in which elements receive focus when the user navigates through controls by using the TAB key.
(Inherited from Control.)
Public propertyTabNavigation
Gets or sets a value that modifies how tabbing and TabIndex work for this control.
(Inherited from Control.)
Public propertyTag
Gets or sets an arbitrary object value that can be used to store custom information about this object.
(Inherited from FrameworkElement.)
Public propertyTemplate
Gets or sets a control template.
(Inherited from Control.)
Public propertyTriggers
Gets the collection of triggers for animations that are defined for a FrameworkElement.
(Inherited from FrameworkElement.)
Public propertyUseLayoutRounding
Gets or sets a value that determines whether rendering for the object and its visual subtree should use rounding behavior that aligns rendering to whole pixels.
(Inherited from UIElement.)
Public propertyUseOptimizedManipulationRouting
Gets or sets a value that indicates whether the system should handle input events or whether the FrameworkElement should handle input events.
(Inherited from FrameworkElement.)
Public propertyVerticalAlignment
Gets or sets the vertical alignment characteristics that are applied to a FrameworkElement when it is composed in a parent object such as a panel or items control.
(Inherited from FrameworkElement.)
Public propertyVerticalContentAlignment
Gets or sets the vertical alignment of the control's content.
(Inherited from Control.)
Public propertyVisibility
Gets or sets the visibility of a UIElement. A UIElement that is not visible does not render and does not communicate its desired size to layout.
(Inherited from UIElement.)
Public propertyWidth
Gets or sets the width of a FrameworkElement.
(Inherited from FrameworkElement.)
Top
Events
  NameDescription
Public eventBindingValidationError
Occurs when a data validation error is reported by a binding source.
(Inherited from FrameworkElement.)
Public eventDoubleTap
Occurs when a DoubleTap gesture is committed while over this UIElement.For information on using gestures on Windows Phone, see How to handle manipulation events for Windows Phone.
(Inherited from UIElement.)
Public eventGotFocus
Occurs when a UIElement receives focus.
(Inherited from UIElement.)
Public eventHold
Occurs when a Hold gesture is committed while over this UIElement.For information on using gestures on Windows Phone, see How to handle manipulation events for Windows Phone.
(Inherited from UIElement.)
Public eventIsEnabledChanged (Inherited from Control.)
Public eventKeyDown
Occurs when a keyboard key is pressed while the UIElement has focus.
(Inherited from UIElement.)
Public eventKeyUp
Occurs when a keyboard key is released while the UIElement has focus.
(Inherited from UIElement.)
Public eventLayoutUpdated
Occurs when the layout of the Windows Phone visual tree changes.
(Inherited from FrameworkElement.)
Public eventLoaded
Occurs when a FrameworkElement has been constructed and added to the object tree.
(Inherited from FrameworkElement.)
Public eventLostFocus
Occurs when a UIElement loses focus.
(Inherited from UIElement.)
Public eventLostMouseCapture
Occurs when the UIElement loses touch capture.
(Inherited from UIElement.)
Public eventManipulationCompleted
Occurs when a manipulation and inertia on the UIElement is complete. For information on using manipulations, see How to handle manipulation events for Windows Phone.
(Inherited from UIElement.)
Public eventManipulationDelta
Occurs when the input device changes position during a manipulation. For information on using manipulations, see How to handle manipulation events for Windows Phone.
(Inherited from UIElement.)
Public eventManipulationStarted
Occurs when an input device begins a manipulation on the UIElement. For information on using manipulations, see How to handle manipulation events for Windows Phone.
(Inherited from UIElement.)
Public eventMouseEnter
Occurs when a screen tap occurs within the bounding area of a UIElement.
(Inherited from UIElement.)
Public eventMouseLeave
Occurs when a touch event occurs outside the bounding area of a UIElement.
(Inherited from UIElement.)
Public eventMouseLeftButtonDown
Occurs when a UIElement is tapped.
(Inherited from UIElement.)
Public eventMouseLeftButtonUp
Occurs when the finger is lifted off of a UIElement (or while a UIElement holds touch capture).
(Inherited from UIElement.)
Public eventMouseMove
Occurs when the coordinate position of the finger on the screenwhile touching a UIElement (or while a UIElement holds touch capture).
(Inherited from UIElement.)
Public eventMouseWheel
Occurs when the user rotates the mouse wheel while the mouse pointer is over a UIElement, or the UIElement has focus.
(Inherited from UIElement.)
Public eventSizeChanged
Occurs when either the ActualHeight or the ActualWidth properties change value on a FrameworkElement.
(Inherited from FrameworkElement.)
Public eventTap
Occurs when a Tap gesture is committed while over this UIElement.For information on using gestures on Windows Phone, see How to handle manipulation events for Windows Phone.
(Inherited from UIElement.)
Public eventTextInput
Occurs when a UI element gets text in a device-independent manner.
(Inherited from UIElement.)
Public eventTextInputStart
Occurs when a UI element initially gets text in a device-independent manner.
(Inherited from UIElement.)
Public eventTextInputUpdate
Occurs when text continues to be composed via an input method editor (IME).
(Inherited from UIElement.)
Public eventUnloaded
Occurs when this object is no longer connected to the main object tree.
(Inherited from FrameworkElement.)
Top
Remarks

In order to have this control run a Corona project, you must access this control's Runtime property and call its Run method. By default, this method will attempt to find and execute a Corona "main.lua" or "resource.car" file under the application's "Assets\Corona" directory. If you are a "CoronaCards" developer, then you can provide a different path to one of these files via the RunUsing method.

This control will automatically suspend the Corona runtime when the application becomes suspended and will automatically resume the Corona runtime when the application resumes.

This control will automatically terminate the Corona runtime (i.e.: raise an "applicationExit" event in Lua), when the control has been removed from the application page or when the end-user backs out of the page that is hosting the Corona control.

This control can render content in one of two ways:

  1. By default, content will be rendered within the bounds of the control. The advantage of this method is that the control and its content are resizable and can be displayed along with other controls on the page. The disadvantage of this method is that this has poor rendering performance because content is rendered to a Direct3D texture on every frame.
  2. For best performance (i.e.: highest framerate possible) you can render content to a Xaml DrawingSurfaceBackgroundGrid control, which renders content fullscreen in the background. You can do this by setting this control's BackgroundRenderingEnabled property to true and passing the objects returned by properties BackgroundContentProvider and BackgroundManipulationHandler to the DrawingSurfaceBackgroundGrid. By doing this, the Corona control's background becomes invisible, but it will still display its child controls placed inside of it (see below).

This Corona control can also be a container for other Xaml controls via the Children property. You can also drag and drop Xaml controls within this control via the Visual Studio designer. When creating controls via Corona's native APIs in Lua such as text fields and web views, these controls are placed within the Corona control. If you are rendering Corona content fullscreen via a DrawingSurfaceBackgroundGrid, then it is highly recommended to display this Corona control fullscreen because its child controls are positioned relative to the coordinates within the Corona control.

See Also