none
grid layout RRS feed

  • Question

  • Hi,all

     

     I have a application. the following is the grid layout. now the MediaElement is (1,1) in the grid. I want to click the button change the MediaElement (2,2) .

     

    please help me

    thanks

     

    <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="*" />
                <RowDefinition Height="*" />
                <RowDefinition Height="*" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <MediaElement  Grid.Column="1" Grid.Row="1" Source="1.wmv"  Name="mediaElement1" />
            <Button Height="23" Grid.Row="5" Name="button1" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="75" Click="button1_Click">Change</Button>
        </Grid>

    Wednesday, August 22, 2007 8:11 AM

Answers

  •  

    I have found the solution for the question.

     

    grid.setColumn();

    grid.setRow();

     

     

    thanks all

    Tuesday, August 28, 2007 3:16 AM