HypernovaDesktop Components · docs
Binarymission
WPF › Smart Navigator › PathToImageSourceConverter

PathToImageSourceConverter

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WPF.Controls.ListControls

Turns an image path in a binding into an image source the navigator can show.

public class PathToImageSourceConverter : IValueConverter

Inherits from / implements: IValueConverter

Remarks

A relative path, an absolute path or a pack URI all work. An image source or a Uri passes through or is loaded as it is; nothing, or an empty path, gives no image rather than an exception from inside the binding.

Members at a glance

ConvertPerforms the conversion this converter exists for, as described on PathToImageSourceConverter.
ConvertBackNot supported. This conversion is one-way, so there is nothing to convert back to.

Methods

Convert

public object Convert(object o, Type type, object parameter, CultureInfo culture)

Performs the conversion this converter exists for, as described on PathToImageSourceConverter.

o
The value produced by the binding source.
type
The type the binding target expects.
parameter
The converter parameter given in the binding.
culture
The culture to use for the conversion.

Returns. The converted value.

ConvertBack

public object ConvertBack(object o, Type type, object parameter, CultureInfo culture)

Not supported. This conversion is one-way, so there is nothing to convert back to.

o
The value produced by the binding source.
type
The type the binding target expects.
parameter
The converter parameter given in the binding.
culture
The culture to use for the conversion.

Returns. No usable value.