Creates avatar images with an elliptical background that display the initials extracted from a name.
Definition
Namespace:Telerik.WinForms.Documents.UI.Mentions
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class NameToInitialsImageSourceGenerator
Inheritance: objectNameToInitialsImageSourceGenerator
Constructors
public NameToInitialsImageSourceGenerator()
Properties
DefaultBrushes
List<Brush>
Gets the brushes used to choose a random background color for each generated avatar.
public List<Brush> DefaultBrushes { get; }
Keep at least one brush in the list so an image can select a background color.
Gets or sets the height, in pixels, of generated avatar images.
public double Height { get; set; }
The configured height, or 30 pixels when no height has been set.
Methods
Creates a bitmap avatar whose elliptical background contains the first character of each word in the specified name.
Creates a WPF image source for the initials avatar generated from the specified name.
public BitmapSource GenerateImageSource(string value)
The name from which to extract initials.
Returns:A WPF image source containing the generated avatar.