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.
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).
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.
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.
The following table summarizes the members exposed in this class.
|UXStackPanel Constructor()||Initializes a new instance of the UXStackPanel class.|
|Orientation||Gets or sets the dimension by which child elements are stacked.|
|Sensitivity||Gets or sets a value that determine the distance between drag item and the nearest item that triggered the move action.|
|OrientationProperty||Identifies the Orientation dependency property.|
|SensitivityProperty||Identifies the Sensitivity dependency property.|
|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.|
|ArrangeOverride(Size)||Provides the behavior for the Arrange pass of Silverlight layout.|
|MeasureOverride(Size)||Provides the behavior for the Measure pass of Silverlight layout.|