C# Class WPFSpark.FluidWrapPanel

Inheritance: Windows.UI.Xaml.Controls.Panel
显示文件 Open project: TNOCS/csTouch Class Usage Examples

Public Properties

Property Type Description
DragEasingProperty Windows.UI.Xaml.DependencyProperty
DragOpacityProperty Windows.UI.Xaml.DependencyProperty
DragScaleProperty Windows.UI.Xaml.DependencyProperty
ElementEasingProperty Windows.UI.Xaml.DependencyProperty
IsComposingProperty Windows.UI.Xaml.DependencyProperty
ItemHeightProperty Windows.UI.Xaml.DependencyProperty
ItemWidthProperty Windows.UI.Xaml.DependencyProperty
ItemsSourceProperty Windows.UI.Xaml.DependencyProperty
OrientationProperty Windows.UI.Xaml.DependencyProperty
fluidElements List

Public Methods

Method Description
FluidWrapPanel ( ) : System

Ctor

Protected Methods

Method Description
ArrangeOverride ( Size finalSize ) : Size

Override for the Arrange Layout Phase

MeasureOverride ( Size availableSize ) : Size

Override for the Measure Layout Phase

OnDragEasingChanged ( EasingFunctionBase oldDragEasing, EasingFunctionBase newDragEasing ) : void

Provides derived classes an opportunity to handle changes to the DragEasing property.

OnDragOpacityChanged ( double oldDragOpacity, double newDragOpacity ) : void

Provides derived classes an opportunity to handle changes to the DragOpacity property.

OnDragScaleChanged ( double oldDragScale, double newDragScale ) : void

Provides derived classes an opportunity to handle changes to the DragScale property.

OnElementEasingChanged ( EasingFunctionBase oldElementEasing, EasingFunctionBase newElementEasing ) : void

Provides derived classes an opportunity to handle changes to the ElementEasing property.

OnIsComposingChanged ( bool oldIsComposing, bool newIsComposing ) : void

Provides derived classes an opportunity to handle changes to the IsComposing property.

OnItemHeightChanged ( double oldItemHeight, double newItemHeight ) : void

Provides derived classes an opportunity to handle changes to the ItemHeight property.

OnItemWidthChanged ( double oldItemWidth, double newItemWidth ) : void

Provides derived classes an opportunity to handle changes to the ItemWidth property.

OnItemsSourceChanged ( IEnumerable oldItemsSource, IEnumerable newItemsSource ) : void

Provides derived classes an opportunity to handle changes to the ItemsSource property.

OnOrientationChanged ( Orientation oldOrientation, Orientation newOrientation ) : void

Provides derived classes an opportunity to handle changes to the Orientation property.

Private Methods

Method Description
AddChildToFluidElements ( UIElement child ) : void

Adds the child to the fluidElements collection and initializes its RenderTransform.

BeginFluidDrag ( UIElement child, Point position ) : void

Handler for the event when the user starts dragging the dragElement.

ClearItemsSource ( ) : void

Removes all the children from the FluidWrapPanel

CoerceDragOpacity ( DependencyObject d, object value ) : object

Coerces the FluidDrag Opacity to an acceptable value

EndFluidDrag ( UIElement child, Point position, Point positionInParent ) : void

Handler for the event when the user stops dragging the dragElement and releases it.

FluidDrag ( UIElement child, Point position, Point positionInParent ) : void

Handler for the event when the user drags the dragElement.

InitializeArrange ( ) : void

Intializes the arrangement of the children

OnDragEasingChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the DragEasing property.

OnDragOpacityChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the DragOpacity property.

OnDragScaleChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the DragScale property.

OnElementEasingChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the ElementEasing property.

OnIsComposingChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the IsComposing property.

OnItemHeightChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the ItemHeight property.

OnItemWidthChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the ItemWidth property.

OnItemsSourceChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the ItemsSource property.

OnOrientationChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the Orientation property.

UpdateDragElementIndex ( int newIndex ) : bool

Moves the dragElement to the new Index

UpdateFluidLayout ( bool showEasing = true ) : void

Iterates through all the fluid elements and animate their movement to their new location.

Method Details

ArrangeOverride() protected method

Override for the Arrange Layout Phase
protected ArrangeOverride ( Size finalSize ) : Size
finalSize Windows.Foundation.Size Available size provided by the FluidWrapPanel
return Windows.Foundation.Size

FluidWrapPanel() public method

Ctor
public FluidWrapPanel ( ) : System
return System

MeasureOverride() protected method

Override for the Measure Layout Phase
protected MeasureOverride ( Size availableSize ) : Size
availableSize Windows.Foundation.Size Available Size
return Windows.Foundation.Size

OnDragEasingChanged() protected method

Provides derived classes an opportunity to handle changes to the DragEasing property.
protected OnDragEasingChanged ( EasingFunctionBase oldDragEasing, EasingFunctionBase newDragEasing ) : void
oldDragEasing Windows.UI.Xaml.Media.Animation.EasingFunctionBase Old Value
newDragEasing Windows.UI.Xaml.Media.Animation.EasingFunctionBase New Value
return void

OnDragOpacityChanged() protected method

Provides derived classes an opportunity to handle changes to the DragOpacity property.
protected OnDragOpacityChanged ( double oldDragOpacity, double newDragOpacity ) : void
oldDragOpacity double Old Value
newDragOpacity double New Value
return void

OnDragScaleChanged() protected method

Provides derived classes an opportunity to handle changes to the DragScale property.
protected OnDragScaleChanged ( double oldDragScale, double newDragScale ) : void
oldDragScale double Old Value
newDragScale double New Value
return void

OnElementEasingChanged() protected method

Provides derived classes an opportunity to handle changes to the ElementEasing property.
protected OnElementEasingChanged ( EasingFunctionBase oldElementEasing, EasingFunctionBase newElementEasing ) : void
oldElementEasing Windows.UI.Xaml.Media.Animation.EasingFunctionBase Old Value
newElementEasing Windows.UI.Xaml.Media.Animation.EasingFunctionBase New Value
return void

OnIsComposingChanged() protected method

Provides derived classes an opportunity to handle changes to the IsComposing property.
protected OnIsComposingChanged ( bool oldIsComposing, bool newIsComposing ) : void
oldIsComposing bool Old Value
newIsComposing bool New Value
return void

OnItemHeightChanged() protected method

Provides derived classes an opportunity to handle changes to the ItemHeight property.
protected OnItemHeightChanged ( double oldItemHeight, double newItemHeight ) : void
oldItemHeight double Old Value
newItemHeight double New Value
return void

OnItemWidthChanged() protected method

Provides derived classes an opportunity to handle changes to the ItemWidth property.
protected OnItemWidthChanged ( double oldItemWidth, double newItemWidth ) : void
oldItemWidth double Old Value
newItemWidth double New Value
return void

OnItemsSourceChanged() protected method

Provides derived classes an opportunity to handle changes to the ItemsSource property.
protected OnItemsSourceChanged ( IEnumerable oldItemsSource, IEnumerable newItemsSource ) : void
oldItemsSource IEnumerable Old Value
newItemsSource IEnumerable New Value
return void

OnOrientationChanged() protected method

Provides derived classes an opportunity to handle changes to the Orientation property.
protected OnOrientationChanged ( Orientation oldOrientation, Orientation newOrientation ) : void
oldOrientation Orientation Old Value
newOrientation Orientation New Value
return void

Property Details

DragEasingProperty public_oe static_oe property

DragEasing Dependency Property
public static DependencyProperty,Windows.UI.Xaml DragEasingProperty
return Windows.UI.Xaml.DependencyProperty

DragOpacityProperty public_oe static_oe property

DragOpacity Dependency Property
public static DependencyProperty,Windows.UI.Xaml DragOpacityProperty
return Windows.UI.Xaml.DependencyProperty

DragScaleProperty public_oe static_oe property

DragScale Dependency Property
public static DependencyProperty,Windows.UI.Xaml DragScaleProperty
return Windows.UI.Xaml.DependencyProperty

ElementEasingProperty public_oe static_oe property

ElementEasing Dependency Property
public static DependencyProperty,Windows.UI.Xaml ElementEasingProperty
return Windows.UI.Xaml.DependencyProperty

IsComposingProperty public_oe static_oe property

IsComposing Dependency Property
public static DependencyProperty,Windows.UI.Xaml IsComposingProperty
return Windows.UI.Xaml.DependencyProperty

ItemHeightProperty public_oe static_oe property

ItemHeight Dependency Property
public static DependencyProperty,Windows.UI.Xaml ItemHeightProperty
return Windows.UI.Xaml.DependencyProperty

ItemWidthProperty public_oe static_oe property

ItemWidth Dependency Property
public static DependencyProperty,Windows.UI.Xaml ItemWidthProperty
return Windows.UI.Xaml.DependencyProperty

ItemsSourceProperty public_oe static_oe property

ItemsSource Dependency Property
public static DependencyProperty,Windows.UI.Xaml ItemsSourceProperty
return Windows.UI.Xaml.DependencyProperty

OrientationProperty public_oe static_oe property

Orientation Dependency Property
public static DependencyProperty,Windows.UI.Xaml OrientationProperty
return Windows.UI.Xaml.DependencyProperty

fluidElements public_oe property

public List fluidElements
return List