BarImageProvider Class
Represents a service that can provide images for bar controls.
public class BarImageProvider : IBarImageProvider
- Inheritance:
- System.Object Object
- Implements:
- IBarImageProvider
Constructors
BarImageProvider()
public BarImageProvider()
Methods
GetImageSource(String, BarImageOptions)
Returns an System.Windows.Media.ImageSource for the specified bar control key and set of options.
public ImageSource GetImageSource(string key, BarImageOptions options)
| Parameter | Type | Description |
|---|---|---|
| key | System.String | A string that uniquely identifies a bar control. |
| options | BarImageOptions | A BarImageOptions that indicates the image options. |
Returns
- System.Windows.Media.ImageSource:
An System.Windows.Media.ImageSource for the specified bar control key and set of options.
GetImageSource(String, BarImageSize)
Returns an System.Windows.Media.ImageSource for the specified bar control key and size.
public ImageSource GetImageSource(string key, BarImageSize size)
| Parameter | Type | Description |
|---|---|---|
| key | System.String | A string that uniquely identifies a bar control. |
| size | BarImageSize | A BarImageSize that indicates the image size. |
Returns
- System.Windows.Media.ImageSource:
An System.Windows.Media.ImageSource for the specified bar control key and size.
Register(String, Func<BarImageOptions, ImageSource>)
Registers an image factory function for a key.
public void Register(string key, Func<BarImageOptions, ImageSource> factory)
| Parameter | Type | Description |
|---|---|---|
| key | System.String | A string that uniquely identifies a bar control. |
| factory | System.Func<BarImageOptions, System.Windows.Media.ImageSource> | A factory method that examines BarImageOptions to return an System.Windows.Media.ImageSource. |
Unregister(String)
Unregisters an image factory function for a key.
public bool Unregister(string key)
| Parameter | Type | Description |
|---|---|---|
| key | System.String | A string that uniquely identifies a bar control. |
Returns
- System.Boolean:
trueif an image factory function was removed; otherwise,false.
Inherited Members
- System.Object.ToString()
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object, System.Object)
- System.Object.ReferenceEquals(System.Object, System.Object)
- System.Object.GetHashCode()
- System.Object.GetType()
- System.Object.MemberwiseClone()