What are Xamarin and Xamarin Forms?

Prerequisites

Step 1

Step 2

Step 3

Step 4

Step 5.1

Select Visual C# -> Click Cross Platform -> Followed by Clicking Forms Tabbed Page Xaml and Enter the Page Name then Click Add

Xamarin

Aterwards Go to New Added Page of myTabbedPage and insert the code Given Below and save it

Xamarin

Xamarin

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  4. x:Class="TPage.MyTappedPage"
  5. xmlns:pages="clr-namespace:TPage;assembly=TPage"
  6. Title="TabbedPage">
  7. <ContentPage Title="Green">
  8. <StackLayout>
  9. <Label Text="Green"
  10. HorizontalTextAlignment="Center"
  11. HorizontalOptions="FillAndExpand"
  12. Margin="5" />
  13. <BoxView Color="Green"
  14. VerticalOptions="FillAndExpand" />
  15. </StackLayout>
  16. </ContentPage>
  17. <ContentPage Title="Blue">
  18. <StackLayout>
  19. <Label Text="Blue"
  20. HorizontalTextAlignment="Center"
  21. HorizontalOptions="FillAndExpand"
  22. Margin="5" />
  23. <BoxView Color="Blue"
  24. VerticalOptions="FillAndExpand" />
  25. </StackLayout>
  26. </ContentPage>
  27. <ContentPage Title="Orange">
  28. <StackLayout>
  29. <Label Text="Orange"
  30. HorizontalTextAlignment="Center"
  31. HorizontalOptions="FillAndExpand"
  32. Margin="5" />
  33. <BoxView Color="Orange"
  34. VerticalOptions="FillAndExpand" />
  35. </StackLayout>
  36. </ContentPage>
  37. <ContentPage Title="Maroon">
  38. <StackLayout>
  39. <Label Text="Maroon"
  40. HorizontalTextAlignment="Center"
  41. HorizontalOptions="FillAndExpand"
  42. Margin="5" />
  43. <BoxView Color="Maroon"
  44. VerticalOptions="FillAndExpand" />
  45. </StackLayout>
  46. </ContentPage>
  47. <ContentPage Title="Navy">
  48. <StackLayout>
  49. <Label Text="Navy"
  50. HorizontalTextAlignment="Center"
  51. HorizontalOptions="FillAndExpand"
  52. Margin="5" />
  53. <BoxView Color="Navy"
  54. VerticalOptions="FillAndExpand" />
  55. </StackLayout>
  56. </ContentPage>
  57. <ContentPage Title="Lime">
  58. <StackLayout>
  59. <Label Text="Lime"
  60. HorizontalTextAlignment="Center"
  61. HorizontalOptions="FillAndExpand"
  62. Margin="5" />
  63. <BoxView Color="Lime"
  64. VerticalOptions="FillAndExpand" />
  65. </StackLayout>
  66. </ContentPage>
  67. </TabbedPage>

Step 5.2

Step 6

Step 7

Click Cross Platform ->Extension->add the Extention given below

Step 8

In this step go to startup Project-> Select Multiple Startup Project -> then Select Startup Projects -> Click Apply then OK

It is a feature of Xamarin Forms that it gets the output at the same time

Xamarin

Step 9

Output

The UWP Table View Outputs is given below,

Xamarin

Conclusion

Thus, we have learned how to design TabbedPages View Application in Xamarin Forms using Visual Studio 2017.