private void OnGlobalDragComplete(object sender, DragHelperEventArgs e) { if (_trashCan.IsOpen) { if (_trashIcon != null) { _trashIcon.RenderTransform.BeginAnimation(ScaleTransform.ScaleXProperty, BuildPopupAnimation(1, 0)); _trashIcon.RenderTransform.BeginAnimation(ScaleTransform.ScaleYProperty, BuildPopupAnimation(1.0, 0.0, (o, e2) => _trashCan.IsOpen = false)); } else { _trashCan.IsOpen = false; } } }
private void OnGlobalDragStarted(object sender, DragHelperEventArgs e) { var dragData = e.Data.GetData("Droppy.WidgetSiteDragDropData") as WidgetSiteDragDropData; if (dragData != null && dragData.Widget != null) { _trashCan.Placement = PlacementMode.Left; _trashCan.PlacementTarget = dragData.Site; _trashCan.IsOpen = true; if (_trashIcon != null) { _trashIcon.RenderTransform.BeginAnimation(ScaleTransform.ScaleXProperty, BuildPopupAnimation(0.0, 1.0)); _trashIcon.RenderTransform.BeginAnimation(ScaleTransform.ScaleYProperty, BuildPopupAnimation(0.0, 1.0)); } } }
private void OnGlobalDragComplete( object sender, DragHelperEventArgs e ) { if( _trashCan.IsOpen ) { if( _trashIcon != null ) { _trashIcon.RenderTransform.BeginAnimation( ScaleTransform.ScaleXProperty, BuildPopupAnimation( 1, 0 ) ); _trashIcon.RenderTransform.BeginAnimation( ScaleTransform.ScaleYProperty, BuildPopupAnimation( 1.0, 0.0, ( o, e2 ) => _trashCan.IsOpen = false ) ); } else { _trashCan.IsOpen = false; } } }
private void OnGlobalDragStarted( object sender, DragHelperEventArgs e ) { var dragData = e.Data.GetData( "Droppy.WidgetSiteDragDropData" ) as WidgetSiteDragDropData; if( dragData != null && dragData.Widget != null ) { _trashCan.Placement = PlacementMode.Left; _trashCan.PlacementTarget = dragData.Site; _trashCan.IsOpen = true; if( _trashIcon != null ) { _trashIcon.RenderTransform.BeginAnimation( ScaleTransform.ScaleXProperty, BuildPopupAnimation( 0.0, 1.0 ) ); _trashIcon.RenderTransform.BeginAnimation( ScaleTransform.ScaleYProperty, BuildPopupAnimation( 0.0, 1.0 ) ); } } }