5 using System.Windows.Controls.Primitives;
6 using System.Windows.Interactivity;
8 using SiliconStudio.ActionStack;
10 namespace SiliconStudio.Presentation.Behaviors
20 AssociatedObject.DragStarted += DragStarted;
21 AssociatedObject.DragCompleted += DragCompleted;
26 AssociatedObject.DragStarted -= DragStarted;
27 AssociatedObject.DragCompleted -= DragCompleted;
30 protected virtual void DragStarted(
object sender, DragStartedEventArgs e)
34 ActionStack.BeginTransaction();
38 protected virtual void DragCompleted(
object sender, DragCompletedEventArgs e)
42 var items = ActionStack.GetCurrentTransactions();
47 var name = items.First().Name;
48 ActionStack.EndTransaction(name);
53 ActionStack.DiscardTransaction();
This class is an implementation of the ITransactionalActionStack interface.
override void OnAttached()
virtual void DragCompleted(object sender, DragCompletedEventArgs e)
override void OnDetaching()
This class represents a thread-safe stack of action items that can be undone/redone.
virtual void DragStarted(object sender, DragStartedEventArgs e)