Class BitmapRegistry
Class for managing all bitmaps, which are registered for Mapsui drawing
Inherited Members
Namespace: Mapsui.Styles
Assembly: Mapsui.dll
Syntax
public class BitmapRegistry
Properties
| Edit this page View SourceInstance
Singleton of BitmapRegistry class
Declaration
public static BitmapRegistry Instance { get; }
Property Value
Type | Description |
---|---|
BitmapRegistry |
Methods
| Edit this page View SourceGet(int)
Get bitmap data of registered bitmap
Declaration
public object Get(int id)
Parameters
Type | Name | Description |
---|---|---|
int | id | Id of existing bitmap data |
Returns
Type | Description |
---|---|
object |
Register(object, string?)
Register a new bitmap
Declaration
public int Register(object bitmapData, string? key = null)
Parameters
Type | Name | Description |
---|---|---|
object | bitmapData | Bitmap data to register |
string | key | key for accessing bitmap |
Returns
Type | Description |
---|---|
int | Id of registered bitmap data |
Set(int, object)
Set new bitmap data for a already registered bitmap
Declaration
public bool Set(int id, object bitmapData)
Parameters
Type | Name | Description |
---|---|---|
int | id | Id of existing bitmap data |
object | bitmapData | New bitmap data to replace |
Returns
Type | Description |
---|---|
bool | True, if replacing worked correct |
TryGetBitmapId(string, out int)
Try Get Bitmap Id
Declaration
public bool TryGetBitmapId(string key, out int bitmapId)
Parameters
Type | Name | Description |
---|---|---|
string | key | key |
int | bitmapId | bitmap id |
Returns
Type | Description |
---|---|
bool | true if found |
Unregister(int)
Unregister an existing bitmap
Declaration
public object? Unregister(int id)
Parameters
Type | Name | Description |
---|---|---|
int | id | Id of registered bitmap data |
Returns
Type | Description |
---|---|
object | The unregistered object |