@@ -44,18 +44,20 @@ public class CustomTextAnnotation : RectangleAnnotation
4444 </chart:SfChart.SecondaryAxis>
4545
4646 <chart:SfChart.Annotations>
47- <local:CustomTextAnnotation HorizontalTextAlignment="Stretch" VerticalTextAlignment="Stretch" X1="1.6" X2="1.6" Y1="18" Y2="20" Fill="White" IsHitTestVisible="False" CanDrag="True" CanResize="True">
47+ <local:CustomTextAnnotation X1="1.6" X2="2.4" Y1="17.8" Y2="20.3" HorizontalTextAlignment="Center"
48+ VerticalTextAlignment="Center" CanDrag="True" CanResize="True" x:Name="annotation">
4849 <local:CustomTextAnnotation.Content>
4950 <StackPanel Orientation="Horizontal">
5051 <Path Data="M16.710899,36.727C20.7409,39.759457 25.747499,41.558827 31.1693,41.558827 36.588501,
51- 41.558827 41.596401,39.759457 45.627602,36.727 55.046902,37.911882 62.335999,
52- 45.946764 62.335999,55.688923L62.335999,64 0,64 0,55.688923C0,45.946764,7.2904,37.911882,
53- 16.710899,36.727z M31.169201,0C40.807137,0 48.622002,7.8164558 48.622002,
54- 17.455803 48.622002,27.095258 40.807137,34.909003 31.169201,34.909003 21.528767,
55- 34.909003 13.715,27.095258 13.715,17.455803 13.715,7.8164558 21.528767,0 31.169201,0z"
56- Stretch="Uniform" Fill="#606060" Height="50" Width="50"
57- RenderTransformOrigin="0.5,0.5"/>
58- <Button Content="Click Me" Width="145" Height="50" Click="Button_Click"/>
52+ 41.558827 41.596401,39.759457 45.627602,36.727 55.046902,37.911882 62.335999,
53+ 45.946764 62.335999,55.688923L62.335999,64 0,64 0,55.688923C0,45.946764,7.2904,37.911882,
54+ 16.710899,36.727z M31.169201,0C40.807137,0 48.622002,7.8164558 48.622002,
55+ 17.455803 48.622002,27.095258 40.807137,34.909003 31.169201,34.909003 21.528767,
56+ 34.909003 13.715,27.095258 13.715,17.455803 13.715,7.8164558 21.528767,0 31.169201,0z"
57+ Stretch="Uniform" Fill="#606060" Height="49" Width="49"/>
58+ <TextBox Text="Employee:Jack Profit:16%" x:Name="textBox" Height="49" BorderBrush="Transparent"
59+ TextWrapping="Wrap" FontSize="15" HorizontalContentAlignment="Center"
60+ VerticalContentAlignment="Center" Foreground="Black" Background="Transparent" Width="105" />
5961 </StackPanel>
6062 </local:CustomTextAnnotation.Content>
6163 </local:CustomTextAnnotation>
@@ -67,4 +69,4 @@ public class CustomTextAnnotation : RectangleAnnotation
6769
6870## Output:
6971
70- ![ Customized Rectangle Annotation with button] ( https://user-images.githubusercontent.com/102642528/211318119-488d4bda-402e-450e-ac06-b32592c28313 .png )
72+ ![ Customized Rectangle Annotation with button] ( https://user-images.githubusercontent.com/102642528/212282757-e057007f-7bc2-46b7-832f-712dc69bbf20 .png )
0 commit comments