void Update() { MediaFileVM file = ViewModel.FileSet.FirstOrDefault(); if (ViewModel.HomeTeamShield != null) { homeShield = ViewModel.HomeTeamShield.Scale(Constants.SHIELD_IMAGE_SIZE, Constants.SHIELD_IMAGE_SIZE); homeMaskColor = null; } else { homeShield = App.Current.ResourcesLocator.LoadIcon("vas-default-shield", Constants.SHIELD_IMAGE_SIZE); homeMaskColor = Colors.DefaultShield; } if (ViewModel.AwayTeamShield != null) { awayShield = ViewModel.AwayTeamShield.Scale(Constants.SHIELD_IMAGE_SIZE, Constants.SHIELD_IMAGE_SIZE); awayMaskColor = null; } else { awayShield = App.Current.ResourcesLocator.LoadIcon("vas-default-shield", Constants.SHIELD_IMAGE_SIZE); awayMaskColor = Colors.DefaultShield; } description = FormatDesc(); }
void DrawTeamShield(Image shield, Color maskColor) { var point = new Point(pos.X, pos.Y + ((cellArea.Height - shield.Height) / 2)); tk.FillColor = maskColor; tk.DrawImage(point, shield.Width, shield.Height, shield, ScaleMode.AspectFit, maskColor != null); pos = new Point(pos.X + shield.Width, pos.Y); remainingWidth -= shield.Width; }