Share via


IXRStackPanel (Compact 2013)

3/28/2014

This class represents a surface that arranges child elements into a single line that can be oriented either horizontally or vertically.

Syntax

class IXRStackPanel : public IXRPanel

Inheritance Hierarchy

IXRDependencyObject

    IXRUIElement

        IXRFrameworkElement

            IXRPanel

                IXRStackPanel

Methods

Method

Description

IXRStackPanel::GetOrientation

Retrieves the dimension by which child elements are stacked on this panel.

IXRStackPanel::SetOrientation

Sets the dimension by which child elements are stacked on this panel.

Thread Safety

Members of this class are thread-safe if you previously called IXRApplication::CreateHostFromXaml and supplied it with an XRWindowCreateParams structure that has AllowsMultipleThreadAccess set to true.

Remarks

A stack-panel object is useful if you want to arrange a set of child objects in a vertical list or a horizontal list. For example, you can create a stack panel to display a menu of items either horizontally or vertically on-screen.

To add the IXRUIElement child elements that you have created and want to arrange on this stack panel, you can call the inherited method IXRPanel::GetChildren to retrieve an IXRUIElementCollection object. Then, use the methods on that retrieved collection object to add those child elements.

When you create a class instance, use an IXRStackPanelPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.

You can also define a stack-panel object in Microsoft Silverlight 3 XAML. For information about the differences between XAML in XAML for Windows Embedded and Silverlight 3, see Differences Between Microsoft Silverlight 3 and XAML for Windows Embedded. For more information about how to define this element in the source XAML for your application, see the StackPanel Class on MSDN.

.NET Framework Equivalent

System.Windows.Controls.StackPanel

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for UI Element Management