Forum Xamarin Xamarin.Forms

Show Border in Grid (Xaml)

BuiManhBuiManh USMember ✭✭

I have problem with showing Border of grid in xaml.
I have Xaml page like this:

                                <?xml version="1.0" encoding="utf-8" ?>
                                <ContentPage xmlns=""
                                             x:Class="DAC_Check.Views.HistoryPage" BackgroundColor="White">

                                  <ContentPage.Content >
                                    <ListView    CachingStrategy="RecycleElement"
                                            **<Border BorderBrush="Black" BorderThickness="2">**
                                              <Grid ShowGridLines="True" Padding="3">
                                                  <ColumnDefinition Width="55"/>
                                                  <ColumnDefinition Width="*"/>

                                                <Image Source="{Binding IMG}" VerticalOptions="Center">
                                                    <OnPlatform x:TypeArguments="x:Double">
                                                      <OnPlatform.Android>55 </OnPlatform.Android>
                                                    <OnPlatform x:TypeArguments="x:Double">
                                                <StackLayout Grid.Column="1"
                                                  <Label Text="{Binding Title}" Font="Bold,13" TextColor="Black" />
                                                  <Label Text="{Binding PublicDate}" x:Name="lbDate" FontSize="Small" LineBreakMode="WordWrap"/>

When run it, the debug show that:

Xamarin.Forms.Xaml.XamlParseException: Position 14:14. Type Border not found in xmlns

How can i fix that???


  • Glorious18Glorious18 Member ✭✭✭

    how to use frame in a grid?
    please can you show me a code sample for xaml?

  • JohnHardmanJohnHardman GBUniversity admin

    @Glorious18 said:
    how to use frame in a grid?
    please can you show me a code sample for xaml?

    As per the forum rules and guidelines at , please do not re-awaken old posts.

    The forum rules and guidelines say
    "Successful Contributors Will Not:" ... "Comment on old posts: It's preferred to post a new question/discussion and include a link if there is relevant information you want to share when a topic is older than 6 months."

    Please post a new question as a new forum thread.
    I suggest including a diagram of what you are trying to achieve, to clarify whether a Frame is required (and if so, whether the Grid goes in the Frame, or the Frame goes in the Grid), or whether Padding or Margin will suffice.

Sign In or Register to comment.