i got a problem with the Librarystack drop event. I need to change the behaviour of the drop on a librarystack, but when i bind the drop event in xaml the event is never raised!
<s:LibraryStack AllowDrop="True" Drop="infoStack_Drop_1" PreviewDrop="infoStack_Drop_1" x:Name="infoStack" Canvas.Left="1" Canvas.Top="140" Height="280.5" Width="329" Background="Transparent">
Another question: Can i change the style of disabled SurfaceTextBoxes?
I believe this should solve your problem:
http://msdn.microsoft.com/en-us/library/ff727842.aspx
"Changing the Default Drag-and-Drop Behavior By default, when an item is dragged from the LibraryBar control and dropped onto another control, it remains in the LibraryBar control in an inactive (dimmed) state. You can change this behavior by attaching a PreviewDropEvent event handler to the target control."
C#
#region AddPreviewDropHandler
//Add the preview drop event to the stack
SurfaceDragDrop.AddPreviewDropHandler(MainLibraryStack, OnPreviewDrop);
#endregion
"When the dragged item is dropped on the LibraryStack control, the attached event is raised. In the event handler, check to see if the DragSource property belongs to the source LibraryBar control. If it does, change the Effects property to DragDropEffects so the item is removed from the source LibraryBar control."
C#
#region OnPreviewDrop
//Add what stack effects you want here
private void OnPreviewDrop(object sender, SurfaceDragDropEventArgs e)
{
if (MainLibraryBar.IsAncestorOf(e.Cursor.DragSource))
{
e.Effects = DragDropEffects.Move;
}
}
#endregion