Text of button is not displaying?

Hi All,
I am facing an strange problem.
I have added an button inside a
But the problem I am facing is the button's text is not visible.Button is visible to me but Text is not showing for the button.
Does anybody is having any idea why this is happening?

Best Answer

Answers

  • PaulDistonPaulDiston USUniversity ✭✭✭✭

    Would you be able to share some code that you are using to create the button? XAML or C#?

  • @paulDiston thanks for your reply,below is the code

    <ListView.ItemTemplate>


    <StackLayout
    Orientation="Horizontal"
    HorizontalOptions="FillAndExpand"

                        Padding="20,10">
            <StackLayout
              Orientation="Horizontal"
                            HorizontalOptions="FillAndExpand">
    
              <Label
                                Text="{Binding Name}"
                                HorizontalOptions="Fill" />
              <Label
                                Text="{Binding Path=LastSynced, StringFormat='{0:d}'}" />
    
            </StackLayout>
            <ContentView>
              <ContentView.GestureRecognizers>
                <TapGestureRecognizer Command="{Binding UpdateCommand}" />
              </ContentView.GestureRecognizers>
            </ContentView>
            <!--Old one
    
            <Label
          Text=""
          FontFamily="FontAwesome"
          FontSize="20"
          BackgroundColor="Transparent">-->
    
            <Label
          Text=""
          FontFamily="FontAwesome"
          FontSize="20"
          BackgroundColor="Transparent">
    
    
            </Label>
            <!--<Button Text="Delete" BackgroundColor="Red" IsVisible="{Binding isDownloaded}"></Button>-->
            <!-- <Button Name="btnDelete" Text="Delete"  BackgroundColor="Red" HeightRequest="30" WidthRequest="40" IsVisible="True" Command="{Binding DeleteMapCommand}" ></Button>-->
            <Button  Text="Delete"  BackgroundColor="Red" HeightRequest="30" WidthRequest="40" IsVisible="True" Command="{Binding DeleteMapCommand}" ></Button>
    
          </StackLayout>
        </ViewCell>
      </DataTemplate>
    </ListView.ItemTemplate>
    

  • PeterMidgleyPeterMidgley USMember ✭✭

    @Vulcan, sorry to ask but it would be useful if you could explain what was wrong with the OP code, what your change was and why it made the text show?
    Thanks!

Sign In or Register to comment.