Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


UXStackPanel is a stack panel with sophisticated drag-drop features. It implements fluid animation, a built-in UX feature that shows smooth movement when the children of the UXStackPanel is UXStackPanel is being moved, removed or added.

Working with Orientation Property

The following example demonstrates how to use a UXStackPanel to create a set of vertically-positioned buttons. For horizontal positioning, set the Orientation property to Horizontal.

Code Block
<Intersoft:UXStackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
    <Button Content="Button1" Width="80"/>
    <Button Content="Button2" Width="80"/>
    <Button Content="Button3" Width="80"/>

Image Added

Working with Sensitivity Property

In a standard drag and drop experience, you move an element half way of its actual dimension to start reordering the element. This is determined by the Sensitivity property (default value is 0.5).

Image Added

If you change the Sensitivity property to 0.3, you need to move the element a little bit further until it reach the yellow area.

Image Added

Note that if you are moving the element from right to left direction, you need to move it until the left yellow area and vice versa.


public class UXStackPanel : UXPanel, IStackPanel


The following table summarizes the members exposed in this class.

Public Constructors

UXStackPanel Constructor()Initializes a new instance of the UXStackPanel class.

Public Properties

OrientationGets or sets the dimension by which child elements are stacked.
SensitivityGets or sets a value that determine the distance between drag item and the nearest item that triggered the move action.

Protected Properties

ProductProduct Info.


OrientationPropertyIdentifies the Orientation dependency property.
SensitivityPropertyIdentifies the Sensitivity dependency property.

Public Methods

AddChild(int, FrameworkElement)Add new element into specified index.
MoveChild(int, int)Move the element from current index to target index.
RemoveChild(UIElement)Removed the UIElement from UXPanel.
RemoveChild(int)Removed the UIElement at indext position from UXPanel.

Protected Methods

ArrangeOverride(Size)Provides the behavior for the Arrange pass of Silverlight layout.
MeasureOverride(Size)Provides the behavior for the Measure pass of Silverlight layout.