Udostępnij za pośrednictwem


ImageLibrary.AddMonikerFormattingDescriptor Method

Definition

Adds a formatting descriptor for ImageMoniker.ToString().

public:
 void AddMonikerFormattingDescriptor(System::String ^ name, Guid guid, Func<System::Collections::Generic::IReadOnlyDictionary<int, System::String ^> ^> ^ imageNameMapFactory);
public void AddMonikerFormattingDescriptor (string name, Guid guid, Func<System.Collections.Generic.IReadOnlyDictionary<int,string>> imageNameMapFactory);
member this.AddMonikerFormattingDescriptor : string * Guid * Func<System.Collections.Generic.IReadOnlyDictionary<int, string>> -> unit
Public Sub AddMonikerFormattingDescriptor (name As String, guid As Guid, imageNameMapFactory As Func(Of IReadOnlyDictionary(Of Integer, String)))

Parameters

name
String

The name to be used for monikers whose Guids match guid (e.g. "KnownMonikers")

guid
Guid

The guid to match

imageNameMapFactory
Func<IReadOnlyDictionary<Int32,String>>

A function that will return a mapping of image IDs to image names

Remarks

For a moniker whose Guid matches guid, ToString() will return $"{name}.{imageNameMap[Id]}"

Applies to