In my XAML Page, I have nested stacklayouts, and in an end nest, I have two buttons. Only one of them will click (the first one). I have made it real simple. Only Color is different. When I put the red one on top, it will click. When I put the green one on top, it will click. Why both do not click, why only the first one? I need both to click.
<StackLayout Orientation="Horizontal" VerticalOptions="Center" HorizontalOptions= "CenterAndExpand" HeightRequest="75" IsVisible="{Binding IsUpcomingTrip}">
<StackLayout Orientation="Vertical" HorizontalOptions= "CenterAndExpand">
<StackLayout Orientation="Horizontal" VerticalOptions="Start" HorizontalOptions= "FillAndExpand" HeightRequest="25">
</StackLayout>
<Button x:Name="btnCancelTrip1" Text="CANCEL TRIP" TextColor="WhiteSmoke" BackgroundColor="Red"
HorizontalOptions="FillAndExpand" Clicked="Test_Click">
</Button>
<Button x:Name="btnUpcomingTrip" Text=" REGISTER YOUR UPCOMING TRIP " TextColor="WhiteSmoke" BackgroundColor="DarkGreen"
HorizontalOptions="FillAndExpand" Clicked="Test_Click">
</Button>
</StackLayout>
</StackLayout>
I expect that both buttons should be clickable. Only the first one is clickable. When red on top, it is enabled/ clickable. When green on top, it is enabled/clickable. But not both.