0

I have group of control in DynamicGrid Grid. I want generate this grid on click of Button.

<Grid Name="DynamicGrid">
        <TextBlock Margin="218,43,490,353" Text="100"/>
        <ComboBox Margin="51,43,610,339">
            <ComboBoxItem IsSelected="True">Select</ComboBoxItem>
            <ComboBoxItem>Not Equal To</ComboBoxItem>
            <ComboBoxItem>Equal To</ComboBoxItem>
            <ComboBoxItem>Greater than</ComboBoxItem>
        </ComboBox>
        <ComboBox Margin="267,43,394,339">
            <ComboBoxItem IsSelected="True">Select</ComboBoxItem>
            <ComboBoxItem>Yellow</ComboBoxItem>
            <ComboBoxItem>Red</ComboBoxItem>
            <ComboBoxItem>Blue</ComboBoxItem>
        </ComboBox>
        <Button Name="Add" Content="+" Click="Add_Click" Margin="431,42,330,341" RenderTransformOrigin="0.5,0.5">
            <Button.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleY="-1"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Button.RenderTransform>
        </Button>
    </Grid>

i have button in this Grid. On button click this grid populated in Form. How can i achieve this? I have try in code behind as follow code:

  DynamicGrid.Children.Add(DynamicGrid);

But it is not working. Please Help.

0 Answers0