ArcGISWindowsPhoneSDK.RoutingDirections.directionsSegment_MouseLeftButtonDown C# (CSharp) Method

directionsSegment_MouseLeftButtonDown() private method

private directionsSegment_MouseLeftButtonDown ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void
sender object
e System.Windows.Input.MouseButtonEventArgs
return void
        private void directionsSegment_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            TextBlock textBlock = sender as TextBlock;
            Graphic feature = textBlock.Tag as Graphic;
            MyMap.ZoomTo(Expand(feature.Geometry.Extent));
            if (_activeSegmentGraphic == null)
            {
                _activeSegmentGraphic = new Graphic() { Symbol = LayoutRoot.Resources["SegmentSymbol"] as ESRI.ArcGIS.Client.Symbols.Symbol };
                GraphicsLayer graphicsLayer = MyMap.Layers["MyRouteGraphicsLayer"] as GraphicsLayer;
                graphicsLayer.Graphics.Add(_activeSegmentGraphic);
            }
            _activeSegmentGraphic.Geometry = feature.Geometry;
        }