Source

main / Source / Excel / Excel.AddIn / Excel.AddIn / View / Usercontrols / Metadata.xaml

Diff from to

Source/Excel/Excel.AddIn/Excel.AddIn/View/Usercontrols/Metadata.xaml

                     </TextBlock>
                     <TextBox x:Name="MetadataTextBox"
                              Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=True}"
-                             Style="{DynamicResource TextBoxStyle}">
+                             Style="{DynamicResource TextBoxStyle}" TextWrapping="Wrap" AcceptsReturn="True" MaxLength="200" VerticalScrollBarVisibility="Auto"  
+>
                     </TextBox>
                     <ContentControl IsEnabled="{Binding ElementName=MetadataTextBox,Path=(Validation.HasError),Mode=OneWay}" Style="{DynamicResource ErrorContentControl}" Content="{Binding ElementName=MetadataTextBox ,Path=(Validation.Errors).CurrentItem.ErrorContent}"/>
                 </StackPanel>
                         <Setter Property="Text" Value="*" TargetName="MandatoryText"/>
                         <Setter Property="Foreground" Value="Red" TargetName="MandatoryText"/>
                     </DataTrigger>
+                    <DataTrigger Binding="{Binding Type}" Value="TextArea">
+                        <Setter Property="MaxLength" Value="3000" TargetName="MetadataTextBox"/>
+                        <Setter TargetName="MetadataTextBox" Property="Height" Value="60" />
+                    </DataTrigger>
                 </DataTemplate.Triggers>
             </DataTemplate>
         </ResourceDictionary>
         <TextBlock Text="Describe your data by completing the metadata fields below. Required fields are designated by a red asterisk." 
                    Style="{DynamicResource DescriptionTextStyle}" Margin="0,10" Foreground="{DynamicResource LabelForeground}"/>
 
-        <TabControl Grid.Row="1" ItemContainerStyle="{DynamicResource ErrorTabItemStyle}" Style="{DynamicResource WizardTabControl}" Tag="ErrorTab" Margin="0,10,0,0">
+        <TabControl Grid.Row="1" ItemContainerStyle="{DynamicResource ErrorTabItemStyle}" Style="{DynamicResource WizardTabControl}" Tag="ErrorTab" Margin="0,10,0,0" 
+                    SelectedIndex="{Binding SelectedTabIndex, Mode=TwoWay}">
             <TabItem Header="Data descriptions" Tag="0">
 
                 <Grid>
                               CanUserAddRows="False" CanUserDeleteRows="False" IsManipulationEnabled="False" IsReadOnly="False"
                               VerticalGridLinesBrush="{DynamicResource GridVerticalLineBrush}" Grid.Row="1" AutoGenerateColumns="False">
                         <DataGrid.Columns>
-                            <DataGridTemplateColumn Width="100" Header="Name">
+                            <DataGridTemplateColumn Width="100" Header="Entity Name *">
                                 <DataGridTemplateColumn.CellTemplate>
                                     <DataTemplate>
-                                        <TextBox Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ToolTip="{Binding Name}" />
+                                        <ComboBox SelectedItem="{Binding EntityName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                  ItemsSource="{Binding DataContext.EntityNameList, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
+                                    </DataTemplate>
+                                </DataGridTemplateColumn.CellTemplate>
+                            </DataGridTemplateColumn>
+                            <DataGridTemplateColumn Width="200" Header="Entity Description">
+                                <DataGridTemplateColumn.CellTemplate>
+                                    <DataTemplate>
+                                        <TextBox Text="{Binding EntityDescription, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ToolTip="{Binding EntityDescription}"/>  
+                                    </DataTemplate>
+                                </DataGridTemplateColumn.CellTemplate>
+                            </DataGridTemplateColumn>
+
+                            <DataGridTemplateColumn Width="100" Header="Name *">
+                                <DataGridTemplateColumn.CellTemplate>
+                                    <DataTemplate>
+                                        <TextBox Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=true}" ToolTip="{Binding Name}" />
                                     </DataTemplate>
                                 </DataGridTemplateColumn.CellTemplate>
                             </DataGridTemplateColumn>
                                     </DataTemplate>
                                 </DataGridTemplateColumn.CellTemplate>
                             </DataGridTemplateColumn>
-                            <DataGridTemplateColumn Width="50">
+                            <DataGridTemplateColumn Width="60" Header="Delete">
                                 <DataGridTemplateColumn.CellTemplate>
                                     <DataTemplate>
                                         <Button Style="{DynamicResource CloseMinimizeButtonStyle}" CommandParameter="{Binding}"