示例#1
0
 private void ResetPin(PoiPushpin pin)
 {
     pin.Pushpin.RenderTransform = null;
 }
示例#2
0
        private void ExpandPin(PoiPushpin pin)
        {
            if (m_expandPinTransformGroup == null)
            {
                ScaleTransform st = new ScaleTransform()
                {
                    ScaleX = 2,
                    ScaleY = 2,
                };

                TranslateTransform tt = new TranslateTransform()
                {
                    Y = -42,
                    X = -18,
                };

                m_expandPinTransformGroup = new TransformGroup();
                m_expandPinTransformGroup.Children.Add(st);
                m_expandPinTransformGroup.Children.Add(tt);
            }
            pin.Pushpin.RenderTransform = m_expandPinTransformGroup;
        }
示例#3
0
 /// <summary>
 /// called when a pin is selected to add a tag to
 /// </summary>
 /// <param name="pin"></param>
 private void LoadFromPin(PoiPushpin pin)
 {
     Pin = pin;
 }
示例#4
0
        private void PoiPushpinClicked(PoiPushpin pin)
        {
            if (pin == this.SelectedPushPin)
                pin = null; //same pin was selected

            if (pin != null)
                //expand the selected pin
                ExpandPin(pin);

            ////reset the previous pin
            //if (this.SelectedPushPin != null)
            //    ResetPin(this.SelectedPushPin);

            //set the selected pin
            this.SelectedPushPin = pin;
        }
示例#5
0
        /// <summary>
        /// Called from main view model when details are wanted on pushpin
        /// </summary>
        /// <param name="pin"></param>
        private void PoiPushpinDetailsClicked(PoiPushpin pin)
        {
            Loading = true;
            Pin = pin;
            
            //set the loading text
            this.LoadingText = "Loading Ratings...";

            if (!Pin.CommentsLoaded || !Pin.TagsLoaded)
            {
                //make the web request
                WebClient wc = new WebClient();
                wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler(SummaryDownloadComplete);
                wc.DownloadStringAsync(new Uri("http://vanguide.cloudapp.net/Summaries/ShowByGuid.json?guid=" + pin.Id + "&nocache=" + Guid.NewGuid().ToString()));
            }
            else
            {
                this.Loading = false;
            }
        }