Hi,
We are going to use vertical Info stips from sample as shown in following url:
http://samples.infragistics.com/sldv/RunSamples.aspx?cn=data-chart#/data-chart/chart-info-strips
It is working fine, but we want to add these strips dynamically in code instead of xaml, Is it possible to do so?
Thanks
By the way, this DataTemplate may work better for when you have thin strips such as that, to avoid label clipping.
<DataTemplate x:Key="VerticalInfoStripTemplate"> <Grid Margin="0" Width="{Binding Width}" Height="{Binding Height}"> <Rectangle Fill="{Binding Fill}" Opacity="1" /> <Canvas HorizontalAlignment="Right" VerticalAlignment="Top"> <Grid Margin="0" Width="{Binding Height}" Height="{Binding Width}"> <Grid.RenderTransform> <RotateTransform Angle="90" /> </Grid.RenderTransform> <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="DimGray" FontSize="30" FontWeight="Bold" Text="{Binding Label}" > <ToolTipService.ToolTip> <Grid> <Grid.RowDefinitions> <RowDefinition Height="25" /> <RowDefinition Height="25" /> <RowDefinition Height="25" /> <RowDefinition Height="25" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="100" /> <ColumnDefinition Width="200" /> </Grid.ColumnDefinitions> <TextBlock Text="Test0" Grid.Column="0" Grid.Row="0" /> <TextBlock Text="Tes0" Grid.Column="1" Grid.Row="0" /> <TextBlock Text="Test1" Grid.Column="0" Grid.Row="1" /> <TextBlock Text="Test1" Grid.Column="1" Grid.Row="1" /> <TextBlock Text="Test2" Grid.Column="0" Grid.Row="2" /> <TextBlock Text="Test2" Grid.Column="1" Grid.Row="2" /> <TextBlock Text="Test3" Grid.Column="0" Grid.Row="3" /> <TextBlock Text="Test3" Grid.Column="1" Grid.Row="3" /> </Grid> </ToolTipService.ToolTip> </TextBlock> </Grid> </Canvas> </Grid> </DataTemplate>
Alternatively you could use the LayoutTransformer in the Silverlight Toolkit to apply layout transforms to the labels rather than render transfroms.-Graham
Hi Graham,
It is working fine now.
To use date ranges with that info strips sample, you need to set UseDates = true on the strips.
Hope this helps!
-Graham
I have attached a sample project, which adds the info strips dynamically, but it is not working properly as it makes last added strip visible to complete chart.
Can you please help us to identify the issue?