Advertisement
Guest User

Untitled

a guest
Mar 30th, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. private RelayCommand<Check> _showDetailCheckCommand;
  2. public RelayCommand<Check> ShowDetailCheckCommand
  3. {
  4. get
  5. {
  6. Debug.WriteLine("Binded");
  7. return _showDetailCheckCommand ?? (_showDetailCheckCommand = new RelayCommand<Check>((c) =>
  8. {
  9. Debug.WriteLine("Action!");
  10. }));
  11.  
  12. }
  13. }
  14.  
  15. <Page
  16. x:Name="pageRoot"
  17. ...
  18.  
  19.  
  20. <Maps:MapControl x:Name="Map" IsEnabled="False" Margin="0,8,0,8" MapServiceToken="******" LandmarksVisible="False" PedestrianFeaturesVisible="False" TrafficFlowVisible="True" ZoomLevel="16">
  21. <!-- Incidents -->
  22. <Maps:MapItemsControl ItemsSource="{Binding checks}">
  23. <Maps:MapItemsControl.ItemTemplate>
  24. <DataTemplate>
  25. <Image Tag="{Binding}" Source="{Binding image_path}" Maps:MapControl.Location="{Binding geodata, Converter={StaticResource RoadsmartCoordinatesToGeoPointConverter}}" Maps:MapControl.NormalizedAnchorPoint=".5,.5" >
  26. <interactivity:Interaction.Behaviors>
  27. <core:EventTriggerBehavior EventName="Tapped">
  28. <core:InvokeCommandAction Command="{Binding ShowDetailCheckCommand, ElementName=pageRoot}" CommandParameter="{Binding}" />
  29. </core:EventTriggerBehavior>
  30. </interactivity:Interaction.Behaviors>
  31. </Image>
  32. </DataTemplate>
  33. </Maps:MapItemsControl.ItemTemplate>
  34. </Maps:MapItemsControl>
  35. </Maps:MapControl>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement