Guest User

Untitled

a guest
Jul 3rd, 2020
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. using Xamarin.Forms;
  8. using Xamarin.Forms.Xaml;
  9.  
  10. namespace SlogGISMobile.Page.jianstra.infobekum
  11. {
  12. [XamlCompilation(XamlCompilationOptions.Compile)]
  13. public partial class DashboardInfobekumPage : ContentPage
  14. {
  15. public DashboardInfobekumPage()
  16. {
  17. InitializeComponent();
  18.  
  19. if (tvInfobekum.Items[tvInfobekum.SelectedIndex].Content == null)
  20. {
  21. tvInfobekum.Items[tvInfobekum.SelectedIndex].Content = GetItemContent(tvInfobekum.SelectedIndex);
  22. }
  23. }
  24.  
  25. private void tvInfobekum_SelectionChanged(object sender, Syncfusion.XForms.TabView.SelectionChangedEventArgs e)
  26. {
  27. if (tvInfobekum.Items[tvInfobekum.SelectedIndex].Content == null)
  28. {
  29. tvInfobekum.Items[tvInfobekum.SelectedIndex].Content = GetItemContent(tvInfobekum.SelectedIndex);
  30. }
  31. }
  32.  
  33. private View GetItemContent(int index)
  34. {
  35. switch (index)
  36. {
  37. case 0:
  38. return new StatistikInfobekumPage().Content;
  39. case 1:
  40. return new StatistikInfobekumLanjutanPage().Content;
  41. default:
  42. return new StatistikInfobekumPage().Content;
  43. }
  44. }
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment