Back to Devexpress

MapDataAdapterBase.SetMapItemFactory(IMapItemFactory) Method

windowsforms-devexpress-dot-xtramap-dot-mapdataadapterbase-dot-setmapitemfactory-x28-devexpress-dot-xtramap-dot-imapitemfactory-x29.md

latest2.9 KB
Original Source

MapDataAdapterBase.SetMapItemFactory(IMapItemFactory) Method

Sets the factory used to generate map items.

Namespace : DevExpress.XtraMap

Assembly : DevExpress.XtraMap.v25.2.dll

NuGet Package : DevExpress.Win.Map

Declaration

csharp
public void SetMapItemFactory(
    IMapItemFactory factory
)
vb
Public Sub SetMapItemFactory(
    factory As IMapItemFactory
)

Parameters

NameTypeDescription
factoryIMapItemFactory

An object implementing the IMapItemFactory interface.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SetMapItemFactory(IMapItemFactory) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

how-to-colorize-pushpin-items-based-on-data-source-data-t423869/CS/ColorPushpinFactory/Form1.cs#L17

csharp
PopulateTable(10);
    listSourceDataAdapter1.SetMapItemFactory(new PushpinFactory((Image)ColorPushpinFactory.Properties.Resources.ResourceManager.GetObject("pushpin_red"), Color.FromArgb(254, 22, 131)));
}

how-to-colorize-pushpin-items-based-on-data-source-data-t423869/VB/ColorPushpinFactory/Form1.vb#L19

vb
PopulateTable(10)
    listSourceDataAdapter1.SetMapItemFactory(New PushpinFactory(CType(My.Resources.ResourceManager.GetObject("pushpin_red"), Image), Color.FromArgb(254, 22, 131)))
End Sub

See Also

MapDataAdapterBase Class

MapDataAdapterBase Members

DevExpress.XtraMap Namespace