ArcGISRuntime.WPF.Viewer.Converters.SampleToBitmapConverter.Convert C# (CSharp) Метод

Convert() публичный Метод

public Convert ( object value, Type targetType, object parameter, CultureInfo culture ) : object
value object
targetType System.Type
parameter object
culture System.Globalization.CultureInfo
Результат object
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var sampleImageName = value.ToString();

            try
            {
                if (File.Exists(sampleImageName))
                    return BitmapFrame.Create(
                        new Uri(sampleImageName, UriKind.Absolute),
                        BitmapCreateOptions.DelayCreation,
                        BitmapCacheOption.OnLoad);
            }
            catch (Exception)
            {
            }

            return null;
        }
SampleToBitmapConverter