Class AnnotationEditorViewModel
Represent a block of text that can be displayed over a node or connector.
Inheritance
Implements
Namespace: Syncfusion.UI.Xaml.Diagram
Assembly: Syncfusion.SfDiagram.WPF.dll
Syntax
public class AnnotationEditorViewModel : Object, INodeAnnotation, IConnectorAnnotation, IAnnotation, INotifyPropertyChanged
Constructors
AnnotationEditorViewModel()
Initializes a new instance of the AnnotationEditorViewModel class.
Declaration
public AnnotationEditorViewModel()
Properties
Alignment
Gets or sets the alignment of the annotation.
Declaration
public ConnectorAnnotationAlignment Alignment { get; set; }
Property Value
Type |
---|
ConnectorAnnotationAlignment |
AnnotationRelativeMode
Gets or sets whether the annotation placed on bounds or path.
Declaration
public AnnotationRelativeMode AnnotationRelativeMode { get; set; }
Property Value
Type |
---|
AnnotationRelativeMode |
Background
Gets or sets a brush that describes the background.
Declaration
public Brush Background { get; set; }
Property Value
Type |
---|
System.Windows.Media.Brush |
Constraints
Gets or sets the constraints of the annotation.
Declaration
public AnnotationConstraints Constraints { get; set; }
Property Value
Type |
---|
AnnotationConstraints |
Content
Gets or sets the content of the annotation.
Declaration
public object Content { get; set; }
Property Value
Type |
---|
System.Object |
Displacement
Gets or sets the annotation location over the connector Path(Absolute).
Declaration
public double Displacement { get; set; }
Property Value
Type |
---|
System.Double |
DragLimit
Gets or sets the draglimit of the annotation.
Declaration
public Thickness DragLimit { get; set; }
Property Value
Type |
---|
System.Windows.Thickness |
EditTemplate
Gets or sets the data template used to display the annotation in editmode.
Declaration
public DataTemplate EditTemplate { get; set; }
Property Value
Type |
---|
System.Windows.DataTemplate |
FontFamily
Gets or sets the fontfamily of the annotation.
Declaration
public FontFamily FontFamily { get; set; }
Property Value
Type |
---|
System.Windows.Media.FontFamily |
FontSize
Gets or sets the size of the text.
Declaration
public double FontSize { get; set; }
Property Value
Type |
---|
System.Double |
FontStyle
Gets or sets the FontStyle of the Annotation.
Declaration
public FontStyle FontStyle { get; set; }
Property Value
Type |
---|
System.Windows.FontStyle |
FontWeight
Gets or sets the FontWeight of the Annotation.
Declaration
public FontWeight FontWeight { get; set; }
Property Value
Type |
---|
System.Windows.FontWeight |
Foreground
Gets or sets a brush that describes the foreground color.
Declaration
public Brush Foreground { get; set; }
Property Value
Type |
---|
System.Windows.Media.Brush |
HorizontalAlignment
Gets or sets the horizontal alignment characteristics applied to this element when it is composed within a parent element such as a node or connector.
Declaration
public HorizontalAlignment HorizontalAlignment { get; set; }
Property Value
Type |
---|
System.Windows.HorizontalAlignment |
LabelWidth
Gets or sets the width of the Annotation(If the LabelWidth is greater than Node Width, then LabelWidth will be replaced with the Node Width.).
Declaration
public double LabelWidth { get; set; }
Property Value
Type |
---|
System.Double |
Length
Gets or sets the annotation location over the connector Path(Fraction).
Declaration
public double Length { get; set; }
Property Value
Type |
---|
System.Double |
Margin
Gets or sets the margin of the annotation.
Declaration
public Thickness Margin { get; set; }
Property Value
Type |
---|
System.Windows.Thickness |
Mode
Gets or sets whether the annotation is currently being edited or not.
Declaration
public ContentEditorMode Mode { get; set; }
Property Value
Type |
---|
ContentEditorMode |
Offset
Gets or sets the fraction/ratio(relative to node) that Gets or sets the position of the annotation.
Declaration
public Point Offset { get; set; }
Property Value
Type |
---|
System.Windows.Point |
Pivot
Gets or sets the pivot point of the annotation.
Declaration
public Point Pivot { get; set; }
Property Value
Type |
---|
System.Windows.Point |
ReadOnly
Gets or sets a value indicates whether the annotation is editable.
Declaration
public bool ReadOnly { get; set; }
Property Value
Type |
---|
System.Boolean |
RotateAngle
Gets or sets how the Annotation text needs to be Rotated.
Declaration
public double RotateAngle { get; set; }
Property Value
Type |
---|
System.Double |
Remarks
Default RotateAngle value of LaneHeader's Annotation is 270 degrees. If we want to place the Annotation in the Horizontal direction, we have to set the RotateAngle of LaneHeader's Annotation as 360 degrees.
RotationReference
Gets or sets the drag state of annotation.
Declaration
public RotationReference RotationReference { get; set; }
Property Value
Type |
---|
RotationReference |
TextDecorations
Gets or sets the TextDecorations of the Annotation.
Declaration
public TextDecorationCollection TextDecorations { get; set; }
Property Value
Type |
---|
System.Windows.TextDecorationCollection |
TextHorizontalAlignment
Gets or sets the horizontal alignment of the annotation's text
Declaration
public TextAlignment TextHorizontalAlignment { get; set; }
Property Value
Type |
---|
System.Windows.TextAlignment |
TextTrimming
Gets or sets the texttrimming of the annotation.
Declaration
public TextTrimming TextTrimming { get; set; }
Property Value
Type |
---|
System.Windows.TextTrimming |
TextVerticalAlignment
Gets or sets the vertical alignment of the annotation's text.
Declaration
public VerticalAlignment TextVerticalAlignment { get; set; }
Property Value
Type |
---|
System.Windows.VerticalAlignment |
UnitHeight
Gets or sets the height of the annotation.
Declaration
public double UnitHeight { get; set; }
Property Value
Type |
---|
System.Double |
UnitWidth
Gets or sets the width of the annotation.
Declaration
public double UnitWidth { get; set; }
Property Value
Type |
---|
System.Double |
VerticalAlignment
Gets or sets the vertical alignment characteristics applied to this element when it is composed within a parent element such as a node or connector.
Declaration
public VerticalAlignment VerticalAlignment { get; set; }
Property Value
Type |
---|
System.Windows.VerticalAlignment |
ViewTemplate
Gets or sets the data template used to display the annotation in viewmode.
Declaration
public DataTemplate ViewTemplate { get; set; }
Property Value
Type |
---|
System.Windows.DataTemplate |
WrapText
Gets or sets how the annotation text needs to be wrapped.
Declaration
public TextWrapping WrapText { get; set; }
Property Value
Type |
---|
System.Windows.TextWrapping |
Methods
OnPropertyChanged(String)
Invoked whenever the effective value of any dependency property on this FrameworkElement has been updated. The specific dependency property that changed is reported in the arguments parameter. Overrides OnPropertyChanged(name).
Declaration
protected virtual void OnPropertyChanged(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Events
PropertyChanged
Occurs when a property value changes.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type |
---|
System.ComponentModel.PropertyChangedEventHandler |