public override void OnReady() { double mapHeight = MapAttachmentUCBase.GetMapHeight(base.Width); double totalHeight = MapPointFullAttachmentUC.CalculateTotalHeight(base.Width); this._mapUri = this.GetMapUri(); ((FrameworkElement)this.canvas).Width = (base.Width); ((FrameworkElement)this.canvas).Height = totalHeight; ((FrameworkElement)this.rectBorder).Width = (base.Width); ((FrameworkElement)this.rectBorder).Height = totalHeight; ((FrameworkElement)this.rectanglePlaceholder).Width = (base.Width); ((FrameworkElement)this.rectanglePlaceholder).Height = mapHeight; ((FrameworkElement)this.imageMap).Width = (base.Width); ((FrameworkElement)this.imageMap).Height = mapHeight; Canvas.SetLeft((UIElement)this.imageMapIcon, base.Width / 2.0 - ((FrameworkElement)this.imageMapIcon).Width / 2.0); Canvas.SetTop((UIElement)this.imageMapIcon, mapHeight / 2.0 - ((FrameworkElement)this.imageMapIcon).Height); ((FrameworkElement)this.rectMapBorderBottom).Width = (base.Width - 2.0); Canvas.SetTop((UIElement)this.rectMapBorderBottom, mapHeight - 1.0); Canvas.SetTop((UIElement)this.textBlockTitle, mapHeight + 9.0); Canvas.SetTop((UIElement)this.textBlockSubtitle, mapHeight + 24.0 + 9.0); this.UpdateTitleSubtitle(); double maxWidth = base.Width - 32.0; this.textBlockTitle.CorrectText(maxWidth); this.textBlockSubtitle.CorrectText(maxWidth); }
public override void OnReady() { double mapHeight = MapAttachmentUCBase.GetMapHeight(base.Width); double totalHeight = MapPlaceFullAttachmentUC.CalculateTotalHeight(base.Width); this._mapUri = this.GetMapUri(); ((FrameworkElement)this.canvas).Width = (base.Width); ((FrameworkElement)this.canvas).Height = (mapHeight + 80.0); ((FrameworkElement)this.rectBorder).Width = (base.Width); ((FrameworkElement)this.rectBorder).Height = totalHeight; ((FrameworkElement)this.rectanglePlaceholder).Width = (base.Width); ((FrameworkElement)this.rectanglePlaceholder).Height = mapHeight; ((FrameworkElement)this.imageMap).Width = (base.Width); ((FrameworkElement)this.imageMap).Height = mapHeight; Canvas.SetLeft((UIElement)this.imageMapIcon, base.Width / 2.0 - ((FrameworkElement)this.imageMapIcon).Width / 2.0); Canvas.SetTop((UIElement)this.imageMapIcon, mapHeight / 2.0 - ((FrameworkElement)this.imageMapIcon).Height); ((FrameworkElement)this.rectMapBorderBottom).Width = (base.Width - 2.0); Canvas.SetTop((UIElement)this.rectMapBorderBottom, mapHeight - 1.0); Canvas.SetTop((UIElement)this.gridPlace, mapHeight); this.UpdateTitleSubtitle(); double width = base.Width; Thickness margin = ((FrameworkElement)this.textBlockTitle).Margin; // ISSUE: explicit reference operation double left = ((Thickness)@margin).Left; double val2 = width - left; this.textBlockTitle.CorrectText(Math.Max(0.0, val2)); this.textBlockSubtitle.CorrectText(Math.Max(0.0, val2)); }
public override void OnReady() { double mapHeight = MapAttachmentUCBase.GetMapHeight(base.Width); this._mapUri = this.GetMapUri(); ((FrameworkElement)this.canvas).Width = (base.Width); ((FrameworkElement)this.canvas).Height = mapHeight; ((FrameworkElement)this.rectanglePlaceholder).Width = (base.Width); ((FrameworkElement)this.rectanglePlaceholder).Height = mapHeight; ((FrameworkElement)this.imageMap).Width = (base.Width); ((FrameworkElement)this.imageMap).Height = mapHeight; Canvas.SetLeft((UIElement)this.imageMapIcon, base.Width / 2.0 - ((FrameworkElement)this.imageMapIcon).Width / 2.0); Canvas.SetTop((UIElement)this.imageMapIcon, mapHeight / 2.0 - ((FrameworkElement)this.imageMapIcon).Height); }
public static double CalculateTotalHeight(double width) { return(MapAttachmentUCBase.GetMapHeight(width) + 48.0 + 9.0 + 15.0); }
protected Uri GetMapUri() { return(MapsService.Current.GetMapUri(this._latitude, this._longitude, 16, (int)base.Width, base.Width / MapAttachmentUCBase.GetMapHeight(base.Width))); }