Results 1 to 4 of 4

Thread: Label is not visible in Image target

  1. #1

    Thread Starter
    New Member Meetup's Avatar
    Join Date
    Sep 2019
    Location
    Beverly Hills
    Posts
    1

    Label is not visible in Image target

    I have added the code for label to show it on Image target. But unfortunately its not visible. Could anyone please help to resolve this

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,689

    Re: Label is not visible in Image target

    If only there was a way for us to see that code.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    Member
    Join Date
    Jan 2020
    Posts
    59

    Re: Label is not visible in Image target

    You can set label on image using grid.

    Try this code...

    Code:
    <Grid HorizontalOptions="Center"
          VerticalOptions="Center">
      <Grid.RowDefinitions>
        <RowDefinition Height="*"/>
      </Grid.RowDefinitions>
    
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
    
      <Image HorizontalOptions="Center"
             Source="image.png"
             Grid.Row="0"
             Grid.Column="0"/>
      <Label HorizontalOptions="Center"
             Text="something"
             TextColor="Black"
             Grid.Row="0"
             Grid.Column="0"/>
    </Grid>
    Add the label and image on same row and column.

  4. #4
    Member
    Join Date
    Jan 2020
    Posts
    59

    Re: Label is not visible in Image target

    You also could have used an AbsoluteLayout, which is another layout that is good at layering things.
    Last edited by HarshShah; Apr 1st, 2020 at 01:21 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width