locked
Set Colour To Different Column of Grid WinRT C#

    Question

  • I am new to windows development .

    Presently i am making a small windows app . And i wanted to know that is there any possible way to set colors to different columns of main GRID (without use of any nesting Grids within the main Grid).


    Thanks In Advance

    Saturday, July 12, 2014 8:22 PM

Answers

  • Hi,

    You can use stackPanel/Grid in Main Grid. And there is no way to define the Grid columns color without set a panel(like stackPanel or Grid) in Main Grid:

     <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
            <Grid.RowDefinitions>
                <RowDefinition Height="150"></RowDefinition>
                <RowDefinition></RowDefinition>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0" Background="AliceBlue"></StackPanel>
            <StackPanel Grid.Row="1" Background="Beige"></StackPanel>
        </Grid>
    Best Wishes!
     


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    Monday, July 14, 2014 2:10 AM

All replies

  • Hi,

    You can use stackPanel/Grid in Main Grid. And there is no way to define the Grid columns color without set a panel(like stackPanel or Grid) in Main Grid:

     <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
            <Grid.RowDefinitions>
                <RowDefinition Height="150"></RowDefinition>
                <RowDefinition></RowDefinition>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0" Background="AliceBlue"></StackPanel>
            <StackPanel Grid.Row="1" Background="Beige"></StackPanel>
        </Grid>
    Best Wishes!
     


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    Monday, July 14, 2014 2:10 AM
  • Thanks a lot for replying @Anne Jing 

    you answer is helpful .
    Tuesday, July 15, 2014 7:51 PM