XamlGlyphImageRepository Class
A repository of images created from XamlGlyph data.
public class XamlGlyphImageRepository : DisposableObject, IDisposable
- Inheritance:
- object MarshalByRefObject DisposableObject object
- Implements:
- IDisposable
Remarks
For internal use only.
Constructors
XamlGlyphImageRepository()
Initializes an instance of the class.
public XamlGlyphImageRepository()
Properties
Global
Gets the global repository instance.
Methods
ClearCachedImages()
Clears all previously cached images.
public void ClearCachedImages()
Dispose(bool)
Releases the unmanaged resources used by the object and optionally releases the managed resources.
protected override void Dispose(bool disposing)
Parameter | Type | Description |
---|---|---|
disposing | bool |
|
Remarks
This method is called by the public Dispose
method and the Finalize
method.
Dispose
invokes this method with the disposing
parameter set to true
.
Finalize
invokes this method with disposing
set to false
.
GetImage(string, Size, SizeF, Color, Color)
Gets the image of a glyph.
public Image GetImage(string glyphKey, Size unscaledImageSize, SizeF scaleFactor, Color foreground, Color background)
Parameter | Type | Description |
---|---|---|
glyphKey | string | The glyph key. |
unscaledImageSize | Size | The unscaled size of the desired image, or Empty to use the canvas size of the glyph. |
scaleFactor | SizeF | The scale factor applied to the image. |
foreground | Color | The foreground color. |
background | Color | The background color. |
Returns
GetLargeIcon(string, SizeF, Color, Color)
Gets the image of a glyph intended for use as a large (i.e., 32x32
) icon.
public Image GetLargeIcon(string glyphKey, SizeF scaleFactor, Color foreground, Color background)
Parameter | Type | Description |
---|---|---|
glyphKey | string | The glyph key. |
scaleFactor | SizeF | The scale factor applied to the icon. |
foreground | Color | The foreground color. |
background | Color | The background color. |
Returns
GetSmallIcon(string, SizeF, Color, Color)
Gets the image of a glyph intended for use as a small (i.e., 16x16
) icon.
public Image GetSmallIcon(string glyphKey, SizeF scaleFactor, Color foreground, Color background)
Parameter | Type | Description |
---|---|---|
glyphKey | string | The glyph key. |
scaleFactor | SizeF | The scale factor applied to the icon. |
foreground | Color | The foreground color. |
background | Color | The background color. |
Returns
Register(string, XamlGlyph)
Registers a glyph with the repository.
public void Register(string key, XamlGlyph glyph)
Parameter | Type | Description |
---|---|---|
key | string | The key which uniquely identifies the glyph. |
glyph | XamlGlyph | The glyph to be registered. |
Inherited Members
- DisposableObject.Dispose()
- DisposableObject.VerifyNotDisposed()
- DisposableObject.IsDisposed
- DisposableObject.Disposed
- MarshalByRefObject.GetLifetimeService()
- MarshalByRefObject.InitializeLifetimeService()
- MarshalByRefObject.MemberwiseClone(bool)
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()