I created simple blank Xamarin forms project. When I add the Grid layout object to my xaml, button clicks don't get hit. If I remove the grid, button clicks code is getting hit. Any ideas what is wrong?
Note: Fixed markdown in this discussion to correctly display the XAML.
XAML:
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:BlankForm" x:Class="BlankForm.BlankFormPage">
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="20"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="53"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackLayout Orientation="Vertical" Grid.Row="0" Grid.Column="0">
<Button x:Name="Connection" Text="line" Clicked="Handle_Clicked"/>
<Button x:Name="Btn2" Text="Btn2" Pressed="OnPress" Clicked="Handle_Clicked2" ></Button>
</StackLayout>
</Grid>
</ContentPage>