<UserControl.Resources>
<!-- EventPoint オブジェクトのスタイル -->
<Style x:Key="rscEventPointStyle" TargetType="igtl:EventPoint">
<Setter Property="Width" Value="12" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="igtl:EventPoint">
<Grid>
<!-- 点をマークするために矩形を使用します -->
<Rectangle Fill="{TemplateBinding Fill}"
Stroke="{TemplateBinding Stroke}"
StrokeThickness="1"
Width="{TemplateBinding Width}"
Height="{TemplateBinding Width}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Legend オブジェクトのスタイル -->
<Style x:Key="rscLegendStyle" TargetType="igtl:Legend">
<Setter Property="BorderBrush" Value="Black"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="IsTabStop" Value="/>
<Setter Property="TitleStyle">
<Setter.Value>
<Style TargetType="igtl:Title">
<Setter Property="Margin" Value="0,5,0,10"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="igtl:Legend">
<Border Background="BlanchedAlmond"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="0"
Padding="2" Margin="10,10,10,0"
Height="200" Width="150">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<igtl:Title Grid.Row="0"
Content="{TemplateBinding Title}"
Style="{TemplateBinding TitleStyle}"/>
<ScrollViewer Grid.Row="1"
VerticalScrollBarVisibility="Auto"
BorderThickness="0"
Padding="0" IsTabStop=">
<StackPanel Grid.Column="1" x:Name="LegendItemsArea" Margin="10,0,10,10" />
</ScrollViewer>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- LegendItem オブジェクトのスタイル -->
<Style x:Key="rscLegendItemSpanStyle" TargetType="igtl:LegendItem">
<Setter Property="IsTabStop" Value="/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="igtl:LegendItem">
<StackPanel Orientation="Horizontal" Margin="0,0,0,0">
<!-- スパン イベントを表すために Border として凡例項目を表示します -->
<Border Width="22" Height="10" CornerRadius="5"
Background="{TemplateBinding Fill}"
BorderBrush="{TemplateBinding Stroke}"
BorderThickness="1" Margin="6,4,6,6" >
</Border>
<igtl:Title Content="{TemplateBinding Content}" />
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="rscLegendItemRectStyle" TargetType="igtl:LegendItem">
<Setter Property="IsTabStop" Value="/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="igtl:LegendItem">
<StackPanel Orientation="Horizontal" Margin="0,0,0,0">
<!-- 凡例項目を矩形として表示します -->
<Rectangle Width="12" Height="12" Margin="12,2,12,6"
Fill="{TemplateBinding Fill}"
Stroke="{TemplateBinding Stroke}"
StrokeThickness="1.5" />
<igtl:Title Content="{TemplateBinding Content}" />
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>