コード例 #1
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            string path = (string)value;

            if (path != null)
            {
                var source = new BitmapImage();
                source.BeginInit();
                source.UriSource = new Uri(ConfigLoader.GetImagePath(path), UriKind.Absolute);
                source.EndInit();
                return(source);
            }
            return(null);
        }