Advertisement
elGuille

Código de VB del ejemplo de usar un control en dos sitios

Feb 4th, 2013
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 2.15 KB | None | 0 0
  1. '------------------------------------------------------------------------------
  2. ' Para hacer pruebas con aplicaciones para la Windows Store         (04/Feb/13)
  3. '
  4. ' ©Guillermo 'guille' Som, 2013
  5. '------------------------------------------------------------------------------
  6. Option Strict On
  7. Option Infer On
  8.  
  9. Imports Windows.UI.ApplicationSettings
  10.  
  11.  
  12. ' The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
  13.  
  14. ''' <summary>
  15. ''' An empty page that can be used on its own or navigated to within a Frame.
  16. ''' </summary>
  17. Public NotInheritable Class MainPage
  18.     Inherits Page
  19.  
  20.     ''' <summary>
  21.     ''' Invoked when this page is about to be displayed in a Frame.
  22.     ''' </summary>
  23.     ''' <param name="e">Event data that describes how this page was reached.  The Parameter
  24.     ''' property is typically used to configure the page.</param>
  25.     Protected Overrides Sub OnNavigatedTo(e As Navigation.NavigationEventArgs)
  26.  
  27.     End Sub
  28.  
  29.     ' Añadir el botón de configuración al panel inferior    (04/Feb/13)
  30.     ' para que siempre esté visible
  31.     ' Pero sólo cuando se cierre la AppBar
  32.     Private Sub mainBottomAppBar_Opened(sender As Object, e As Object)
  33.         spRow2.Children.Remove(buttonSettings)
  34.         spAppBarSettings.Children.Add(buttonSettings)
  35.  
  36.     End Sub
  37.  
  38.     Private Sub mainBottomAppBar_Closed(sender As Object, e As Object)
  39.         spAppBarSettings.Children.Remove(buttonSettings)
  40.         spRow2.Children.Add(buttonSettings)
  41.  
  42.     End Sub
  43.  
  44.     Private Sub buttonAlarmas_Click(sender As Object, e As RoutedEventArgs)
  45.         mainBottomAppBar.IsOpen = False
  46.         '... resto del código
  47.  
  48.     End Sub
  49.  
  50.     Private Sub button_Clock(sender As Object, e As RoutedEventArgs)
  51.         mainBottomAppBar.IsOpen = False
  52.         '... resto del código
  53.  
  54.     End Sub
  55.  
  56.     Private Sub button_Settings(sender As Object, e As RoutedEventArgs)
  57.         If ApplicationView.Value <> ApplicationViewState.Snapped Then
  58.             SettingsPane.Show()
  59.  
  60.         End If
  61.  
  62.     End Sub
  63.  
  64.     Private Sub GoBack(sender As Object, e As RoutedEventArgs)
  65.         ' para que esté...
  66.  
  67.     End Sub
  68.  
  69.  
  70.  
  71. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement