WpfAdapter

TheArtOfDev.HtmlRenderer.WPF.Adapters

Adapter for WPF platform.

Hereda de: RAdapter

Constructores

WpfAdapter()

Init installed font families and set default font families mapping.

Propiedades

Instance : WpfAdapter

Singleton instance of global adapter.

Métodos

ConvertImageInt(ImageSource) : RImage

Create image from the image source.

image
CreateContextMenuInt() : RContextMenu

Creates a new context menu instance.

CreateFontInt(RFontFamily, double, RFontStyle) : RFont

Creates a new font instance with the specified properties.

family
The font family name.
size
The size of the font.
style
The font style, defined by the RFontStyle enum.

Devuelve: A new RFont object configured with the specified properties.

CreateFontInt(string, double, RFontStyle) : RFont

Creates a new font instance with the specified properties.

family
The font family name.
size
The size of the font.
style
The font style, defined by the RFontStyle enum.

Devuelve: A new RFont object configured with the specified properties.

CreateLinearGradientBrush(RRect, RColor, RColor, double) : RBrush

Create linear gradient brush for the given rectangle, color and angel.

rect
color1
color2
angle
CreatePen(RColor) : RPen

Create a new pen with the specified color.

color
CreateSolidBrush(RColor) : RBrush

Create solid brush for the given color.

color
GetClipboardDataObjectInt(string, string) : object

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.

html
plainText
GetColorInt(string) : RColor

Get color from the given color name.

colorName
GetFontStyle(RFontStyle) : FontStyle

Get WPF font style for the given style.

GetFontWidth(RFontStyle) : FontWeight

Get WPF font style for the given style.

GetSolidColorBrush(RColor) : Brush

Get solid color brush for the given color.

ImageFromStreamInt(string, byte[]) : RImage

Create image from the image bytes.

extension
body
SaveToFileInt(RImage, string, string, RControl)

Saves the image to the specified file.

image
name
extension
control
SetToClipboardInt(string)

Sets the text to the clipboard.

text
SetToClipboardInt(string, string)

Sets the HTML and plain text to the clipboard.

html
plainText
SetToClipboardInt(RImage)

Sets the image to the clipboard.

image

Eventos

CreateContextMenuHandler : Func<RContextMenu>

Context menu creation handler.

SaveToFileHandler : Action<RImage, string, string, RControl>

Save to file handler.

Campos

ValidColorNamesLc : List<string>

List of valid predefined color names in lower-case

_instance : WpfAdapter

Singleton instance of global adapter.