This is a migrated thread and some comments may be shown as answers.

MouseDown event not working for VisualizationLayer DataTemplate

1 Answer 150 Views
Map
This is a migrated thread and some comments may be shown as answers.
Vincent
Top achievements
Rank 1
Vincent asked on 29 Jul 2015, 02:24 AM

Hi,

 Hi i am trying to receive the MouseDown event from the local:Marker which I have created using a user control. The MouseDown event will be used to determine when to drag the marker, log other information as well as performing image change.
I have tested the local:Marker user control without using any telerik codes purely to find out if the MouseDown event works and the result was fine, the user control is able to bubble up the event.

However when i integrate the user control into the DataTemplate, I was not able to receive any form of MouseDown event. Any explaination or ways to over come this?

 

<telerik:RadMap x:Name="OsmMap"
Center="30.335,143.183"
GeoBoundsNW="85,-180"
GeoBoundsSE="-85,180"
ZoomLevel="10"
TouchDown="OnMap_TouchDown"
MouseDown="OnMap_OnMouseDown"
ZoomingFinished="OnMap_ZoomingFinished"
PanningFinished="OnMap_PanningFinished"
ZoomChanging="OnMap_ZoomChanging"
CenterChanging="OnMap_CenterChanging"
NavigationVisibility="Hidden"
CommandBarVisibility="Hidden"
ZoomBarPresetsVisibility="Hidden"
ZoomBarVisibility="Hidden"
MiniMapExpanderVisibility="Hidden"
MouseLocationIndicatorVisibility="Hidden" IsTextSearchCaseSensitive="True">
<telerik:VisualizationLayer x:Name="MarkerLoaded">
<telerik:VisualizationLayer.ItemTemplate>
<DataTemplate>
<local:Marker telerik:MapLayer.Location="{Binding Location}"
Latitude="{Binding Latitude, Mode=OneWay}"
Longitude="{Binding Longitude, Mode=OneWay}"
CurrentState = "{Binding State, Mode=OneWay}"
MouseLeftButtonDown="MapWp_MouseDown"
MouseDown="MapWp_MouseDown"
PreviewMouseDown="MapWp_MouseDown"
TouchDown="MapWp_TouchDown">
<local:Marker/>
</DataTemplate>
</telerik:VisualizationLayer.ItemTemplate>
</telerik:VisualizationLayer>
</telerik:RadMap>

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Todor
Telerik team
answered on 31 Jul 2015, 10:42 AM
Hi Vincent,

I've tried to reproduce the described problem, but to no avail. Mouse events are fired and everything works as expected. I'm not sure what the exact scenario is, but maybe using commands will do the job.

However, for your convenience I've created a sample demo project which demonstrates the handling for some of the mouse events. You can find it attached. If the problem still exists after that, it will be much easier for us to find what might cause the issue and how to fix it, if you can isolate it in a sample project or modify the sent one in a way the MouseDown event is not fired and send it back to us.

I hope this helps.

Regards,
Todor
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Map
Asked by
Vincent
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or