diff --git a/MyFirstMauiApp/FlyoutTabSearch/AppShell.xaml b/MyFirstMauiApp/FlyoutTabSearch/AppShell.xaml
index bb1c393..45a137a 100644
--- a/MyFirstMauiApp/FlyoutTabSearch/AppShell.xaml
+++ b/MyFirstMauiApp/FlyoutTabSearch/AppShell.xaml
@@ -3,12 +3,34 @@
x:Class="FlyoutTabSearch.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
- xmlns:local="clr-namespace:FlyoutTabSearch.Pages">
-
+ xmlns:local="clr-namespace:FlyoutTabSearch.Pages"
+ FlyoutIcon="moon.png">
+
+
+
+
+
+
+
+
+
+
+
+
- moon.png
+
diff --git a/MyFirstMauiApp/FlyoutTabSearch/AppShell.xaml.cs b/MyFirstMauiApp/FlyoutTabSearch/AppShell.xaml.cs
index 2c8195c..5f910b8 100644
--- a/MyFirstMauiApp/FlyoutTabSearch/AppShell.xaml.cs
+++ b/MyFirstMauiApp/FlyoutTabSearch/AppShell.xaml.cs
@@ -1,10 +1,14 @@
-namespace FlyoutTabSearch
+using FlyoutTabSearch.Pages;
+
+namespace FlyoutTabSearch
{
public partial class AppShell : Shell
{
public AppShell()
{
InitializeComponent();
+
+ Routing.RegisterRoute("astronomicalbodydetails", typeof(AstronomicalBodyPage));
}
}
}
diff --git a/MyFirstMauiApp/FlyoutTabSearch/Data/AstronomicalBody.cs b/MyFirstMauiApp/FlyoutTabSearch/Data/AstronomicalBody.cs
new file mode 100644
index 0000000..87bcda1
--- /dev/null
+++ b/MyFirstMauiApp/FlyoutTabSearch/Data/AstronomicalBody.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace FlyoutTabSearch.Data
+{
+ internal class AstronomicalBody
+ {
+ public string Name { get; set; }
+ public string Mass { get; set; }
+ public string Circumference { get; set; }
+ public string Age { get; set; }
+ public string EmojiIcon { get; set; }
+ }
+}
diff --git a/MyFirstMauiApp/FlyoutTabSearch/Data/SolarSystemData.cs b/MyFirstMauiApp/FlyoutTabSearch/Data/SolarSystemData.cs
new file mode 100644
index 0000000..390a98a
--- /dev/null
+++ b/MyFirstMauiApp/FlyoutTabSearch/Data/SolarSystemData.cs
@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace FlyoutTabSearch.Data
+{
+ internal class SolarSystemData
+ {
+ public static AstronomicalBody Sun = new AstronomicalBody()
+ {
+ Name = "The Sun (Sol)",
+ Mass = "1.9855*10^30 kg",
+ Circumference = "4,379,000 km",
+ Age = "4.57 billion years",
+ EmojiIcon = "☀️",
+ };
+
+ public static AstronomicalBody Earth = new AstronomicalBody()
+ {
+ Name = "Earth",
+ Mass = "5.97237*10^24 kg",
+ Circumference = "40,075 km",
+ Age = "4.54 billion years",
+ EmojiIcon = "🌎",
+ };
+
+ public static AstronomicalBody Moon = new AstronomicalBody()
+ {
+ Name = "Moon",
+ Mass = "7.342*10^22 kg",
+ Circumference = "10,921 km",
+ Age = "4.53 billion years",
+ EmojiIcon = "🌕",
+ };
+
+ public static AstronomicalBody HalleysComet = new AstronomicalBody()
+ {
+ Name = "Halley's Comet",
+ Mass = "22 * 10^14 kg",
+ Circumference = "11 km",
+ Age = "4.6 billion years",
+ EmojiIcon = "☄",
+ };
+ }
+}
diff --git a/MyFirstMauiApp/FlyoutTabSearch/FlyoutTabSearch.csproj b/MyFirstMauiApp/FlyoutTabSearch/FlyoutTabSearch.csproj
index 5b2bff4..a7a7061 100644
--- a/MyFirstMauiApp/FlyoutTabSearch/FlyoutTabSearch.csproj
+++ b/MyFirstMauiApp/FlyoutTabSearch/FlyoutTabSearch.csproj
@@ -64,6 +64,12 @@
MSBuild:Compile
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
MSBuild:Compile
diff --git a/MyFirstMauiApp/FlyoutTabSearch/Pages/AstronomicalBodiesPage.xaml b/MyFirstMauiApp/FlyoutTabSearch/Pages/AstronomicalBodiesPage.xaml
new file mode 100644
index 0000000..d8cac6c
--- /dev/null
+++ b/MyFirstMauiApp/FlyoutTabSearch/Pages/AstronomicalBodiesPage.xaml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MyFirstMauiApp/FlyoutTabSearch/Pages/AstronomicalBodiesPage.xaml.cs b/MyFirstMauiApp/FlyoutTabSearch/Pages/AstronomicalBodiesPage.xaml.cs
new file mode 100644
index 0000000..823881c
--- /dev/null
+++ b/MyFirstMauiApp/FlyoutTabSearch/Pages/AstronomicalBodiesPage.xaml.cs
@@ -0,0 +1,14 @@
+namespace FlyoutTabSearch.Pages;
+
+public partial class AstronomicalBodiesPage : ContentPage
+{
+ public AstronomicalBodiesPage()
+ {
+ InitializeComponent();
+
+ btnComet.Clicked += async (s, e) => await Shell.Current.GoToAsync("astronomicalbodydetails?astroName=comet");
+ btnEarth.Clicked += async (s, e) => await Shell.Current.GoToAsync("astronomicalbodydetails?astroName=earth");
+ btnMoon.Clicked += async (s, e) => await Shell.Current.GoToAsync("astronomicalbodydetails?astroName=moon");
+ btnSun.Clicked += async (s, e) => await Shell.Current.GoToAsync("astronomicalbodydetails?astroName=sun");
+ }
+}
\ No newline at end of file
diff --git a/MyFirstMauiApp/FlyoutTabSearch/Pages/AstronomicalBodyPage.xaml b/MyFirstMauiApp/FlyoutTabSearch/Pages/AstronomicalBodyPage.xaml
new file mode 100644
index 0000000..ca0fb84
--- /dev/null
+++ b/MyFirstMauiApp/FlyoutTabSearch/Pages/AstronomicalBodyPage.xaml
@@ -0,0 +1,47 @@
+
+
+
+
+ White
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MyFirstMauiApp/FlyoutTabSearch/Pages/AstronomicalBodyPage.xaml.cs b/MyFirstMauiApp/FlyoutTabSearch/Pages/AstronomicalBodyPage.xaml.cs
new file mode 100644
index 0000000..7892b20
--- /dev/null
+++ b/MyFirstMauiApp/FlyoutTabSearch/Pages/AstronomicalBodyPage.xaml.cs
@@ -0,0 +1,48 @@
+using FlyoutTabSearch.Data;
+
+namespace FlyoutTabSearch.Pages;
+
+[QueryProperty(nameof(AstroName), "astroName")]
+public partial class AstronomicalBodyPage : ContentPage
+{
+ private string _astroName;
+ public string AstroName
+ {
+ get { return _astroName; }
+ set
+ {
+ _astroName = value;
+ UpdateAstroBodyUI(_astroName);
+ }
+ }
+
+ public AstronomicalBodyPage()
+ {
+ InitializeComponent();
+ }
+
+ void UpdateAstroBodyUI(string astroName)
+ {
+ AstronomicalBody body = FindAstroData(astroName);
+
+ Title = body.Name;
+
+ lblIcon.Text = body.EmojiIcon;
+ lblName.Text = body.Name;
+ lblMass.Text = body.Mass;
+ lblCircumference.Text = body.Circumference;
+ lblAge.Text = body.Age;
+ }
+
+ AstronomicalBody FindAstroData(string astronomicalBodyName)
+ {
+ return astronomicalBodyName switch
+ {
+ "comet" => SolarSystemData.HalleysComet,
+ "earth" => SolarSystemData.Earth,
+ "moon" => SolarSystemData.Moon,
+ "sun" => SolarSystemData.Sun,
+ _ => throw new ArgumentException()
+ };
+ }
+}
\ No newline at end of file