Class WpfAdapter
- Namespace
- TheArtOfDev.HtmlRenderer.WPF.Adapters
- Assembly
- StockSharp.Xaml.dll
Adapter for WPF platform.
public class WpfAdapter : RAdapter
- Inheritance
-
WpfAdapter
- Inherited Members
- Extension Methods
Properties
Instance
Singleton instance of global adapter.
public static WpfAdapter Instance { get; }
Property Value
Methods
ConvertImageInt(ImageSource)
Create image from the image source.
protected override RImage ConvertImageInt(ImageSource image)
Parameters
imageImageSource
Returns
CreateContextMenuInt()
Creates a new context menu instance.
protected override RContextMenu CreateContextMenuInt()
Returns
CreateFontInt(string, double, RFontStyle)
Creates a new font instance with the specified properties.
protected override RFont CreateFontInt(string family, double size, RFontStyle style)
Parameters
familystringThe font family name.
sizedoubleThe size of the font.
styleRFontStyleThe font style, defined by the RFontStyle enum.
Returns
CreateFontInt(RFontFamily, double, RFontStyle)
Creates a new font instance with the specified properties.
protected override RFont CreateFontInt(RFontFamily family, double size, RFontStyle style)
Parameters
familyRFontFamilyThe font family name.
sizedoubleThe size of the font.
styleRFontStyleThe font style, defined by the RFontStyle enum.
Returns
CreateLinearGradientBrush(RRect, RColor, RColor, double)
Create linear gradient brush for the given rectangle, color and angel.
protected override RBrush CreateLinearGradientBrush(RRect rect, RColor color1, RColor color2, double angle)
Parameters
Returns
CreatePen(RColor)
Create a new pen with the specified color.
protected override RPen CreatePen(RColor color)
Parameters
colorRColor
Returns
CreateSolidBrush(RColor)
Create solid brush for the given color.
protected override RBrush CreateSolidBrush(RColor color)
Parameters
colorRColor
Returns
GetClipboardDataObjectInt(string, string)
Measure the width of the string under the maximum width restriction, calculating the number of characters that can fit and the width those characters take.
protected override object GetClipboardDataObjectInt(string html, string plainText)
Parameters
Returns
GetColorInt(string)
Get color from the given color name.
protected override RColor GetColorInt(string colorName)
Parameters
colorNamestring
Returns
ImageFromStreamInt(string, byte[])
Create image from the image bytes.
protected override RImage ImageFromStreamInt(string extension, byte[] body)
Parameters
Returns
SaveToFileInt(RImage, string, string, RControl)
Saves the image to the specified file.
protected override void SaveToFileInt(RImage image, string name, string extension, RControl control = null)
Parameters
SetToClipboardInt(string)
Sets the text to the clipboard.
protected override void SetToClipboardInt(string text)
Parameters
textstring
SetToClipboardInt(string, string)
Sets the HTML and plain text to the clipboard.
protected override void SetToClipboardInt(string html, string plainText)
Parameters
SetToClipboardInt(RImage)
Sets the image to the clipboard.
protected override void SetToClipboardInt(RImage image)
Parameters
imageRImage
Events
CreateContextMenuHandler
Context menu creation handler.
public event Func<RContextMenu> CreateContextMenuHandler
Event Type
SaveToFileHandler
Save to file handler.
public event Action<RImage, string, string, RControl> SaveToFileHandler