Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8533981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:05:25+00:00 2026-06-11T10:05:25+00:00

I have created XAML ,with grid structure ,with 3 or 4 rows ,each row

  • 0

I have created XAML ,with grid structure ,with 3 or 4 rows ,each row containing two columns,If i want to set the color for the each row and border line around each row and column ,how can i achieve it.

I am new to this Ui creation in XAML especially,Anyidea regarding how to achieve this will be useful`

                    <TextBlock Foreground="Black"  Text="Account Number :"   Margin="10" Grid.ColumnSpan="2"  />
                    <TextBlock Foreground="Black" x:Name="accNO" Text="" Grid.Column="2" Margin="10"/>

                    <TextBlock Foreground="Black" Text="Currency  :" Grid.Row="1" Margin="10" Grid.ColumnSpan="2" />
                    <TextBlock Foreground="Black" x:Name="accCurr" Text="" Grid.Row="1" Grid.Column="2" Margin="10"/>
                    <TextBlock Foreground="Black" Text="Acount Balance  :" Grid.Row="2" Margin="10" Grid.ColumnSpan="2" />
                    <TextBlock Foreground="Black" x:Name="accOBal" Text="" Grid.Row="2" Grid.Column="2" Margin="10"/>
                    <TextBlock Foreground="Black" Text="Available Balance :" Grid.Row="3" Margin="10" Grid.ColumnSpan="2" />
                    <TextBlock Foreground="Black" x:Name="avBal" Text="" Grid.Row="3" Grid.Column="2" Margin="10"/>

                </Grid>`

I have updated codes for getting table as my requirements

  <Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" BorderThickness="1" BorderBrush="White">
                        <Border.Background>
                            <LinearGradientBrush EndPoint="1,0" StartPoint="1,1">
                                <GradientStop Color="LightGray" Offset="0" />
                                <GradientStop Color="LightGray" Offset="1" />
                            </LinearGradientBrush>                           
                        </Border.Background>
                        <TextBlock Foreground="Black"  Text="Account Number :"   Margin="10" Grid.ColumnSpan="2"  />
                    </Border>

                    <Border Grid.Row="0" Grid.Column="2" BorderThickness="1" BorderBrush="White">
                        <TextBlock Foreground="Black" x:Name="accNO" Text="" Grid.Column="2" Margin="10"/>
                    </Border>

Thanks For help.It was done for the first row of grid.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:05:26+00:00Added an answer on June 11, 2026 at 10:05 am

    If you want border around each row and column, then set the Border element inside every row and column

    <Border Grid.Row="2" Grid.Column="1" BorderThickness="1" BorderBrush="White">
        <TextBlock Text="This is some text." />
    </Border>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created two Pages Page1.xaml and Page2.xaml in windows8 metro apps. I have
I have created a Silverlight User Control. The markup is: <StackPanel Grid.Row=4 Grid.Column=0 Orientation=Horizontal
The WPF application I've created contains a Grid with 3 rows. I have a
I have created user control. I want to display XAML inside my usercontrol. Like
I have created blank C#/XAML Windows 8 application. Add simple XAML code: <Page x:Class=Blank.MainPage
I have created a trigger in the xaml and it works fine. However, when
I have created a UserControl as follows: <UserControl x:Class=MySample.MyControl xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:local=using:MySample xmlns:d=http://schemas.microsoft.com/expression/blend/2008 xmlns:mc=http://schemas.openxmlformats.org/markup-compatibility/2006
I have a XAML based ContextMenu bound to the rows in a datagrid. It
I have created a Scrollviewer in WP7, which harbors 3 usercontrol, each one of
I have created sample User Control RestrictedBox.xaml <UserControl.Resources> <Converters:EnumToVisibilityConverter x:Key=enumToVisConverter /> <Converters:EnumToVisibilityConverterReverse x:Key=enumToVisConverterReverse />

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.