Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
245
Drag image position
posted

I am able to drag a legend within a XamDataChart. The problem is on subsequent drags the ghost image of the legend gets further away from the cursor. The cursor is in the right spot but the opaque legend is not after the first drag. How do you position the ghost image?

<Grid x:Name="LineGrid" Background="White">
<ig:XamDataChart x:Name="LineChart"
DefaultInteraction="DragZoom"
HorizontalZoomable="True"
HorizontalZoombarVisibility="Visible"
VerticalZoomable="True"
VerticalZoombarVisibility="Visible"
Legend="{Binding ElementName=LineLegend}"
PropertyChanged="OnPropertyChanged">
<ig:DragDropManager.DropTarget>
<ig:DropTarget IsDropTarget="True" DropChannels="ChannelLegend"/>
</ig:DragDropManager.DropTarget>
</ig:XamDataChart >
<ig:Legend x:Name="LineLegend"
Content="Legend"
HorizontalAlignment="Left"
Margin="10,10,0,0"
PreviewMouseDown="legend_MouseLeftButtonDown">
<ig:DragDropManager.DragSource>
<ig:DragSource IsDraggable="True" DragChannels="ChannelLegend" Drop="DragSource_Drop">
<ig:DragSource.MoveCursorTemplate>
<DataTemplate>
<Ellipse Fill="Green" Width="50" Height="50" />
</DataTemplate>
</ig:DragSource.MoveCursorTemplate>
</ig:DragSource>
</ig:DragDropManager.DragSource>
</ig:Legend>
</Grid>

Parents
No Data
Reply
  • 34810
    Offline posted

    Hello Jason,

    I have been investigating into this issue that you are reporting, but at the moment, I can't seem to reproduce this behavior that you are seeing. The behavior I am currently seeing is that the Legend of the XamDataChart is dragged, and the "ghost" image of the Legend appears relative to the mouse click and drag that started the dragging operation.

    I have attached the sample project I used to test this.  Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.

    If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using.  My test was performed using version 16.1.20161.2056 in Infragistics for WPF 2016 Volume 1.

    If the project does show the product feature working correctly, this indicates a possible problem in the code of your application.  It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.

    Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer

    XamDataChartDragLegend.zip
Children