MobileMenuButtonMenu.xaml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <ContentView xmlns="http://xamarin.com/schemas/2014/forms"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  4. xmlns:mobile="clr-namespace:InABox.Mobile;assembly=InABox.Mobile.Shared"
  5. x:Class="InABox.Mobile.MobileMenuButtonMenu" Padding="5">
  6. <ContentView.BindingContext>
  7. <mobile:MobileMenuButtonMenuViewModel x:Name="_viewModel"/>
  8. </ContentView.BindingContext>
  9. <ContentView.Content>
  10. <StackLayout
  11. x:Name="_menu"
  12. Orientation="Vertical"
  13. VerticalOptions="StartAndExpand"
  14. HorizontalOptions="StartAndExpand"
  15. Margin="0,5,0,0"
  16. Spacing="10"
  17. BindableLayout.ItemsSource = "{Binding Items}"
  18. BindableLayout.EmptyView="Nothing!">
  19. <BindableLayout.ItemTemplate>
  20. <DataTemplate x:DataType="mobile:MobileMenuButtonMenuItem">
  21. <Label Text="{Binding Text}"
  22. VerticalOptions="CenterAndExpand"
  23. HorizontalOptions="FillAndExpand"
  24. HorizontalTextAlignment="Start"
  25. VerticalTextAlignment="Center"
  26. FontSize="Micro"
  27. Padding="2,5,2,2">
  28. <Label.GestureRecognizers>
  29. <TapGestureRecognizer Tapped="TapGestureRecognizer_OnTapped" />
  30. </Label.GestureRecognizers>
  31. </Label>
  32. </DataTemplate>
  33. </BindableLayout.ItemTemplate>
  34. </StackLayout>
  35. </ContentView.Content>
  36. </ContentView>