Skip to content

Display EffectCopyAdornerTemplate during drag #238

Closed

Description

@kermitthegreat

hi,

is it possible right now to display the above mentioned DataTemplate while dragging even though the underlying element is not a drop target?

take the attached screencast as an example please.

my code looks like this right now:

<availableActions:AvailableWorkflowAction x:Class="SteadySuite.SteadyPrint.WorkflowUi.ActionUiWrapper.AvailableActions.AvailablePrintActionUiWrapper"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"
    xmlns:availableActions="clr-namespace:SteadySuite.SteadyPrint.WorkflowUi.ActionUiWrapper.AvailableActions"
    xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
    DataContext="{Binding RelativeSource={RelativeSource Self}}"
    dd:DragDrop.IsDragSource="True"
    dd:DragDrop.IsDropTarget="False">
    <dd:DragDrop.EffectMoveAdornerTemplate>
        <DataTemplate>
            <Border CornerRadius="8" Background="{Binding BackgroundColorBrush}" Margin="8">
                <Border.LayoutTransform>
                    <ScaleTransform ScaleX="0.3" ScaleY="0.3"/>
                </Border.LayoutTransform>
                <dxlc:LayoutGroup Orientation="Vertical" Margin="10">
                    <TextBlock FontSize="16" FontFamily="Segoe UI" Foreground="{Binding FontColorBrush}" Text="{Binding Caption}" VerticalAlignment="Top" Margin="0,0,0,10"/>
                    <TextBlock FontSize="11" FontFamily="Segoe UI" Foreground="{Binding FontColorBrush}" Text="{Binding Description}" VerticalAlignment="Top" TextTrimming="WordEllipsis" TextWrapping="Wrap"/>
                </dxlc:LayoutGroup>
            </Border>
        </DataTemplate>
    </dd:DragDrop.EffectMoveAdornerTemplate>

off topic: what is the difference and how do i differentiate between the different AdornerTemplates? (EffectCopyAdornerTemplate, DragAdornerTemplate, EffectMoveAdornerTemplate a.s.o.)

thanks in advance.

Activity

  1. kermitthegreat commented on Mar 28, 2017

    @kermitthegreat
    Author

    looks like attaching a .zip file doesnt work for whatever reason.

    please rename the attached file to .zip
    ice_video_20170328-104009

  2. kermitthegreat commented on Apr 11, 2017

    @kermitthegreat
    Author

    @punker76 any comments on this would be helpful, so i can evaluate for our upcoming release if this is going to work or not :)

    thanks in advance.

    btw a great framework. greetings from siegen ;)

  3. punker76 commented on Apr 20, 2017

    @punker76
    Owner

    @kermitthegreat I'll give you some feedback very soon. Sorry for delay.

  4. mangoyoga80 commented on May 12, 2020

    @mangoyoga80

    @punker76 Do you have any news in this issue of display the (default) drag adorner even when dragging over areas that don't accept drop?

  5. Repository owner locked and limited conversation to collaborators on Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions