Introduction

Hello guys, this is my second part of the COVID-19 app. In this article, I have continued to the COVID – 19 App, in this app we create the remaining pages.
  1. Covid-19 Search Countries
  2. About us
  3. CovidTabbedPage
In this article, we design a Covid-19 Search Countries, About Us and a CovidTabbedPage.

Covid-19 Search Countries

In this Covid19 Search Countries page, we add one ListView and show the all the country COVID cases data Like INDIA and USA, and UAE.
CountryReport.xaml
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <ContentPage
  3. x:Class="Covid19.Views.CountryReport"
  4. xmlns="http://xamarin.com/schemas/2014/forms"
  5. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  6. xmlns:control="clr-namespace:Covid19.CustomControls"
  7. xmlns:d="http://xamarin.com/schemas/2014/forms/design"
  8. xmlns:local="clr-namespace:Covid19"
  9. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  10. BackgroundColor="White"
  11. mc:Ignorable="d">
  12. <ContentPage.Resources>
  13. <ContentView x:Key="BasicTemplate">
  14. <StackLayout>
  15. <Label
  16. Margin="10,25,10,10"
  17. FontAttributes="Bold"
  18. FontSize="18"
  19. HorizontalOptions="Fill"
  20. HorizontalTextAlignment="Center"
  21. Text="No items to display." />
  22. </StackLayout>
  23. </ContentView>
  24. <ContentView x:Key="AdvancedTemplate">
  25. <StackLayout>
  26. <Label
  27. Margin="10,25,10,10"
  28. FontFamily="OpenSansBold"
  29. FontSize="18"
  30. HorizontalOptions="Fill"
  31. HorizontalTextAlignment="Center"
  32. Text="No results matched your filter." />
  33. <Label
  34. FontAttributes="Italic"
  35. FontFamily="OpenSansRegular"
  36. FontSize="12"
  37. HorizontalOptions="Fill"
  38. HorizontalTextAlignment="Center"
  39. Text="Try a broader filter?" />
  40. </StackLayout>
  41. </ContentView>
  42. </ContentPage.Resources>
  43. <ContentPage.Content>
  44. <ScrollView>
  45. <Grid Padding="0">
  46. <Grid.RowDefinitions>
  47. <RowDefinition Height="25" />
  48. <RowDefinition Height="Auto" />
  49. <RowDefinition Height="Auto" />
  50. <RowDefinition Height="Auto" />
  51. <RowDefinition Height="*" />
  52. </Grid.RowDefinitions>
  53. <Grid.ColumnDefinitions>
  54. <ColumnDefinition Width="*" />
  55. </Grid.ColumnDefinitions>
  56. <Label
  57. Grid.Row="1"
  58. Grid.Column="0"
  59. Padding="20,5"
  60. FontFamily="OpenSansBold"
  61. FontSize="20"
  62. HorizontalOptions="StartAndExpand"
  63. Text="Covid-19 Search..."
  64. VerticalOptions="CenterAndExpand" />
  65. <StackLayout
  66. Grid.Row="2"
  67. Grid.Column="0"
  68. Padding="0"
  69. HorizontalOptions="FillAndExpand"
  70. Spacing="0"
  71. VerticalOptions="Center">
  72. <control:CustomShadowFrame
  73. Margin="{OnPlatform Android='20,0',
  74. iOS='0,0'}"
  75. Padding="0"
  76. BorderColor="White"
  77. CornerRadius="25"
  78. HasShadow="true"
  79. HeightRequest="150">
  80. <Image Aspect="AspectFill" Source="{local:ImageResource Covid19.Resources.lightstayhome.jpg}" />
  81. </control:CustomShadowFrame>
  82. </StackLayout>
  83. <Grid
  84. Grid.Row="3"
  85. Grid.Column="0"
  86. Padding="20,0"
  87. HorizontalOptions="FillAndExpand"
  88. VerticalOptions="FillAndExpand">
  89. <Grid.RowDefinitions>
  90. <RowDefinition Height="*" />
  91. <RowDefinition Height="1" />
  92. </Grid.RowDefinitions>
  93. <Grid.ColumnDefinitions>
  94. <ColumnDefinition Width="*" />
  95. </Grid.ColumnDefinitions>
  96. <Entry
  97. x:Name="searchBar"
  98. Grid.Row="0"
  99. Grid.Column="0"
  100. Margin="45,0,0,0"
  101. FontFamily="OpenSansRegular"
  102. FontSize="Small"
  103. HeightRequest="35"
  104. HorizontalOptions="FillAndExpand"
  105. Placeholder="Search Country"
  106. PlaceholderColor="#2A73BF"
  107. TextChanged="Entry_TextChanged"
  108. TextColor="#2A73BF" />
  109. <Image
  110. Grid.Row="0"
  111. Grid.Column="0"
  112. Aspect="AspectFit"
  113. HeightRequest="24"
  114. HorizontalOptions="Start"
  115. Source="{local:ImageResource Covid19.Resources.search.png}"
  116. VerticalOptions="Center"
  117. WidthRequest="24" />
  118. <BoxView
  119. Grid.Row="1"
  120. Grid.Column="0"
  121. HorizontalOptions="FillAndExpand"
  122. Color="LightGray" />
  123. </Grid>
  124. <CollectionView
  125. x:Name="collectionView"
  126. Grid.Row="4"
  127. Grid.Column="0"
  128. EmptyView="{StaticResource AdvancedTemplate}"
  129. HorizontalOptions="FillAndExpand"
  130. ItemsSource="{Binding SearchCountry}"
  131. VerticalOptions="FillAndExpand">
  132. <CollectionView.ItemTemplate>
  133. <DataTemplate>
  134. <StackLayout Padding="20,10">
  135. <Frame
  136. Padding="5"
  137. BorderColor="LightGray"
  138. CornerRadius="10"
  139. HasShadow="True">
  140. <Grid
  141. Grid.Row="0"
  142. Grid.RowSpan="2"
  143. Grid.Column="1"
  144. Padding="10,10"
  145. HorizontalOptions="FillAndExpand"
  146. RowSpacing="0"
  147. VerticalOptions="FillAndExpand">
  148. <Grid.RowDefinitions>
  149. <RowDefinition Height="0.5*" />
  150. <RowDefinition Height="0.5*" />
  151. <!--<RowDefinition Height="0.3*" />-->
  152. </Grid.RowDefinitions>
  153. <Grid.ColumnDefinitions>
  154. <ColumnDefinition Width="0.8*" />
  155. <ColumnDefinition Width="0.2*" />
  156. </Grid.ColumnDefinitions>
  157. <Label
  158. Grid.Row="0"
  159. Grid.Column="0"
  160. FontFamily="OpenSansRegular"
  161. FontSize="20"
  162. Text="{Binding country}"
  163. TextColor="Black"
  164. VerticalTextAlignment="End" />
  165. <Label
  166. Grid.Row="1"
  167. Grid.Column="0"
  168. FontFamily="OpenSansBold"
  169. FontSize="20"
  170. Text="{Binding cases, StringFormat='{0:N0}'}"
  171. TextColor="Black"
  172. VerticalOptions="Start"
  173. VerticalTextAlignment="Start" />
  174. <ImageButton
  175. Grid.Row="0"
  176. Grid.RowSpan="2"
  177. Grid.Column="1"
  178. Aspect="Fill"
  179. BackgroundColor="White"
  180. HeightRequest="42"
  181. HorizontalOptions="CenterAndExpand"
  182. IsEnabled="False"
  183. Source="{Binding country, Converter={StaticResource Flagconvertor}}"
  184. VerticalOptions="CenterAndExpand"
  185. WidthRequest="42" />
  186. </Grid>
  187. </Frame>
  188. </StackLayout>
  189. </DataTemplate>
  190. </CollectionView.ItemTemplate>
  191. </CollectionView>
  192. </Grid>
  193. </ScrollView>
  194. </ContentPage.Content>
  195. </ContentPage>
Now we add the Entry_TextChanged event for the searching a country according the text characters. Also.,the Binding viewmodel, which is defined in previous article.
  1. private void Entry_TextChanged(object sender, TextChangedEventArgs e)
  2. {
  3. if (string.IsNullOrEmpty(e.NewTextValue))
  4. collectionView.ItemsSource = App.AppSetup.GloalViewModel.AllCountry;
  5. else
  6. collectionView.ItemsSource = App.AppSetup.GloalViewModel.AllCountry.Where(x => x.country.ToLower().Contains(e.NewTextValue.ToLower())).ToList();
  7. }

About Us

This is the about page and in this, we include the team member of the creating of the app.
AboutReport.xaml
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <ContentPage
  3. x:Class="Covid19.Views.AboutReport"
  4. xmlns="http://xamarin.com/schemas/2014/forms"
  5. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  6. xmlns:control="clr-namespace:Covid19.CustomControls"
  7. xmlns:d="http://xamarin.com/schemas/2014/forms/design"
  8. xmlns:helper="clr-namespace:Covid19.Helper"
  9. xmlns:local="clr-namespace:Covid19"
  10. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  11. xmlns:parallax="clr-namespace:Covid19.CustomCells"
  12. xmlns:viewmodel="clr-namespace:Covid19.ViewModel"
  13. BackgroundColor="{DynamicResource Gray-White}"
  14. NavigationPage.HasNavigationBar="False"
  15. mc:Ignorable="d">
  16. <ContentPage.Resources>
  17. <ResourceDictionary>
  18. <Style x:Key="VersionLabelStyle" TargetType="Label">
  19. <Setter Property="TextColor" Value="{DynamicResource Gray-700}" />
  20. <Setter Property="FontFamily" Value="OpenSansRegular" />
  21. <Setter Property="FontSize" Value="12" />
  22. <Setter Property="LineHeight" Value="{OnPlatform Default=1.25, iOS=-1}" />
  23. </Style>
  24. <!-- Style for header label -->
  25. <Style x:Key="HeaderLabelStyle" TargetType="Label">
  26. <Setter Property="TextColor" Value="LightGray" />
  27. <Setter Property="FontFamily" Value="{DynamicResource Gray-900}" />
  28. <Setter Property="FontSize" Value="16" />
  29. <Setter Property="HorizontalTextAlignment" Value="Center" />
  30. <Setter Property="LineHeight" Value="1.25" />
  31. <Setter Property="Margin" Value="0,16,0,8" />
  32. </Style>
  33. <!-- Style for description label -->
  34. <Style x:Key="DescriptionLabelStyle" TargetType="Label">
  35. <Setter Property="TextColor" Value="{DynamicResource Gray-700}" />
  36. <Setter Property="FontFamily" Value="OpenSansRegular" />
  37. <Setter Property="FontSize" Value="14" />
  38. <Setter Property="HorizontalTextAlignment" Value="Start" />
  39. <Setter Property="LineHeight" Value="{OnPlatform Default=1.25}" />
  40. </Style>
  41. <!-- Style for Images -->
  42. <Style x:Key="AboutUsImageStyle" TargetType="Image">
  43. <Setter Property="HeightRequest" Value="64" />
  44. <Setter Property="WidthRequest" Value="64" />
  45. </Style>
  46. </ResourceDictionary>
  47. </ContentPage.Resources>
  48. <ContentPage.BindingContext>
  49. <viewmodel:AboutViewModel />
  50. </ContentPage.BindingContext>
  51. <ContentPage.Content>
  52. <parallax:ParallaxView
  53. x:Name="MainParallax"
  54. BodyMargin="0,150,0,0"
  55. HeaderScrollSpeed="2">
  56. <parallax:ParallaxView.HeaderContent>
  57. <ContentView HeightRequest="253">
  58. <Image
  59. Aspect="Fill"
  60. BackgroundColor="{DynamicResource Gray-200}"
  61. HorizontalOptions="FillAndExpand"
  62. VerticalOptions="StartAndExpand">
  63. <Image.Source>
  64. <UriImageSource
  65. CacheValidity="14"
  66. CachingEnabled="true"
  67. Uri="{Binding AboutTeamModel.CardsTopImage}" />
  68. </Image.Source>
  69. </Image>
  70. </ContentView>
  71. </parallax:ParallaxView.HeaderContent>
  72. <parallax:ParallaxView.BodyContent>
  73. <Frame
  74. Margin="0,0,0,-25"
  75. BackgroundColor="#ffffff"
  76. CornerRadius="25"
  77. HorizontalOptions="FillAndExpand"
  78. VerticalOptions="FillAndExpand">
  79. <Grid
  80. Padding="0"
  81. HorizontalOptions="FillAndExpand"
  82. VerticalOptions="FillAndExpand">
  83. <CollectionView
  84. x:Name="aboutlistview"
  85. Margin="10"
  86. HorizontalOptions="CenterAndExpand"
  87. ItemsSource="{Binding AboutTeamModel.AboutteamData}"
  88. SelectedItem="{Binding ItemSelectedCommand}">
  89. <!-- Header -->
  90. <CollectionView.Header>
  91. <Grid HorizontalOptions="Center" VerticalOptions="Center">
  92. <Grid.ColumnDefinitions>
  93. <ColumnDefinition Width="*" />
  94. </Grid.ColumnDefinitions>
  95. <Grid.RowDefinitions>
  96. <RowDefinition Height="15" />
  97. <RowDefinition Height="Auto" />
  98. </Grid.RowDefinitions>
  99. <Label
  100. Grid.Row="0"
  101. Grid.Column="0"
  102. FontFamily="OpenSansBold"
  103. HorizontalOptions="Center"
  104. Style="{StaticResource DescriptionLabelStyle}"
  105. Text="About Us"
  106. TextColor="{DynamicResource Gray-900}"
  107. VerticalOptions="End" />
  108. <!--<Label
  109. Grid.Row="1"
  110. Grid.Column="0"
  111. HorizontalOptions="Center"
  112. Style="{StaticResource VersionLabelStyle}"
  113. Text="Version 1.0" />-->
  114. <Label
  115. Grid.Row="1"
  116. Grid.Column="0"
  117. HorizontalOptions="Center"
  118. Style="{StaticResource VersionLabelStyle}"
  119. Text="{Binding About}" />
  120. </Grid>
  121. </CollectionView.Header>
  122. <!-- List -->
  123. <CollectionView.ItemsLayout>
  124. <GridItemsLayout
  125. HorizontalItemSpacing="10"
  126. Orientation="Vertical"
  127. Span="{OnIdiom Desktop=2,
  128. Phone=1,
  129. Tablet=2}"
  130. VerticalItemSpacing="10" />
  131. </CollectionView.ItemsLayout>
  132. <CollectionView.ItemTemplate>
  133. <DataTemplate>
  134. <Frame
  135. BackgroundColor="White"
  136. BorderColor="#CCD5F0"
  137. CornerRadius="25"
  138. HasShadow="true"
  139. Visual="Material">
  140. <Grid>
  141. <Grid.ColumnDefinitions>
  142. <ColumnDefinition Width="*" />
  143. </Grid.ColumnDefinitions>
  144. <Grid.RowDefinitions>
  145. <RowDefinition Height="*" />
  146. <RowDefinition Height="1" />
  147. <RowDefinition Height="Auto" />
  148. </Grid.RowDefinitions>
  149. <StackLayout
  150. Grid.Row="0"
  151. Grid.Column="0"
  152. Padding="0"
  153. HorizontalOptions="Fill"
  154. Spacing="0"
  155. VerticalOptions="CenterAndExpand">
  156. <!-- Profile image -->
  157. <ImageButton
  158. BackgroundColor="LightGray"
  159. BorderWidth="0"
  160. CornerRadius="32"
  161. HorizontalOptions="Center"
  162. IsEnabled="False"
  163. Source="{Binding ImageUrl}"
  164. Style="{StaticResource AboutUsImageStyle}"
  165. VerticalOptions="Center" />
  166. <!-- Employee name -->
  167. <Label
  168. FontFamily="OpenSansBold"
  169. HorizontalOptions="Center"
  170. Style="{StaticResource DescriptionLabelStyle}"
  171. Text="{Binding FirstName}"
  172. TextColor="{DynamicResource Gray-900}" />
  173. <!-- Designation -->
  174. <Label
  175. FontFamily="OpenSansBold"
  176. HorizontalOptions="Center"
  177. HorizontalTextAlignment="Center"
  178. Style="{StaticResource VersionLabelStyle}"
  179. Text="{Binding Designation}" />
  180. <!-- Description -->
  181. <Label
  182. HorizontalOptions="Center"
  183. HorizontalTextAlignment="Center"
  184. Style="{StaticResource VersionLabelStyle}"
  185. Text="{Binding Description}" />
  186. </StackLayout>
  187. <BoxView
  188. Grid.Row="1"
  189. Grid.Column="0"
  190. VerticalOptions="FillAndExpand"
  191. Color="LightGray" />
  192. <Grid
  193. Grid.Row="2"
  194. Grid.Column="0"
  195. Padding="0"
  196. HorizontalOptions="CenterAndExpand"
  197. VerticalOptions="CenterAndExpand">
  198. <Grid.ColumnDefinitions>
  199. <ColumnDefinition Width="45" />
  200. <ColumnDefinition Width="45" />
  201. <ColumnDefinition Width="45" />
  202. <ColumnDefinition Width="45" />
  203. <ColumnDefinition Width="45" />
  204. </Grid.ColumnDefinitions>
  205. <Grid.RowDefinitions>
  206. <RowDefinition Height="*" />
  207. </Grid.RowDefinitions>
  208. <Button
  209. Grid.Row="0"
  210. Grid.Column="0"
  211. BackgroundColor="White"
  212. Command="{Binding Path=BindingContext.SocialCommand, Source={x:Reference aboutlistview}}"
  213. CommandParameter="{Binding linkSocial[0].InstaLink}"
  214. CornerRadius="25"
  215. HorizontalOptions="EndAndExpand"
  216. ImageSource="{FontImage FontFamily=FontAwesome,
  217. Glyph={x:Static helper:IconFont.Instagram},
  218. Size=30,
  219. Color='#E74265'}" />
  220. <Button
  221. Grid.Row="0"
  222. Grid.Column="1"
  223. BackgroundColor="White"
  224. Command="{Binding Path=BindingContext.SocialCommand, Source={x:Reference aboutlistview}}"
  225. CommandParameter="{Binding linkSocial[0].BloggerLink}"
  226. CornerRadius="25"
  227. ImageSource="{FontImage FontFamily=FontAwesome,
  228. Glyph={x:Static helper:IconFont.Blogger},
  229. Size=30,
  230. Color=Orange}" />
  231. <Button
  232. Grid.Row="0"
  233. Grid.Column="2"
  234. BackgroundColor="White"
  235. Command="{Binding Path=BindingContext.SocialCommand, Source={x:Reference aboutlistview}}"
  236. CommandParameter="{Binding linkSocial[0].LinkedLink}"
  237. CornerRadius="25"
  238. ImageSource="{FontImage FontFamily=FontAwesome,
  239. Glyph={x:Static helper:IconFont.Linkedin},
  240. Size=30,
  241. Color='#007BB6'}" />
  242. <Button
  243. Grid.Row="0"
  244. Grid.Column="3"
  245. BackgroundColor="White"
  246. Command="{Binding Path=BindingContext.SocialCommand, Source={x:Reference aboutlistview}}"
  247. CommandParameter="{Binding linkSocial[0].YtLink}"
  248. CornerRadius="25"
  249. ImageSource="{FontImage FontFamily=FontAwesome,
  250. Glyph={x:Static helper:IconFont.Youtube},
  251. Size=30,
  252. Color='#C51614'}" />
  253. <Button
  254. Grid.Row="0"
  255. Grid.Column="4"
  256. BackgroundColor="White"
  257. Command="{Binding Path=BindingContext.SocialCommand, Source={x:Reference aboutlistview}}"
  258. CommandParameter="{Binding linkSocial[0].Csharpcorner}"
  259. CornerRadius="25"
  260. ImageSource="{FontImage FontFamily=FontAwesome,
  261. Glyph={x:Static helper:IconFont.LanguageCsharp},
  262. Size=30,
  263. Color='#9A4993'}" />
  264. </Grid>
  265. </Grid>
  266. </Frame>
  267. </DataTemplate>
  268. </CollectionView.ItemTemplate>
  269. <CollectionView.Footer>
  270. <Grid
  271. HorizontalOptions="Center"
  272. IsVisible="false"
  273. VerticalOptions="Center">
  274. <Grid.ColumnDefinitions>
  275. <ColumnDefinition Width="100" />
  276. <ColumnDefinition Width="100" />
  277. <ColumnDefinition Width="100" />
  278. </Grid.ColumnDefinitions>
  279. <Grid.RowDefinitions>
  280. <RowDefinition Height="Auto" />
  281. <RowDefinition Height="Auto" />
  282. </Grid.RowDefinitions>
  283. <Button
  284. Grid.Row="0"
  285. Grid.Column="0"
  286. BackgroundColor="White"
  287. CornerRadius="25"
  288. FontSize="10"
  289. ImageSource="{FontImage FontFamily=FontAwesome,
  290. Glyph={x:Static helper:IconFont.Cellphone},
  291. Size=30,
  292. Color='#4C79FF'}"
  293. Text="{Binding MobIfo.DeviceModel}"
  294. TextColor="{DynamicResource Gray-700}" />
  295. <Button
  296. Grid.Row="0"
  297. Grid.Column="1"
  298. BackgroundColor="White"
  299. CornerRadius="25"
  300. FontSize="10"
  301. ImageSource="{FontImage FontFamily=FontAwesome,
  302. Glyph={x:Static helper:IconFont.Android},
  303. Size=30,
  304. Color='#4C79FF'}"
  305. Text="{Binding MobIfo.DevicePlatform}" />
  306. <Button
  307. Grid.Row="0"
  308. Grid.Column="2"
  309. BackgroundColor="White"
  310. CornerRadius="25"
  311. FontSize="10"
  312. ImageSource="{FontImage FontFamily=FontAwesome,
  313. Glyph={x:Static helper:IconFont.CellphoneAndroid},
  314. Size=30,
  315. Color='#4C79FF'}"
  316. Text="{Binding MobIfo.DeviceType}" />
  317. </Grid>
  318. </CollectionView.Footer>
  319. </CollectionView>
  320. </Grid>
  321. </Frame>
  322. </parallax:ParallaxView.BodyContent>
  323. </parallax:ParallaxView>
  324. </ContentPage.Content>
  325. </ContentPage>
Now we are creating a model(AboutTeamModel) and ViewModel(AboutViewModel)
AboutViewModel.cs
  1. public class AboutViewModel:BaseViewModel
  2. {
  3. public AboutViewModel() {
  4. try
  5. {
  6. AboutTeamModel = new AboutTeamModel() {
  7. CardsTopImage = App.BaseImageUrl + "Mask.png",
  8. AboutteamData =new List<Aboutteam>() {
  9. new Aboutteam() {
  10. linkSocial = new List<Sociallinktask>() {
  11. new Sociallinktask() {
  12. Csharpcorner = "https://www.c-sharpcorner.com/members/xamarin-skills",
  13. YtLink = "https://www.youtube.com/channel/UCmcWO6GbETogq_ULHf1PX2A",
  14. LinkedLink = "linkedin://profile/company/sumit-sisodia-5a5868a4/",
  15. BloggerLink= "https://xamarinskills.blogspot.com/" ,
  16. InstaLink = "instagram://user?username=sumit_sisodia77",
  17. }
  18. },
  19. City = "Indore",
  20. FirstName = "Sumit",
  21. LastName = "Sisodia",
  22. Designation = "Xamarin Developer",
  23. Description="I have 3+ year of experience in hybrid mobile development using xamarin.forms with C#. He is enthusiastic and take an interest in developing new things. He above in watching movies, He a good blogger, generally wrote blogs on xamarin forms.",
  24. ImageUrl="https://csharpcorner-mindcrackerinc.netdna-ssl.com/UploadFile/AuthorImage/9cd3bf20200522093419.jpg"
  25. },
  26. new Aboutteam() {
  27. linkSocial = new List<Sociallinktask>() {
  28. new Sociallinktask() {
  29. InstaLink = "instagram://user?username=sagziie",
  30. BloggerLink= "https://www.behance.net/sagzie",
  31. YtLink = "",
  32. Csharpcorner = "",
  33. LinkedLink = "" ,
  34. }
  35. },
  36. City = "Ahemdabad",
  37. FirstName = "Sagar",
  38. LastName = "Panchal",
  39. Designation = "UI/XD Designer" ,
  40. Description = "I have 5+ year of experience in UI/UX development using xamarin.forms with C#. He is enthusiastic and take an interest in developing new things. He above in watching movies.",
  41. ImageUrl="https://mir-s3-cdn-cf.behance.net/user/115/b6478f18287823.5676855c9a3df.jpg"
  42. }
  43. }
  44. };
  45. MobIfo = new DeviceInformation();
  46. }
  47. catch (Exception ex)
  48. {
  49. }
  50. }
  51. private string about= "During the COVID pandemic situation all over the world, we get an idea to develop an app which has tracking record of the cases by counties and also show safety measures aims.";
  52. public string About
  53. {
  54. get { return about; }
  55. set
  56. {
  57. about = value;
  58. RaisePropertyChanged(() =>About);
  59. }
  60. }
  61. private DeviceInformation mobinfo ;
  62. public DeviceInformation MobIfo
  63. {
  64. get { return mobinfo; }
  65. set { mobinfo = value; RaisePropertyChanged(() => MobIfo); }
  66. }
  67. private AboutTeamModel aboutteammodel;
  68. public AboutTeamModel AboutTeamModel
  69. {
  70. get { return aboutteammodel; }
  71. set
  72. {
  73. aboutteammodel = value;
  74. RaisePropertyChanged(() => AboutTeamModel);
  75. }
  76. }
  77. public ICommand SocialCommand
  78. {
  79. get
  80. {
  81. return new Command<string>((x) => SocialCommandExecution(x));
  82. }
  83. }
  84. public void SocialCommandExecution(string x)
  85. {
  86. if (string.IsNullOrEmpty(x))
  87. UserDialogs.Instance.Alert("We have no url", "Alert", "OK");
  88. else
  89. try
  90. {
  91. Device.OpenUri(new Uri(x));
  92. }
  93. catch (Exception ex)
  94. { }
  95. }
  96. }
  97. }
AboutTeamModel.cs
  1. public partial class AboutTeamModel
  2. {
  3. public string CardsTopImage { get; set; }
  4. public List<Aboutteam> AboutteamData { get; set; }
  5. }
  6. public partial class Aboutteam
  7. {
  8. public string FirstName { get; set; }
  9. public string LastName { get; set; }
  10. public string City { get; set; }
  11. public string Designation { get; set; }
  12. public string ImageUrl { get; set; }
  13. public string Description { get; set; }
  14. public List<Sociallinktask> linkSocial { get; set; }
  15. }
  16. public partial class Sociallinktask
  17. {
  18. public string LinkedLink { get; set; }
  19. public string YtLink { get; set; }
  20. public string InstaLink { get; set; }
  21. public string Csharpcorner { get; set; }
  22. public string BloggerLink { get; set; }
  23. }

CovidTabbedPage

In this CovidTabbedPage, we have to add the following pages Like COVID Global, COVID Home, COVID-19 Country search, and an About Us Page. Below, I have written the CovidTabbedPage.
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <TabbedPage
  3. x:Class="Covid19.Views.CovidTabbedPage"
  4. xmlns="http://xamarin.com/schemas/2014/forms"
  5. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  6. xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
  7. xmlns:d="http://xamarin.com/schemas/2014/forms/design"
  8. xmlns:helper="clr-namespace:Covid19.Helper"
  9. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  10. xmlns:views="clr-namespace:Covid19.Views"
  11. android:TabbedPage.ToolbarPlacement="Bottom"
  12. BarBackgroundColor="White"
  13. BarTextColor="#4C79FF"
  14. SelectedTabColor="#4C79FF"
  15. UnselectedTabColor="#999FBF"
  16. mc:Ignorable="d">
  17. <views:GlobalReport IconImageSource="{FontImage FontFamily=FontAwesome, Glyph={x:Static helper:IconFont.Earth}, Size=30, Color=Orange}" />
  18. <views:HomeReport IconImageSource="{FontImage FontFamily=FontAwesome, Glyph={x:Static helper:IconFont.Home}, Size=30, Color=Orange}" />
  19. <views:CountryReport IconImageSource="{FontImage FontFamily=FontAwesome, Glyph={x:Static helper:IconFont.Flag}, Size=30, Color=Orange}" />
  20. <views:AboutReport IconImageSource="{FontImage FontFamily=FontAwesome, Glyph={x:Static helper:IconFont.Face}, Size=30, Color=Orange}" />
  21. </TabbedPage>
If you want to check the git click here.
If you want to check apk click here.
For adding awesome font in Xamarin forms click here.