public UserMarker(GPSMap window, GMapMarker marker, string title) { InitializeComponent(); this._mainWindow = window; this._marker = marker; //_popup = new Popup(); //_label = new Label(); Icon.ToolTip = title; this.Unloaded += new RoutedEventHandler(CustomMarkerDemo_Unloaded); 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.MouseLeftButtonUp += new MouseButtonEventHandler(CustomMarkerDemo_MouseLeftButtonUp); //this.MouseLeftButtonDown += new MouseButtonEventHandler(CustomMarkerDemo_MouseLeftButtonDown); /*_popup.Placement = PlacementMode.Mouse; * { * _label.Background = Brushes.Transparent; * _label.Foreground = Brushes.Black; * _label.BorderBrush = Brushes.WhiteSmoke; * _label.BorderThickness = new Thickness(2); * _label.Padding = new Thickness(2); * _label.FontSize = 22; * _label.Content = title; * } * _popup.Child = _label;*/ }
private void btnGPS_Click(object sender, RoutedEventArgs e) { GPSMap gPSMap = new GPSMap(); gPSMap.Show(); }