Skip to content

Instantly share code, notes, and snippets.

@icebeam7

icebeam7/LocationView.xaml

Last active Nov 25, 2019
Embed
What would you like to do?
DemoDS: LocationView.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:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:DemoDS.ViewModels"
mc:Ignorable="d"
ios:Page.UseSafeArea="true"
x:Class="DemoDS.Views.LocationView">
<ContentPage.BindingContext>
<vm:LocationViewModel/>
</ContentPage.BindingContext>
<ContentPage.Content>
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Button Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
Text="Get Address" Command="{Binding GetAddressCommand}"
CornerRadius="8"/>
<Label Grid.Row="1" Grid.Column="0" Text="Name: "/>
<Label Grid.Row="1" Grid.Column="1" Text="{Binding LocationAddress.Name}"/>
<Label Grid.Row="2" Grid.Column="0" Text="Address: "/>
<Label Grid.Row="2" Grid.Column="1" Text="{Binding LocationAddress.Address}" />
<Label Grid.Row="3" Grid.Column="0" Text="Province: "/>
<Label Grid.Row="3" Grid.Column="1" Text="{Binding LocationAddress.Province}" />
<Label Grid.Row="4" Grid.Column="0" Text="City: "/>
<Label Grid.Row="4" Grid.Column="1" Text="{Binding LocationAddress.City}" />
<Label Grid.Row="5" Grid.Column="0" Text="Zip Code: "/>
<Label Grid.Row="5" Grid.Column="1" Text="{Binding LocationAddress.ZipCode}" />
<Label Grid.Row="6" Grid.Column="0" Text="Country: "/>
<Label Grid.Row="6" Grid.Column="1" Text="{Binding LocationAddress.Country}" />
</Grid>
</ContentPage.Content>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.