MobileAccordion.xaml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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.MobileAccordion">
  6. <ContentView.Content>
  7. <StackLayout
  8. x:Name="_stack"
  9. VerticalOptions="Fill"
  10. BackgroundColor="Transparent"
  11. Spacing="5"
  12. >
  13. <BindableLayout.ItemTemplate>
  14. <DataTemplate x:DataType="mobile:MobileAccordionItem">
  15. <StackLayout
  16. Orientation="Vertical"
  17. Spacing="5"
  18. BackgroundColor="Transparent"
  19. >
  20. <mobile:MobileButton
  21. MinimumHeightRequest="50"
  22. HeightRequest="50"
  23. Text="{Binding Text}"
  24. Tag="{Binding .}"
  25. Clicked="Header_Clicked"
  26. IsVisible="{Binding ButtonVisible}"/>
  27. <Frame
  28. CornerRadius="5"
  29. BorderColor="Gray"
  30. BackgroundColor="Transparent"
  31. Padding="0"
  32. HeightRequest="2000"
  33. VerticalOptions="Fill"
  34. HasShadow="False"
  35. IsVisible="{Binding Visible}"
  36. >
  37. <ScrollView>
  38. <ContentView Content="{Binding Content}" />
  39. </ScrollView>
  40. </Frame>
  41. </StackLayout>
  42. </DataTemplate>
  43. </BindableLayout.ItemTemplate>
  44. </StackLayout>
  45. </ContentView.Content>
  46. </ContentView>