How to programmatically Show/Hide Annotations
We have a support to customize the Visibility of Annotation. This can be achieved by using custom class from AnnotationEditorViewModel and ViewTemplate property of Annotation. We have provided code example, sample and screenshots to represent this.
Please refer to the code example, sample and screenshots as below.
C#
//Annotation collection
node.Annotations = new ObservableCollection<AnnotationEditorViewModel>
{
new Annotation()
{
Content="node",
//set visibility as Visible|Collapsed to Annotation content
Visibility=Visibility.Collapsed,
ViewTemplate=this.Resources["viewtemplate"] as DataTemplate
}
};
Here, node is instance of Node.
Sample Link:
https://www.syncfusion.com/downloads/support/directtrac/154014/ze/UWP-11691932196859
Screenshots:

