Retieve and save the Dynamic added control in WPF Xaml? : Hi I have a **Add** Button When I click on it through Command I add it to a collection.


 

     <ItemsControl ItemsSource="{Binding Collection}">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <Grid DataContext="{StaticResource VieWModel}">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="15*"/>
                                    <ColumnDefinition Width="40*"/>
                                </Grid.ColumnDefinitions>
                                <Label Content="GH" Grid.Row="0" Grid.Column="0" VerticalContentAlignment="Center"></Label>
                                <tk:RadComboBox Grid.Row="0" Grid.Column="0" Margin="10" IsFilteringEnabled="True" Width="150" DisplayMemberPath="D"  IsEditable="True" ItemsSource="{Binding GK}"  SelectedItem="{Binding SK, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
                                    <i:Interaction.Triggers>
                                        <i:EventTrigger EventName="SelectionChanged">
                                            <i:InvokeCommandAction Command="{Binding SelectionChangedCommand}" CommandParameter="{Binding}"/>
                                        </i:EventTrigger>
                                    </i:Interaction.Triggers>
                                </tk:RadComboBox>
                                <Label Content="HB" Grid.Row="0" Grid.Column="1" VerticalContentAlignment="Center"></Label>
                                <tk:RadComboBox  Grid.Row="0" Grid.Column="1" Margin="10" IsFilteringEnabled="True" Name="cb"  Width="350" IsEditable="True" DisplayMemberPath="D"  ItemsSource="{Binding VR}" SelectedItem="{Binding VR1,Mode=TwoWay}">
                                </tk:RadComboBox>
                            </Grid>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>

Whenever I click the **Add Button** this itemplate will be added.


**MyRequirement** : 

1. When I Click **Add Button** for the first time ,template should get added
2. When I click **Add Button** for the second time Previous generated controls Must have contain the values,only then controls should be created
3. And I dont know how to save those values dynamically created in a collection

I am running out of Ideas how to achieve this can anyone help . **MVVM pattern**
