<?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:viewmodel="clr-namespace:XamarinDemoApp.ViewModels"
    x:DataType="viewmodel:HomeViewModel"
    x:Class="XamarinDemoApp.Views.HomePage">
    <ContentPage.Content>
        <ScrollView Margin="0,20,0,0">
            <StackLayout  Spacing="20" Orientation="Vertical" HorizontalOptions="FillAndExpand">
                <Frame Margin="5,0" BorderColor="LightGray" CornerRadius="5" HorizontalOptions="FillAndExpand">
                    <StackLayout Orientation="Vertical" Margin="0,10">
                        <Grid Padding="20, 10">
                            <Grid.RowDefinitions>
                                <!--<RowDefinition Height="3"/>-->
                                <RowDefinition Height="40"/>
                                <!--<RowDefinition Height="3"/>-->
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <!--<ColumnDefinition Width="2"/>-->
                                <ColumnDefinition Width="320"/>

                            </Grid.ColumnDefinitions>

                            <!--<Frame HasShadow="False" CornerRadius="3" BackgroundColor="White" Grid.Row="0" Grid.RowSpan="3" Grid.Column="0" Grid.ColumnSpan="2"/>-->

                            <Entry FontSize="16"  TextColor="#2c2a29" 
                    PlaceholderColor="LightGray" x:Name="IdentityValueEntry"  Placeholder="Enter Url" Grid.Row="0" 
					Grid.RowSpan="1" Grid.Column="0" Grid.ColumnSpan="1" BackgroundColor="Transparent"
                    Text="{Binding NewPageUrl}">
                            </Entry>

                        </Grid>
                        <Button HeightRequest="40" WidthRequest="100" x:Name="NewPageButton" Command="{Binding NewPageCommand}" Margin="20,0,20,10"  CornerRadius="3"
								FontSize="16" TextColor="White"  Text="New Page Event"  />
                    </StackLayout>
                </Frame>

                <Frame Margin="5,0" BorderColor="LightGray" CornerRadius="5">
                    <StackLayout Orientation="Vertical" Margin="0,10">
                        <Grid Padding="20, 10">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="40"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="320"/>
                            </Grid.ColumnDefinitions>

                            <Entry FontSize="16"  TextColor="#2c2a29" PlaceholderColor="LightGray"
                                   x:Name="EventNameEntry"  Placeholder="Enter Event Name" Grid.Row="0" 
					               Grid.RowSpan="1" Grid.Column="0" Grid.ColumnSpan="1" BackgroundColor="Transparent"
                                   Text="{Binding EventName}">
                            </Entry>

                        </Grid>

                        <Grid Padding="20, 10">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="40"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="320"/>
                            </Grid.ColumnDefinitions>

                            <Entry FontSize="16"  TextColor="#2c2a29" PlaceholderColor="LightGray"
                                   x:Name="EventKeyEntry"  Placeholder="Enter Event Key" Grid.Row="0" 
					               Grid.RowSpan="1" Grid.Column="0" Grid.ColumnSpan="1" BackgroundColor="Transparent"
                                   Text="{Binding EventAttrKey}">
                            </Entry>

                        </Grid>

                        <Grid Padding="20, 10">
                            <Grid.RowDefinitions>
                                <!--<RowDefinition Height="3"/>-->
                                <RowDefinition Height="40"/>
                                <!--<RowDefinition Height="3"/>-->
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <!--<ColumnDefinition Width="2"/>-->
                                <ColumnDefinition Width="320"/>
                                <!--<ColumnDefinition Width="2"/>-->

                            </Grid.ColumnDefinitions>

                            <Frame HasShadow="False" CornerRadius="3" BackgroundColor="White" Grid.Row="0" Grid.RowSpan="3" Grid.Column="0" Grid.ColumnSpan="5"/>

                            <Entry FontSize="16" TextColor="#2c2a29"
                    PlaceholderColor="LightGray" x:Name="AppEventValue"  Placeholder="Enter Event Value" Grid.Row="0" 
					Grid.RowSpan="1" Grid.Column="0" Grid.ColumnSpan="1" BackgroundColor="Transparent"
                    Text="{Binding EventAttrValue}">
                            </Entry>

                        </Grid>
                        <Button HeightRequest="40" WidthRequest="300" x:Name="AppEventButton" Command="{Binding AddAppEventCommand}" Margin="20,0,20,10"  CornerRadius="3"
								FontSize="16" TextColor="White"  Text="App Event" />

                    </StackLayout>
                </Frame>

                <Frame Margin="5,0" BorderColor="LightGray" CornerRadius="5">
                    <StackLayout Orientation="Vertical" Spacing="0">
                        <Label x:Name="DeviceIdLabel" Text="{Binding DeviceId}" TextColor="Black" HeightRequest="50" HorizontalOptions="CenterAndExpand"  WidthRequest="300" VerticalTextAlignment="Center" HorizontalTextAlignment="Center"/>
                        <Button HeightRequest="40" WidthRequest="300" x:Name="DeviceIdButton" Command="{Binding GetDeviceIdCommand}" Margin="20,0,20,20"  CornerRadius="3"
								FontSize="16" TextColor="White"  Text="Get Device Id" />
                    </StackLayout>

                </Frame>

                <Frame Margin="5,0" BorderColor="LightGray" CornerRadius="5">
                    <StackLayout Orientation="Vertical" Spacing="0">
                        <Label x:Name="TagServerLabel" Text="{Binding TagServer}" TextColor="Black" HeightRequest="50" HorizontalOptions="CenterAndExpand"  WidthRequest="300" VerticalTextAlignment="Center" HorizontalTextAlignment="Center"/>
                        <Button HeightRequest="40" WidthRequest="300" x:Name="TagServerButton" Command="{Binding GetTagServerCommand}" Margin="20,0,20,20"  CornerRadius="3"
								FontSize="16" TextColor="White"  Text="Get Tag Server" />
                    </StackLayout>
                </Frame>

            </StackLayout>

        </ScrollView>
    </ContentPage.Content>
</ContentPage>

