chartその4

ツールチップを表示した。

ほんとは、赤青両方同時に表示したいけど、xaml難しい。

そのうちやろう・・・

xaml
[xml]
<Grid.Resources>
<ControlTemplate x:Key="mark_template" TargetType="chartingToolkit:LineDataPoint">
<Grid Width="20">
<Border BorderBrush="Black" BorderThickness="0">
<Rectangle Fill="Blue" Opacity="0"/>
</Border>
<ToolTipService.ToolTip>
<StackPanel Orientation="Vertical">
<ContentControl Content="{Binding Key}" ContentStringFormat="M/d H:mm" Foreground="Blue" FontWeight="Bold" HorizontalAlignment="Center"></ContentControl>
<ContentControl Content="{Binding Value}" Foreground="Blue" FontWeight="Bold" HorizontalAlignment="Center"></ContentControl>
</StackPanel>
</ToolTipService.ToolTip>
</Grid>
</ControlTemplate>
<ControlTemplate x:Key="mark_template2" TargetType="chartingToolkit:LineDataPoint">
<Grid Width="20">
<Border BorderBrush="Black" BorderThickness="0">
<Rectangle Fill="Blue" Opacity="0"/>
</Border>
<ToolTipService.ToolTip>
<StackPanel Orientation="Vertical">
<ContentControl Content="{Binding Key}" ContentStringFormat="M/d H:mm" Foreground="Red" FontWeight="Bold" HorizontalAlignment="Center"></ContentControl>
<ContentControl Content="{Binding Value}" Foreground="Red" FontWeight="Bold" HorizontalAlignment="Center"></ContentControl>
</StackPanel>
</ToolTipService.ToolTip>
</Grid>
</ControlTemplate>
</Grid.Resources>
[/xml]

コメントを残す

%d人のブロガーが「いいね」をつけました。