C# 使SciChart TextAnnotation遵守其给定的X2值
有没有办法使TextAnnotation尊重其X2值?我想在某个日期时间开始一个TextAnnotation并扩展到另一个日期时间。我会使用框注释,但我需要它包含文本并动态生成。在SciChart WPF中,只响应X1,X2值 可以使用HorizontalAnchorPoint/VerticalAnchorPoint特性设置文本注释的对齐方式 您可以设置文本批注的宽度/高度 如果要在框区域(x1,x2,y1,y2)中显示文本,则考虑.< /p>C# 使SciChart TextAnnotation遵守其给定的X2值,c#,wpf,xaml,scichart,C#,Wpf,Xaml,Scichart,有没有办法使TextAnnotation尊重其X2值?我想在某个日期时间开始一个TextAnnotation并扩展到另一个日期时间。我会使用框注释,但我需要它包含文本并动态生成。在SciChart WPF中,只响应X1,X2值 可以使用HorizontalAnchorPoint/VerticalAnchorPoint特性设置文本注释的对齐方式 您可以设置文本批注的宽度/高度 如果要在框区域(x1,x2,y1,y2)中显示文本,则考虑.< /p> 在SciChart WPF中,仅响应X1、X
在SciChart WPF中,仅响应X1、X2值
可以使用HorizontalAnchorPoint/VerticalAnchorPoint特性设置文本注释的对齐方式
您可以设置文本批注的宽度/高度
如果要在框区域(x1,x2,y1,y2)中显示文本,则考虑.< /p>
<s:SciChartSurface.Annotations>
<s:BoxAnnotation X1="2" X2="8" Y1="2" Y2="8" Background="#33FFFFFF"
BorderBrush="#55FFFFFF" BorderThickness="3" Padding="5">
<s:BoxAnnotation.Template>
<ControlTemplate TargetType="s:BoxAnnotation">
<Border x:Name="PART_BoxAnnotationRoot"
Margin="{TemplateBinding Margin}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}">
<Viewbox Margin="{TemplateBinding Padding}">
<TextBlock Text="Hello CustomAnnotation World!"></TextBlock>
</Viewbox>
</Border>
</ControlTemplate>
</s:BoxAnnotation.Template>
</s:BoxAnnotation>
</s:SciChartSurface.Annotations>