Я пробовал вызывать ZoomExtents() и InvalidateElement()< /code>, но не устраняет проблему.
Я создал простое приложение, позволяющее воспроизвести проблему простым и минимальным способом.
PeakAnnotation.xaml
Код: Выделить всё
Код: Выделить всё
public partial class PeakAnnotation : CompositeAnnotation
{
public PeakAnnotation()
{
}
public PeakAnnotation(string annotationText)
{
InitializeComponent();
AnnotationTextLabel.Text = annotationText;
}
public string StyleKey { get; set; }
public Type ViewType => throw new NotImplementedException();
}
Код: Выделить всё
public MainViewModel()
{
ChartTitle = "Testing";
Annotations = new AnnotationCollection();
var myAnnotation = new PeakAnnotation("My Annotation Title")
{
X1 = 40,
X2 = 50,
Y1 = 0,
Y2 = 100
};
Annotations.Add(myAnnotation);
}
public string ChartTitle { get; set; }
public AnnotationCollection Annotations { get; set; }
}
Код: Выделить всё

Неработающая аннотация:
[img]https://i. sstatic.net/IhyHg.png[/img]
Подробнее здесь: https://stackoverflow.com/questions/626 ... tabcontrol
Мобильная версия