Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1490
get the position of Chart Info Strips
posted

Hi,

I have studied the sample of  Chart Info Strips, and I do below changes to make the info strip be movable:

First, import these two dlls(Microsoft.Expression.Interactions,System.Windows.Interactivity) in IGDataChart.WPF and Infragistics.SamplesBrowser.WPF project, and then in ChartInfoStrips.xaml, I add 

<i:Interaction.Behaviors>
<il:MouseDragElementBehavior ConstrainToParentBounds="False" />
</i:Interaction.Behaviors>

under TextBlock.

<DataTemplate x:Key="VerticalInfoStripTemplate">
<Grid Margin="0" Width="{Binding Width}" Height="{Binding Height}">
<Rectangle Fill="{Binding Fill}" Opacity="1" />
<TextBlock HorizontalAlignment="Center" Cursor="Hand" VerticalAlignment="Center" Foreground="DimGray"
FontSize="30" FontWeight="Bold" Text="{Binding Label}" RenderTransformOrigin=".5,.5">
<i:Interaction.Behaviors>
<il:MouseDragElementBehavior ConstrainToParentBounds="False" />
</i:Interaction.Behaviors>
<TextBlock.RenderTransform>
<RotateTransform Angle="90" />
</TextBlock.RenderTransform>
</TextBlock>
</Grid>
</DataTemplate>

Now it's movable. The requirement is  when I move it to another position, I want to get the position of it, and then save the position in order that when next time I open the page, it's in the position where I move it before.

Do I make my self clearly?  Waiting for your answer, thanks~~