I would like to be able to resize the TextAnnotation but couldn’t. The only thing I can do is move by clicking on the small circle at the top left corner of the Text annotation.
How can I resize text annotation manually with mouse like how I do a BoxAnnotation?
- Selva Arun asked 7 years ago
- You must login to post comments
Hi Selva,
Thanks for your question. TextAnnotation doesn’t work like BoxAnnotation. It doesn’t allow resizing.
I would suggest re-templating the BoxAnnontation to show text inside it. The default template is quite simple:
<ControlTemplate TargetType="a:BoxAnnotation">
<Border x:Name="PART_BoxAnnotationRoot"
Margin="{TemplateBinding Margin}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}" />
</ControlTemplate>
So if you just put a TextBlock inside the Border, it should work right as you want.
Does this make sense?
- Yuriy Zadereckiy answered 7 years ago
- You must login to post comments
Please login first to submit.