Represents a value converter that returns a new Image instance created using a specified URI or Bitmap
- Inheritance:
- object object
Remarks
This converter expects the source value to be a System.Uri, a URI string, or a
Bitmap
Constructors
ImageConverter()
Initializes an instance of the class.
Properties
Height
Gets or sets the target height of the image.
Property Value
ImageProvider
Gets or sets the optional Image
Property Value
- Image
Provider : The optional Image
Provider to use with image sources created by the converter. The default value isnull
, meaning use the static default ImageProvider .
UriPrefix
Gets or sets the URI prefix that should be prepended to all values converted by this object. This is a dependency property.
Property Value
- string:
The URI prefix.
Width
Gets or sets the target width of the image.
Property Value
Methods
Convert(object, Type, object, CultureInfo)
Converts the specified URI, in the form of a string or System.Uri, or the specified
Bitmap
Parameter | Type | Description |
---|---|---|
value | object | The value produced by the binding source. |
targetType | Type | The type of the binding target property. |
parameter | object | The converter parameter to use. |
culture | Culture |
The culture to use in the converter. |
Returns
Remarks
See Image
ConvertBack(object, Type, object, CultureInfo)
This method always returns null
and should not be used.
Parameter | Type | Description |
---|---|---|
value | object | Not used. |
targetType | Type | Not used. |
parameter | object | Not used. |
culture | Culture |
Not used. |
Returns
- object:
null
.
CreateImage(ImageSource)
Creates an Image control to display the specified Image
Parameter | Type | Description |
---|---|---|
imageSource | Image |
The Image |
Returns
Remarks
The default implementation of this method creates a Dynamic
Fields
HeightProperty
Identifies the Height dependency property. This field is read-only.
ImageProviderProperty
Identifies the Image
UriPrefixProperty
Identifies the Uri
WidthProperty
Identifies the Width dependency property. This field is read-only.