--- a/client/src/Iri.Modernisation.Controls/View/AnnotationMaker/AnnotationMaker.xaml Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/AnnotationMaker/AnnotationMaker.xaml Tue Jan 05 15:53:48 2010 +0100
@@ -25,21 +25,29 @@
<Lang:LangResource x:Name="LangLabels" x:Key="LangLabels"></Lang:LangResource>
<Converter:TagArrayConverter x:Key="TagConvert"/>
+ <Converter:ColorToSolidBrush x:Key="ColorToBrush"/>
</ResourceDictionary>
</UserControl.Resources>
<Grid x:Name="AnnotationMakerPanel">
<StackPanel x:Name="HeaderAnnotationMarkerPanel" Height="33" Orientation="Horizontal" Margin="0,0,8,0" VerticalAlignment="Top">
<TextBlock Style="{StaticResource CommonTextBlock}" x:Name="HeaderAnnotationMakerLabel" Text="{Binding AnnotationMakerTitle, Source={StaticResource LangLabels}}" TextWrapping="Wrap" Width="166" Height="19" VerticalAlignment="Top"/>
- <ListBox Style="{StaticResource HorizontalListBox}" SelectedItem="{Binding SelectedType,Mode=TwoWay}" SelectedIndex="0" x:Name="TypeAnnotationList" Margin="-27,0,0,2" Width="137" >
-
- <Rectangle x:Name="RectPolemic" Fill="Red" Stroke="Black" Height="20" Width="22">
+ <ListBox Style="{StaticResource HorizontalListBox}" ItemsSource="{Binding ListAnnotationDescription}" SelectedItem="{Binding SelectedType,Mode=TwoWay}" x:Name="TypeAnnotationList" Margin="-27,0,0,2" Width="137" >
+ <ListBox.ItemTemplate>
+ <DataTemplate>
+ <Rectangle Fill="{Binding Color,Converter={StaticResource ColorToBrush}}" Stroke="Black" Height="20" Width="22"></Rectangle>
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ <!--
+ <Rectangle x:Name="RectPolemic" Fill="Red" Stroke="Black" Height="20" Width="22">
</Rectangle>
<Rectangle x:Name="RectAdhesion" Fill="#FF13FF00" Stroke="Black" Height="20" Width="22"/>
<Rectangle x:Name="RectReferences" Fill="#FF0D00FF" Stroke="Black" Height="20" Width="22"/>
<Rectangle x:Name="RectQuestion" Fill="#FFE7FF02" Stroke="Black" Height="20" Width="22"/>
- </ListBox>
+
+ -->
+ </ListBox>
</StackPanel>
<StackPanel x:Name="AnnotationTimeLinePanel" Height="87" VerticalAlignment="Top" Margin="0,37,0,0" >
<Slider x:Name="TimeControl" Minimum="{Binding RefElement.TimerIn.TotalMilliseconds, Mode=TwoWay}" Maximum="{Binding RefElement.TimerOut.TotalMilliseconds, Mode=TwoWay}" />
@@ -61,8 +69,8 @@
<TextBox x:Name="TitleAnnotationTextBox" HorizontalAlignment="Left" Width="223" Text="{Binding Title, Mode=TwoWay}" TextWrapping="Wrap" VerticalAlignment="Top" Margin="24,0,0,0"/>
<TextBox x:Name="DescriptionAnnotationTextBox" Text="{Binding Description, Mode=TwoWay}" TextWrapping="Wrap" Margin="12,24,0,0" Height="48" VerticalAlignment="Top" AcceptsReturn="True" VerticalScrollBarVisibility="Visible"/>
<TextBox x:Name="KeyWordAnnotationTextBox" Text="{Binding Tags, Mode=TwoWay}" TextWrapping="Wrap" Margin="12,-18,0,0" Grid.Row="1" d:LayoutOverrides="Height"/>
- <Rectangle Fill="{Binding SelectedItem.Fill, ElementName=TypeAnnotationList, Mode=OneWay}" Stroke="Black" Height="21" HorizontalAlignment="Left" VerticalAlignment="Top" Width="20"/>
- <Rectangle Fill="{Binding SelectedItem.Fill, ElementName=TypeAnnotationList, Mode=OneWay}" Stroke="Black" HorizontalAlignment="Left" Margin="0,20,0,0" Width="8" Grid.RowSpan="2"/>
+ <Rectangle Fill="{Binding SelectedType.Color,Converter={StaticResource ColorToBrush}}" Stroke="Black" Height="21" HorizontalAlignment="Left" VerticalAlignment="Top" Width="20"/>
+ <Rectangle Fill="{Binding SelectedType.Color,Converter={StaticResource ColorToBrush}}" Stroke="Black" HorizontalAlignment="Left" Margin="0,20,0,0" Width="8" Grid.RowSpan="2"/>
<TextBlock Style="{StaticResource CommonTextBlock}" x:Name="KeyWordLabel" Text="{Binding RefTags, Converter={StaticResource TagConvert}}" TextWrapping="Wrap" Margin="12,79,0,22"/>
@@ -70,11 +78,18 @@
<StackPanel x:Name="AnnotationContextualLinkPanel" Height="74" Margin="0,0,8,0" VerticalAlignment="Bottom">
<TextBlock Style="{StaticResource CommonTextBlock}" x:Name="AnnotationContextualLinkLabel" Text="{Binding AnnotationMakerAddLinkLabel, Source={StaticResource LangLabels}}" TextWrapping="Wrap"/>
<TextBlock Style="{StaticResource CommonTextBlock}" x:Name="AnnotationContextualBindedLabel" TextWrapping="Wrap" HorizontalAlignment="Left" Width="295" Text="{Binding PolemicRelation.ToElement.Title}" Height="26"/>
- <StackPanel x:Name="ContextualBinderPanel" Orientation="Horizontal">
- <View:ContextualLinkBinder PolemicType="Polemic" x:Name="Binder1" />
+ <ListBox ItemsSource="{Binding ListAnnotationDescription}" Style="{StaticResource HorizontalListBox}" Margin="0,0,72,0" Height="32">
+ <ListBox.ItemTemplate>
+ <DataTemplate>
+ <View:ContextualLinkBinder PolemicType="{Binding}" />
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ </ListBox>
+ <StackPanel x:Name="ContextualBinderPanel" Orientation="Horizontal" >
+ <!--<View:ContextualLinkBinder PolemicType="Polemic" x:Name="Binder1" />
<View:ContextualLinkBinder PolemicType="Adhesion" x:Name="Binder2" />
<View:ContextualLinkBinder PolemicType="Reference" x:Name="Binder3" />
- <View:ContextualLinkBinder PolemicType="Question" x:Name="Binder4"/>
+ <View:ContextualLinkBinder PolemicType="Question" x:Name="Binder4"/> -->
</StackPanel>