Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <Page
- x:Class="Prueba_AppStore.MainPage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="using:Prueba_AppStore"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- mc:Ignorable="d">
- <Page.Resources>
- <ResourceDictionary>
- <Style x:Key="AlarmasAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
- <Setter Property="AutomationProperties.AutomationId" Value="AlarmasAppBarButton"/>
- <Setter Property="AutomationProperties.Name" Value="Alarmas"/>
- <Setter Property="Content" Value=""/>
- </Style>
- <!-- Para el color de fondo de la aplicación y de la AppBar y el título de la configuración -->
- <Style x:Key="ClockAppBarBackground" TargetType="AppBar">
- <Setter Property="Background" Value="#FF004080" />
- <Setter Property="BorderBrush" Value="#FF004080" />
- </Style>
- <Style x:Key="AboutClockAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
- <Setter Property="AutomationProperties.AutomationId" Value="AboutClockAppBarButton"/>
- <Setter Property="AutomationProperties.Name" Value="Acerca de"/>
- <Setter Property="Content" Value=""/>
- </Style>
- <Style x:Key="SettingsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
- <Setter Property="AutomationProperties.AutomationId" Value="SettingsAppBarButton"/>
- <Setter Property="AutomationProperties.Name" Value="Settings"/>
- <Setter Property="Content" Value=""/>
- </Style>
- </ResourceDictionary>
- </Page.Resources>
- <Page.BottomAppBar>
- <AppBar x:Name="mainBottomAppBar" Style="{StaticResource ClockAppBarBackground}" Padding="10,0,10,0"
- Closed="mainBottomAppBar_Closed" Opened="mainBottomAppBar_Opened">
- <Grid>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
- <Button x:Name="buttonAlarmas"
- Style="{StaticResource AlarmasAppBarButtonStyle}" Click="buttonAlarmas_Click" />
- </StackPanel>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
- <Button x:Name="buttonClock"
- Style="{StaticResource AboutClockAppBarButtonStyle}" Click="button_Clock" />
- <StackPanel x:Name="spAppBarSettings" Margin="0,0,-10,0">
- <!-- aquí pondremos el botón cuando se abra esta barra de la aplicación -->
- </StackPanel>
- </StackPanel>
- </Grid>
- </AppBar>
- </Page.BottomAppBar>
- <Grid Background="#FF105090">
- <Grid.RowDefinitions>
- <RowDefinition Height="110"/>
- <RowDefinition Height="*"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <!-- Back button and page title -->
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="120"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <Button x:Name="backButton" Visibility="Collapsed" Click="GoBack"
- IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}"
- Style="{StaticResource BackButtonStyle}"/>
- <TextBlock x:Name="pageTitle" x:Uid="MainpageTitle" Grid.Column="1"
- Text="Pruebas para la Tienda de Windows 8" Style="{StaticResource PageHeaderTextStyle}" />
- </Grid>
- <StackPanel Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center">
- <TextBlock Text="Esto estará en el centro (más o menos)" FontSize="30" FontWeight="SemiBold"/>
- </StackPanel>
- <Grid Grid.Row="2">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <!-- el MinHeight es para que al quitar el botón (por código)
- no se mueva lo que haya en medio
- que se iba para abajo al abrir la appBar -->
- <StackPanel x:Name="spRow2" Grid.Column="2" Orientation="Horizontal" MinHeight="90">
- <!-- poner aquí el botón de configuración, pero por código -->
- <Button x:Name="buttonSettings"
- Style="{StaticResource SettingsAppBarButtonStyle}" Click="button_Settings" />
- </StackPanel>
- </Grid>
- </Grid>
- </Page>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement