diff --git a/src/WeatherTwentyOne/App.xaml b/src/WeatherTwentyOne/App.xaml index cd870c8..7df1f79 100644 --- a/src/WeatherTwentyOne/App.xaml +++ b/src/WeatherTwentyOne/App.xaml @@ -1,10 +1,8 @@  + x:Class="WeatherTwentyOne.App"> diff --git a/src/WeatherTwentyOne/App.xaml.cs b/src/WeatherTwentyOne/App.xaml.cs index f695c4a..6992cb2 100644 --- a/src/WeatherTwentyOne/App.xaml.cs +++ b/src/WeatherTwentyOne/App.xaml.cs @@ -10,7 +10,7 @@ public App() //App.Current.UserAppTheme = OSAppTheme.Light; - if (Device.Idiom == TargetIdiom.Phone) + if (DeviceInfo.Idiom == DeviceIdiom.Phone) Shell.Current.CurrentItem = PhoneTabs; Routing.RegisterRoute("settings", typeof(SettingsPage)); diff --git a/src/WeatherTwentyOne/MauiProgram.cs b/src/WeatherTwentyOne/MauiProgram.cs index d1b3230..4079133 100644 --- a/src/WeatherTwentyOne/MauiProgram.cs +++ b/src/WeatherTwentyOne/MauiProgram.cs @@ -1,4 +1,6 @@ using Microsoft.Maui.LifecycleEvents; +using WeatherTwentyOne.Pages; +using WeatherTwentyOne.ViewModels; namespace WeatherTwentyOne; @@ -16,16 +18,19 @@ public static MauiApp CreateMauiApp() }); builder.ConfigureLifecycleEvents(lifecycle => { #if WINDOWS - lifecycle - .AddWindows(windows => - windows.OnNativeMessage((app, args) => { - if (WindowExtensions.Hwnd == IntPtr.Zero) - { - WindowExtensions.Hwnd = args.Hwnd; - WindowExtensions.SetIcon("Platforms/Windows/trayicon.ico"); - } - app.ExtendsContentIntoTitleBar = false; - })); + //lifecycle + // .AddWindows(windows => + // windows.OnNativeMessage((app, args) => { + // if (WindowExtensions.Hwnd == IntPtr.Zero) + // { + // WindowExtensions.Hwnd = args.Hwnd; + // WindowExtensions.SetIcon("Platforms/Windows/trayicon.ico"); + // } + // })); + + lifecycle.AddWindows(windows => windows.OnWindowCreated((del) => { + del.ExtendsContentIntoTitleBar = true; + })); #endif }); @@ -37,6 +42,8 @@ public static MauiApp CreateMauiApp() services.AddSingleton(); services.AddSingleton(); #endif + services.AddSingleton(); + services.AddSingleton(); diff --git a/src/WeatherTwentyOne/Pages/FavoritesPage.xaml.cs b/src/WeatherTwentyOne/Pages/FavoritesPage.xaml.cs index a0e389c..25352cd 100644 --- a/src/WeatherTwentyOne/Pages/FavoritesPage.xaml.cs +++ b/src/WeatherTwentyOne/Pages/FavoritesPage.xaml.cs @@ -15,22 +15,22 @@ protected override async void OnAppearing() { base.OnAppearing(); - //await Task.Delay(300); - //TransitionIn(); + await Task.Delay(300); + TransitionIn(); } async void TransitionIn() { foreach (var item in tiles) { - item.FadeTo(1, 800); + await item.FadeTo(1, 800); await Task.Delay(50); } } int tileCount = 0; List tiles = new List(); - async void OnHandlerChanged(object sender, EventArgs e) + void OnHandlerChanged(object sender, EventArgs e) { Frame f = (Frame)sender; tiles.Add(f); diff --git a/src/WeatherTwentyOne/Pages/HomePage.xaml b/src/WeatherTwentyOne/Pages/HomePage.xaml index 111ffa5..c389493 100644 --- a/src/WeatherTwentyOne/Pages/HomePage.xaml +++ b/src/WeatherTwentyOne/Pages/HomePage.xaml @@ -5,9 +5,27 @@ xmlns:v="clr-namespace:WeatherTwentyOne.Views" xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls" ios:Page.UseSafeArea="True" - Title="Redmond, WA" + Title="St. Louis, Missouri USA" x:Class="WeatherTwentyOne.Pages.HomePage"> + + + + + + + + + + + + + + + + + + - + - + + Square150x150Logo="appiconMediumTile.png" + Square44x44Logo="appiconLogo.png"> - + diff --git a/src/WeatherTwentyOne/Resources/Styles/DefaultTheme.xaml b/src/WeatherTwentyOne/Resources/Styles/DefaultTheme.xaml index 850c835..24283ab 100644 --- a/src/WeatherTwentyOne/Resources/Styles/DefaultTheme.xaml +++ b/src/WeatherTwentyOne/Resources/Styles/DefaultTheme.xaml @@ -148,7 +148,7 @@ + Value="{AppThemeBinding Light={StaticResource DarkGray}, Dark={StaticResource TabOff}}"/>