VectSharp 2.5.0
A light library for C# vector graphics
Loading...
Searching...
No Matches
VectSharp.MarkdownCanvas.MarkdownCanvasControl Class Reference

A control to display a Markdown document in an Avalonia application. More...

Inheritance diagram for VectSharp.MarkdownCanvas.MarkdownCanvasControl:

Public Member Functions

 MarkdownCanvasControl ()
 Initialises a new MarkdownCanvasControl. More...
 

Static Public Attributes

static readonly StyledProperty< double > MaxRenderWidthProperty = AvaloniaProperty.Register<MarkdownCanvasControl, double>(nameof(MaxRenderWidth), double.PositiveInfinity)
 Defines the MaxRenderWidth property. More...
 
static readonly StyledProperty< double > MinRenderWidthProperty = AvaloniaProperty.Register<MarkdownCanvasControl, double>(nameof(MinRenderWidth), 200)
 Defines the MinRenderWidth property. More...
 
static readonly StyledProperty< double > MinVariationProperty = AvaloniaProperty.Register<MarkdownCanvasControl, double>(nameof(MinVariation), 10)
 Defines the MinVariation property. More...
 
static readonly StyledProperty< string > DocumentSourceProperty = AvaloniaProperty.Register<MarkdownCanvasControl, string>(nameof(DocumentSource))
 Defines the DocumentSource property. More...
 
static readonly StyledProperty< MarkdownDocument > DocumentProperty = AvaloniaProperty.Register<MarkdownCanvasControl, MarkdownDocument>(nameof(Document))
 Defines the Document property. More...
 
static readonly StyledProperty< AvaloniaContextInterpreter.TextOptionsTextConversionOptionsProperty = AvaloniaProperty.Register<MarkdownCanvasControl, AvaloniaContextInterpreter.TextOptions>(nameof(TextConversionOption), AvaloniaContextInterpreter.TextOptions.ConvertIfNecessary)
 Defines the TextConversionOption property. More...
 

Properties

double MaxRenderWidth [get, set]
 The maximum width for the rendered document. This will be used even if the control's client area is larger than this (the alignment of the document within the controll will depend on the control's ContentControl.HorizontalContentAlignment). More...
 
double MinRenderWidth [get, set]
 The minimum width for the rendered document. If the control's client area is smaller than this, the horizontal scroll bar will be activated. More...
 
double MinVariation [get, set]
 The minimum width variation that triggers a document reflow. If the control is resized, but the width changes by less than this amount, the document is not re-drawn. More...
 
string DocumentSource [set]
 Sets the currently displayed document from Markdown source. More...
 
MarkdownDocument Document [get, set]
 Gets or sets the currently displayed MarkdownDocument. More...
 
AvaloniaContextInterpreter.TextOptions TextConversionOption [get, set]
 Gets or sets the value that determines whether text items should be converted into paths when drawing. Setting this to AvaloniaContextInterpreter.TextOptions.NeverConvert will improve performance if you are using custom fonts, but may cause unexpected results unless the font families being used are of type ResourceFontFamily. More...
 
MarkdownRenderer Renderer [get]
 The MarkdownRenderer used to render the Document. You can use the properties of this object to customise the rendering. Note that setting the Avalonia.Controls.Primitives.TemplatedControl.FontSize of the MarkdownCanvasControl will propagate to the Renderer's MarkdownRenderer.BaseFontSize. More...
 

Detailed Description

A control to display a Markdown document in an Avalonia application.

Definition at line 36 of file MarkdownCanvas.axaml.cs.

Constructor & Destructor Documentation

◆ MarkdownCanvasControl()

VectSharp.MarkdownCanvas.MarkdownCanvasControl.MarkdownCanvasControl ( )

Initialises a new MarkdownCanvasControl.

Definition at line 134 of file MarkdownCanvas.axaml.cs.

Member Data Documentation

◆ DocumentProperty

readonly StyledProperty<MarkdownDocument> VectSharp.MarkdownCanvas.MarkdownCanvasControl.DocumentProperty = AvaloniaProperty.Register<MarkdownCanvasControl, MarkdownDocument>(nameof(Document))
static

Defines the Document property.

Definition at line 96 of file MarkdownCanvas.axaml.cs.

◆ DocumentSourceProperty

readonly StyledProperty<string> VectSharp.MarkdownCanvas.MarkdownCanvasControl.DocumentSourceProperty = AvaloniaProperty.Register<MarkdownCanvasControl, string>(nameof(DocumentSource))
static

Defines the DocumentSource property.

Definition at line 83 of file MarkdownCanvas.axaml.cs.

◆ MaxRenderWidthProperty

readonly StyledProperty<double> VectSharp.MarkdownCanvas.MarkdownCanvasControl.MaxRenderWidthProperty = AvaloniaProperty.Register<MarkdownCanvasControl, double>(nameof(MaxRenderWidth), double.PositiveInfinity)
static

Defines the MaxRenderWidth property.

Definition at line 41 of file MarkdownCanvas.axaml.cs.

◆ MinRenderWidthProperty

readonly StyledProperty<double> VectSharp.MarkdownCanvas.MarkdownCanvasControl.MinRenderWidthProperty = AvaloniaProperty.Register<MarkdownCanvasControl, double>(nameof(MinRenderWidth), 200)
static

Defines the MinRenderWidth property.

Definition at line 55 of file MarkdownCanvas.axaml.cs.

◆ MinVariationProperty

readonly StyledProperty<double> VectSharp.MarkdownCanvas.MarkdownCanvasControl.MinVariationProperty = AvaloniaProperty.Register<MarkdownCanvasControl, double>(nameof(MinVariation), 10)
static

Defines the MinVariation property.

Definition at line 69 of file MarkdownCanvas.axaml.cs.

◆ TextConversionOptionsProperty

readonly StyledProperty<AvaloniaContextInterpreter.TextOptions> VectSharp.MarkdownCanvas.MarkdownCanvasControl.TextConversionOptionsProperty = AvaloniaProperty.Register<MarkdownCanvasControl, AvaloniaContextInterpreter.TextOptions>(nameof(TextConversionOption), AvaloniaContextInterpreter.TextOptions.ConvertIfNecessary)
static

Defines the TextConversionOption property.

Definition at line 110 of file MarkdownCanvas.axaml.cs.

Property Documentation

◆ Document

MarkdownDocument VectSharp.MarkdownCanvas.MarkdownCanvasControl.Document
getset

Gets or sets the currently displayed MarkdownDocument.

Definition at line 101 of file MarkdownCanvas.axaml.cs.

◆ DocumentSource

string VectSharp.MarkdownCanvas.MarkdownCanvasControl.DocumentSource
set

Sets the currently displayed document from Markdown source.

Definition at line 88 of file MarkdownCanvas.axaml.cs.

◆ MaxRenderWidth

double VectSharp.MarkdownCanvas.MarkdownCanvasControl.MaxRenderWidth
getset

The maximum width for the rendered document. This will be used even if the control's client area is larger than this (the alignment of the document within the controll will depend on the control's ContentControl.HorizontalContentAlignment).

Definition at line 46 of file MarkdownCanvas.axaml.cs.

◆ MinRenderWidth

double VectSharp.MarkdownCanvas.MarkdownCanvasControl.MinRenderWidth
getset

The minimum width for the rendered document. If the control's client area is smaller than this, the horizontal scroll bar will be activated.

Definition at line 60 of file MarkdownCanvas.axaml.cs.

◆ MinVariation

double VectSharp.MarkdownCanvas.MarkdownCanvasControl.MinVariation
getset

The minimum width variation that triggers a document reflow. If the control is resized, but the width changes by less than this amount, the document is not re-drawn.

Definition at line 74 of file MarkdownCanvas.axaml.cs.

◆ Renderer

MarkdownRenderer VectSharp.MarkdownCanvas.MarkdownCanvasControl.Renderer
get

The MarkdownRenderer used to render the Document. You can use the properties of this object to customise the rendering. Note that setting the Avalonia.Controls.Primitives.TemplatedControl.FontSize of the MarkdownCanvasControl will propagate to the Renderer's MarkdownRenderer.BaseFontSize.

Definition at line 125 of file MarkdownCanvas.axaml.cs.

◆ TextConversionOption

AvaloniaContextInterpreter.TextOptions VectSharp.MarkdownCanvas.MarkdownCanvasControl.TextConversionOption
getset

Gets or sets the value that determines whether text items should be converted into paths when drawing. Setting this to AvaloniaContextInterpreter.TextOptions.NeverConvert will improve performance if you are using custom fonts, but may cause unexpected results unless the font families being used are of type ResourceFontFamily.

Definition at line 116 of file MarkdownCanvas.axaml.cs.


The documentation for this class was generated from the following file: