コード例 #1
0
        public PositionMarker(Window window, GMapMarker marker, UIElement ui, onPositionMarkerClickLisener listener)
        {
            this.InitializeComponent();

            this.MapWindow = window;
            this.Marker    = marker;

            Popup = new Popup();
            Label = new Label();
            point = marker.Position;

            this.Loaded      += new RoutedEventHandler(CustomMarkerDemo_Loaded);
            this.SizeChanged += new SizeChangedEventHandler(CustomMarkerDemo_SizeChanged);
            this.MouseEnter  += new MouseEventHandler(MarkerControl_MouseEnter);
            this.MouseLeave  += new MouseEventHandler(MarkerControl_MouseLeave);
            //   this.MouseMove += new MouseEventHandler(CustomMarkerDemo_MouseMove);
            this.RedMarkerClickLisener = listener;
            if (ui != null)
            {
                ((TrolleyTooltip)ui).setStatus("异常");
                Popup.Placement = PlacementMode.Mouse;
                {
                    Label.Background      = Brushes.Blue;
                    Label.Foreground      = Brushes.White;
                    Label.BorderBrush     = Brushes.WhiteSmoke;
                    Label.BorderThickness = new Thickness(2);
                    Label.Padding         = new Thickness(5);
                    Label.FontSize        = 22;
                    // Label.Content = title;
                    Label.Content = "lable content!";
                }
                Popup.AllowsTransparency = true;
                Popup.Child = ui;
            }
        }
コード例 #2
0
 public void setOnRedMarkerClick(onPositionMarkerClickLisener listener)
 {
     this.RedMarkerClickLisener = listener;
 }