-
-
Save devjaime/f6f80212396cd413615d467d29abe2be to your computer and use it in GitHub Desktop.
nuestra vista tendrá la siguiente estructura
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <views:BasePage xmlns="http://xamarin.com/schemas/2014/forms" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
| xmlns:views="clr-namespace:Acelerometro.View" | |
| xmlns:viewmodels="clr-namespace:Acelerometro.ViewModel" | |
| x:Class="Acelerometro.View.AccelerometerPage" | |
| Title="Accelerometer"> | |
| <views:BasePage.BindingContext> | |
| <viewmodels:AccelerometerViewModel /> | |
| </views:BasePage.BindingContext> | |
| <StackLayout> | |
| <Label Text="Recuperar los datos de aceleración del dispositivo en el espacio 3D. Además, esta página detectará si sacude su dispositivo.." FontAttributes="Bold" Margin="12" /> | |
| <ScrollView> | |
| <Grid Padding="12,0,12,12"> | |
| <Grid.RowDefinitions> | |
| <RowDefinition Height="Auto" /> | |
| <RowDefinition Height="Auto" /> | |
| <RowDefinition Height="Auto" /> | |
| <RowDefinition Height="Auto" /> | |
| <RowDefinition Height="Auto" /> | |
| <RowDefinition Height="Auto" /> | |
| <RowDefinition Height="Auto" /> | |
| </Grid.RowDefinitions> | |
| <Grid.ColumnDefinitions> | |
| <ColumnDefinition Width="*" /> | |
| <ColumnDefinition Width="*" /> | |
| </Grid.ColumnDefinitions> | |
| <Label Grid.Row="0" Grid.ColumnSpan="2" Text="{Binding X, StringFormat='X: {0:N}'}" /> | |
| <Label Grid.Row="1" Grid.ColumnSpan="2" Text="{Binding Y, StringFormat='Y: {0:N}'}" /> | |
| <Label Grid.Row="2" Grid.ColumnSpan="2" Text="{Binding Z, StringFormat='Z: {0:N}'}" /> | |
| <Picker Grid.Row="4" Grid.ColumnSpan="2" HorizontalOptions="FillAndExpand" | |
| ItemsSource="{Binding Speeds}" | |
| SelectedIndex="{Binding Speed, Mode=TwoWay}" | |
| IsEnabled="{Binding IsActive, Converter={StaticResource NegativeConverter}}" /> | |
| <Button Grid.Row="5" Grid.Column="0" Text="Start" Command="{Binding StartCommand}" | |
| IsEnabled="{Binding IsActive, Converter={StaticResource NegativeConverter}}" /> | |
| <Button Grid.Row="5" Grid.Column="1" Text="Stop" Command="{Binding StopCommand}" | |
| IsEnabled="{Binding IsActive}" /> | |
| <Label Grid.Row="6" Grid.ColumnSpan="2" Text="{Binding ShakeTime}"/> | |
| </Grid> | |
| </ScrollView> | |
| </StackLayout> | |
| </views:BasePage> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment