Inheritance: System.Windows.Controls.Control
Example #1
0
        private static void OnVerticalOffsetPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            MapTip dp = d as MapTip;
            int    dY = (int)e.NewValue - (int)e.OldValue;

            dp.SetValue(Canvas.TopProperty, Canvas.GetTop(dp) + dY);
        }
Example #2
0
        private static void OnHorizontalOffsetPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            MapTip dp = d as MapTip;
            int    dX = (int)e.NewValue - (int)e.OldValue;

            dp.SetValue(Canvas.LeftProperty, Canvas.GetLeft(dp) + dX);
        }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/SLMaps;component/RipplesViewer.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.MyMap = ((ESRI.ArcGIS.Client.Map)(this.FindName("MyMap")));
     this.MyMapTip2 = ((ESRI.ArcGIS.Client.Toolkit.MapTip)(this.FindName("MyMapTip2")));
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/SLMaps;component/GeoRSSViewer.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.txtGeoRSSurl = ((System.Windows.Controls.TextBox)(this.FindName("txtGeoRSSurl")));
     this.btnLoadGeoRSS = ((System.Windows.Controls.Button)(this.FindName("btnLoadGeoRSS")));
     this.MyMap = ((ESRI.ArcGIS.Client.Map)(this.FindName("MyMap")));
     this.MyMapTip = ((ESRI.ArcGIS.Client.Toolkit.MapTip)(this.FindName("MyMapTip")));
 }
Example #5
0
        private static void OnGraphicsLayerPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            MapTip        maptip   = d as MapTip;
            GraphicsLayer newLayer = e.NewValue as GraphicsLayer;
            GraphicsLayer oldLayer = e.OldValue as GraphicsLayer;

            if (oldLayer != null)
            {
                oldLayer.MouseEnter -= maptip.enterHandler;
                oldLayer.MouseLeave -= maptip.leaveHandler;
                oldLayer.MouseMove  -= maptip.moveHandler;
            }
            maptip.Collapse(false);
            maptip.Visibility     = Visibility.Collapsed;
            maptip.currentFeature = null;
            maptip.ItemsSource    = null;
            maptip.DataContext    = null;
            if (newLayer != null)
            {
                newLayer.MouseEnter += maptip.enterHandler;
                newLayer.MouseLeave += maptip.leaveHandler;
                newLayer.MouseMove  += maptip.moveHandler;
            }
        }