AnnotationCreationModifier
Ein benutzerdefiniertes ChartModifierBase, das in Verbindung mit AnnotationCollection verwendet werden kann. Das AnnotationCreationModifier ermöglicht die Erstellung von Anmerkungen mit Mausklick und Drag. Sehen Sie das Beispiel der Verwendung CreateAnnotationsDynamically in der Beispiel-Suite
Erbt von: ChartModifierBase
Eigenschaften
public IAnnotation Annotation { get; }
value = annotationCreationModifier.Annotation
Bekommt die neu erstellte IAnnotation
public Style AnnotationStyle { get; set; }
value = annotationCreationModifier.AnnotationStyle
annotationCreationModifier.AnnotationStyle = value
Bekommt oder legt einen Stil fest, der auf die erstellte Annotation angewendet werden soll
public Type AnnotationType { get; set; }
value = annotationCreationModifier.AnnotationType
annotationCreationModifier.AnnotationType = value
Bekommt oder legt den Typ der Anmerkung fest, die erstellt werden soll
public string XAxisId { get; set; }
value = annotationCreationModifier.XAxisId
annotationCreationModifier.XAxisId = value
Bekommt oder legt die ID der X-Achse fest, an der diese Anmerkung gemessen wird
public string YAxisId { get; set; }
value = annotationCreationModifier.YAxisId
annotationCreationModifier.YAxisId = value
Bekommt oder legt die ID der Y-Achse fest, an der diese Anmerkung gemessen wird
Methoden
protected virtual AnnotationBase CreateAnnotation(Type annotationType, Style annotationStyle)
result = annotationCreationModifier.CreateAnnotation(annotationType, annotationStyle)
Erstellt eine Anmerkung des angegebenen Typs und wendet den Stil darauf an
- annotationType
- Die Art der Anmerkung zu erstellen
- annotationStyle
- Der Stil, der auf die Annotation anzuwenden ist
Rückgabe: Die Annotation Instanz
protected void OnAnnotationCreated()
annotationCreationModifier.OnAnnotationCreated()
Und wenn sie (noch) gerufen werden.
protected override void OnIsEnabledChanged()
annotationCreationModifier.OnIsEnabledChanged()
Aufrufen, wenn sich die IsEnabled-Eigenschaft in dieser ChartModifierBase-Instanz ändert
public override void OnModifierMouseMove(ModifierMouseArgs mouseEventArgs)
annotationCreationModifier.OnModifierMouseMove(mouseEventArgs)
Aufrufen, wenn die Maus auf dem Elternteil UltrachartSurface @ bewegt wird
- mouseEventArgs
- Argumente, die die Mausbewegungsoperation beschreiben
public override void OnModifierMouseUp(ModifierMouseArgs mouseButtonEventArgs)
annotationCreationModifier.OnModifierMouseUp(mouseButtonEventArgs)
Aufrufen, wenn eine Maustaste auf dem Elternteil UltrachartSurface
- mouseButtonEventArgs
- Argumente zur Detaillierung der Maustastenoperation
Ereignisse
public event EventHandler AnnotationCreated
annotationCreationModifier.AnnotationCreated += handler
Ereignis, das ausgelöst wird, wenn eine Anmerkung erstellt wird
Felder
public static readonly DependencyProperty XAxisIdProperty
value = AnnotationCreationModifier.XAxisIdProperty
Definiert die XAxisIdDependencyProperty
public static readonly DependencyProperty YAxisIdProperty
value = AnnotationCreationModifier.YAxisIdProperty
Definiert die YAxisIdDependencyProperty