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 @@ + + + + + + + + + + + + + + + + + + + + + +