public void Display(string title, string description, string imagePath) { Visibility = Visibility.Visible; m_titleView.Text = title; m_descriptionView.Text = description; if (imagePath.Length > 0) { StartupResourceLoader.LoadImage(imagePath); var src = StartupResourceLoader.GetBitmap(imagePath); if (src != null) { m_imageView.Source = src; m_imageHeader.Visibility = Visibility.Visible; m_imageView.Visibility = Visibility.Visible; } else { m_imageHeader.Visibility = Visibility.Hidden; m_imageView.Visibility = Visibility.Hidden; } } else { m_imageHeader.Visibility = Visibility.Hidden; m_imageView.Visibility = Visibility.Hidden; } m_currentWindow.DisableInput(); }
public static BitmapImage GetIconForTag(string tagName) { var iconImagePath = string.Format("icon1_{0}.png", tagName); StartupResourceLoader.LoadImage(iconImagePath); var image = StartupResourceLoader.GetBitmap(iconImagePath); Debug.Assert(image != null, string.Format("unable to load image for {0}", tagName)); return(image); }
public static BitmapImage GetIconForCategory(string categoryName) { var iconImagePath = string.Format("SearchResultPoiView/{0}.png", categoryName); StartupResourceLoader.LoadImage(iconImagePath); var image = StartupResourceLoader.GetBitmap(iconImagePath); Debug.Assert(image != null, string.Format("unable to load image for {0}", categoryName)); return(image); }
public static BitmapImage GetIconForTag(string tagName, bool isInKioskmode) { string scaleTag = isInKioskmode ? "@1.5x" : ""; var iconImagePath = string.Format("icon1_{0}{1}.png", string.IsNullOrEmpty(tagName) ? "misc" : tagName, scaleTag); StartupResourceLoader.LoadImage(iconImagePath); var image = StartupResourceLoader.GetBitmap(iconImagePath); Debug.Assert(image != null, string.Format("unable to load image for {0}", tagName)); return(image); }
private ImageSource GetImageAssetSource(string imageAssetUrl) { string imageAssetPlusExtension = imageAssetUrl + ".png"; var src = StartupResourceLoader.GetBitmap(imageAssetPlusExtension); if (src == null) { StartupResourceLoader.LoadImage(imageAssetPlusExtension); src = StartupResourceLoader.GetBitmap(imageAssetPlusExtension); } return(src); }
private void TransitionToNewImage() { string imageAssetPlusExtension = m_imageAssetUrl + ".png"; var src = StartupResourceLoader.GetBitmap(imageAssetPlusExtension); if (src == null) { StartupResourceLoader.LoadImage(imageAssetPlusExtension); src = StartupResourceLoader.GetBitmap(imageAssetPlusExtension); } m_imageView.Source = src; }