From 8531f2b97269b9bd4169946e1b25dc9a5796e4cc Mon Sep 17 00:00:00 2001 From: logikonline Date: Sun, 11 Jan 2026 13:34:36 -0500 Subject: [PATCH] Icon work - and apptheming --- ShellDemo/AppShell.xaml | 72 +++------- ShellDemo/Pages/HomePage.xaml.cs | 1 + .../Resources/Images/calendar_month_dark.svg | 1 + .../Resources/Images/calendar_month_light.svg | 1 + ShellDemo/Resources/Images/check_box_dark.svg | 1 + .../Resources/Images/check_box_light.svg | 1 + ShellDemo/Resources/Images/edit_note_dark.svg | 1 + .../Resources/Images/edit_note_light.svg | 1 + .../Images/format_list_bulleted_dark.svg | 1 + .../Images/format_list_bulleted_light.svg | 1 + ShellDemo/Resources/Images/grid_view_dark.svg | 1 + .../Resources/Images/grid_view_light.svg | 1 + ShellDemo/Resources/Images/home_dark.svg | 1 + ShellDemo/Resources/Images/home_light.svg | 1 + .../Resources/Images/hourglass_empty_dark.svg | 1 + .../Images/hourglass_empty_light.svg | 1 + ShellDemo/Resources/Images/info_dark.svg | 1 + ShellDemo/Resources/Images/info_light.svg | 1 + .../Resources/Images/smart_button_dark.svg | 1 + .../Resources/Images/smart_button_light.svg | 1 + ShellDemo/ShellDemo.csproj | 4 + TodoApp/App.cs | 21 --- TodoApp/App.xaml | 76 ++++++++++ TodoApp/App.xaml.cs | 35 +++++ TodoApp/Pages/NewTodoPage.xaml | 35 ++--- TodoApp/Pages/TodoDetailPage.xaml | 44 +++--- TodoApp/Pages/TodoListPage.xaml | 22 +-- TodoApp/Pages/TodoListPage.xaml.cs | 32 +++-- TodoApp/Resources/Images/add_white.svg | 1 + TodoApp/Resources/Images/delete_white.svg | 1 + TodoApp/Resources/Images/save_white.svg | 1 + TodoApp/TodoApp.csproj | 6 +- WebViewDemo/App.cs | 21 --- WebViewDemo/App.xaml | 71 ++++++++++ WebViewDemo/App.xaml.cs | 35 +++++ WebViewDemo/Pages/WebViewPage.xaml | 130 ++++++++---------- .../Resources/Images/arrow_back_dark.svg | 1 + .../Resources/Images/arrow_back_light.svg | 1 + .../Resources/Images/arrow_forward_dark.svg | 1 + .../Resources/Images/arrow_forward_light.svg | 1 + WebViewDemo/Resources/Images/code_dark.svg | 1 + WebViewDemo/Resources/Images/code_light.svg | 1 + .../Resources/Images/play_arrow_dark.svg | 1 + .../Resources/Images/play_arrow_light.svg | 1 + WebViewDemo/Resources/Images/refresh_dark.svg | 1 + .../Resources/Images/refresh_light.svg | 1 + WebViewDemo/Resources/Images/send_dark.svg | 1 + WebViewDemo/Resources/Images/send_light.svg | 1 + WebViewDemo/WebViewDemo.csproj | 4 + maui-linux-samples.sln | 36 +++++ 50 files changed, 441 insertions(+), 237 deletions(-) create mode 100644 ShellDemo/Resources/Images/calendar_month_dark.svg create mode 100644 ShellDemo/Resources/Images/calendar_month_light.svg create mode 100644 ShellDemo/Resources/Images/check_box_dark.svg create mode 100644 ShellDemo/Resources/Images/check_box_light.svg create mode 100644 ShellDemo/Resources/Images/edit_note_dark.svg create mode 100644 ShellDemo/Resources/Images/edit_note_light.svg create mode 100644 ShellDemo/Resources/Images/format_list_bulleted_dark.svg create mode 100644 ShellDemo/Resources/Images/format_list_bulleted_light.svg create mode 100644 ShellDemo/Resources/Images/grid_view_dark.svg create mode 100644 ShellDemo/Resources/Images/grid_view_light.svg create mode 100644 ShellDemo/Resources/Images/home_dark.svg create mode 100644 ShellDemo/Resources/Images/home_light.svg create mode 100644 ShellDemo/Resources/Images/hourglass_empty_dark.svg create mode 100644 ShellDemo/Resources/Images/hourglass_empty_light.svg create mode 100644 ShellDemo/Resources/Images/info_dark.svg create mode 100644 ShellDemo/Resources/Images/info_light.svg create mode 100644 ShellDemo/Resources/Images/smart_button_dark.svg create mode 100644 ShellDemo/Resources/Images/smart_button_light.svg delete mode 100644 TodoApp/App.cs create mode 100644 TodoApp/App.xaml create mode 100644 TodoApp/App.xaml.cs create mode 100644 TodoApp/Resources/Images/add_white.svg create mode 100644 TodoApp/Resources/Images/delete_white.svg create mode 100644 TodoApp/Resources/Images/save_white.svg delete mode 100644 WebViewDemo/App.cs create mode 100644 WebViewDemo/App.xaml create mode 100644 WebViewDemo/App.xaml.cs create mode 100644 WebViewDemo/Resources/Images/arrow_back_dark.svg create mode 100644 WebViewDemo/Resources/Images/arrow_back_light.svg create mode 100644 WebViewDemo/Resources/Images/arrow_forward_dark.svg create mode 100644 WebViewDemo/Resources/Images/arrow_forward_light.svg create mode 100644 WebViewDemo/Resources/Images/code_dark.svg create mode 100644 WebViewDemo/Resources/Images/code_light.svg create mode 100644 WebViewDemo/Resources/Images/play_arrow_dark.svg create mode 100644 WebViewDemo/Resources/Images/play_arrow_light.svg create mode 100644 WebViewDemo/Resources/Images/refresh_dark.svg create mode 100644 WebViewDemo/Resources/Images/refresh_light.svg create mode 100644 WebViewDemo/Resources/Images/send_dark.svg create mode 100644 WebViewDemo/Resources/Images/send_light.svg create mode 100644 maui-linux-samples.sln diff --git a/ShellDemo/AppShell.xaml b/ShellDemo/AppShell.xaml index d376172..8d65f2d 100644 --- a/ShellDemo/AppShell.xaml +++ b/ShellDemo/AppShell.xaml @@ -44,92 +44,56 @@ - - - - + - - - - + - - - - + - - - - + - - - - + - - - - + - - - - + - - - - + - - - - + diff --git a/ShellDemo/Pages/HomePage.xaml.cs b/ShellDemo/Pages/HomePage.xaml.cs index 3f401bf..f448c8c 100644 --- a/ShellDemo/Pages/HomePage.xaml.cs +++ b/ShellDemo/Pages/HomePage.xaml.cs @@ -1,6 +1,7 @@ // HomePage - Welcome page for the demo using Microsoft.Maui.Controls; +using Microsoft.Maui.Controls.Shapes; using Microsoft.Maui.Graphics; using Microsoft.Maui.Platform.Linux.Hosting; diff --git a/ShellDemo/Resources/Images/calendar_month_dark.svg b/ShellDemo/Resources/Images/calendar_month_dark.svg new file mode 100644 index 0000000..8029ad9 --- /dev/null +++ b/ShellDemo/Resources/Images/calendar_month_dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ShellDemo/Resources/Images/calendar_month_light.svg b/ShellDemo/Resources/Images/calendar_month_light.svg new file mode 100644 index 0000000..3386cd8 --- /dev/null +++ b/ShellDemo/Resources/Images/calendar_month_light.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ShellDemo/Resources/Images/check_box_dark.svg b/ShellDemo/Resources/Images/check_box_dark.svg new file mode 100644 index 0000000..c44b52a --- /dev/null +++ b/ShellDemo/Resources/Images/check_box_dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ShellDemo/Resources/Images/check_box_light.svg b/ShellDemo/Resources/Images/check_box_light.svg new file mode 100644 index 0000000..2b94886 --- /dev/null +++ b/ShellDemo/Resources/Images/check_box_light.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ShellDemo/Resources/Images/edit_note_dark.svg b/ShellDemo/Resources/Images/edit_note_dark.svg new file mode 100644 index 0000000..17d7044 --- /dev/null +++ b/ShellDemo/Resources/Images/edit_note_dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ShellDemo/Resources/Images/edit_note_light.svg b/ShellDemo/Resources/Images/edit_note_light.svg new file mode 100644 index 0000000..0522fbb --- /dev/null +++ b/ShellDemo/Resources/Images/edit_note_light.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ShellDemo/Resources/Images/format_list_bulleted_dark.svg b/ShellDemo/Resources/Images/format_list_bulleted_dark.svg new file mode 100644 index 0000000..f271f76 --- /dev/null +++ b/ShellDemo/Resources/Images/format_list_bulleted_dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ShellDemo/Resources/Images/format_list_bulleted_light.svg b/ShellDemo/Resources/Images/format_list_bulleted_light.svg new file mode 100644 index 0000000..d7d9960 --- /dev/null +++ b/ShellDemo/Resources/Images/format_list_bulleted_light.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ShellDemo/Resources/Images/grid_view_dark.svg b/ShellDemo/Resources/Images/grid_view_dark.svg new file mode 100644 index 0000000..32bb066 --- /dev/null +++ b/ShellDemo/Resources/Images/grid_view_dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ShellDemo/Resources/Images/grid_view_light.svg b/ShellDemo/Resources/Images/grid_view_light.svg new file mode 100644 index 0000000..0df735d --- /dev/null +++ b/ShellDemo/Resources/Images/grid_view_light.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ShellDemo/Resources/Images/home_dark.svg b/ShellDemo/Resources/Images/home_dark.svg new file mode 100644 index 0000000..09938e3 --- /dev/null +++ b/ShellDemo/Resources/Images/home_dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ShellDemo/Resources/Images/home_light.svg b/ShellDemo/Resources/Images/home_light.svg new file mode 100644 index 0000000..700d1dc --- /dev/null +++ b/ShellDemo/Resources/Images/home_light.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ShellDemo/Resources/Images/hourglass_empty_dark.svg b/ShellDemo/Resources/Images/hourglass_empty_dark.svg new file mode 100644 index 0000000..8094fa5 --- /dev/null +++ b/ShellDemo/Resources/Images/hourglass_empty_dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ShellDemo/Resources/Images/hourglass_empty_light.svg b/ShellDemo/Resources/Images/hourglass_empty_light.svg new file mode 100644 index 0000000..dc1d1ad --- /dev/null +++ b/ShellDemo/Resources/Images/hourglass_empty_light.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ShellDemo/Resources/Images/info_dark.svg b/ShellDemo/Resources/Images/info_dark.svg new file mode 100644 index 0000000..30d2443 --- /dev/null +++ b/ShellDemo/Resources/Images/info_dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ShellDemo/Resources/Images/info_light.svg b/ShellDemo/Resources/Images/info_light.svg new file mode 100644 index 0000000..a3e9264 --- /dev/null +++ b/ShellDemo/Resources/Images/info_light.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ShellDemo/Resources/Images/smart_button_dark.svg b/ShellDemo/Resources/Images/smart_button_dark.svg new file mode 100644 index 0000000..ea51e13 --- /dev/null +++ b/ShellDemo/Resources/Images/smart_button_dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ShellDemo/Resources/Images/smart_button_light.svg b/ShellDemo/Resources/Images/smart_button_light.svg new file mode 100644 index 0000000..195df96 --- /dev/null +++ b/ShellDemo/Resources/Images/smart_button_light.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ShellDemo/ShellDemo.csproj b/ShellDemo/ShellDemo.csproj index 4d84e80..42d5daa 100644 --- a/ShellDemo/ShellDemo.csproj +++ b/ShellDemo/ShellDemo.csproj @@ -12,4 +12,8 @@ + + + + diff --git a/TodoApp/App.cs b/TodoApp/App.cs deleted file mode 100644 index 7ffbb8d..0000000 --- a/TodoApp/App.cs +++ /dev/null @@ -1,21 +0,0 @@ -// TodoApp - Main Application with NavigationPage - -using Microsoft.Maui.Controls; - -namespace TodoApp; - -public class App : Application -{ - public static NavigationPage? NavigationPage { get; private set; } - - public App() - { - NavigationPage = new NavigationPage(new TodoListPage()) - { - Title = "OpenMaui Todo App", - BarBackgroundColor = Color.FromArgb("#2196F3"), - BarTextColor = Colors.White - }; - MainPage = NavigationPage; - } -} diff --git a/TodoApp/App.xaml b/TodoApp/App.xaml new file mode 100644 index 0000000..6f33625 --- /dev/null +++ b/TodoApp/App.xaml @@ -0,0 +1,76 @@ + + + + + + #5C6BC0 + #3949AB + #26A69A + #EF5350 + #9E9E9E + + + #F5F7FA + #FFFFFF + #212121 + #757575 + #E8EAF6 + #E0E0E0 + #F5F5F5 + + + #121212 + #1E1E1E + #FFFFFF + #B0B0B0 + #424242 + #424242 + #2A2A2A + + + #5C6BC0 + #3949AB + + + + + + + + + + + + + + diff --git a/TodoApp/App.xaml.cs b/TodoApp/App.xaml.cs new file mode 100644 index 0000000..5fea456 --- /dev/null +++ b/TodoApp/App.xaml.cs @@ -0,0 +1,35 @@ +// TodoApp - Main Application with NavigationPage and Theme Support + +using Microsoft.Maui.Controls; + +namespace TodoApp; + +public partial class App : Application +{ + public static NavigationPage? NavigationPage { get; private set; } + + public App() + { + InitializeComponent(); + + // Determine current theme for navigation bar colors + var isDarkMode = Application.Current?.RequestedTheme == AppTheme.Dark; + var barBackground = isDarkMode ? Color.FromArgb("#3949AB") : Color.FromArgb("#5C6BC0"); + + NavigationPage = new NavigationPage(new TodoListPage()) + { + Title = "OpenMaui Todo App", + BarBackgroundColor = barBackground, + BarTextColor = Colors.White + }; + + // Update navigation bar when theme changes + Application.Current!.RequestedThemeChanged += (s, e) => + { + var dark = e.RequestedTheme == AppTheme.Dark; + NavigationPage.BarBackgroundColor = dark ? Color.FromArgb("#3949AB") : Color.FromArgb("#5C6BC0"); + }; + + MainPage = NavigationPage; + } +} diff --git a/TodoApp/Pages/NewTodoPage.xaml b/TodoApp/Pages/NewTodoPage.xaml index 7f4f1a4..c7597a3 100644 --- a/TodoApp/Pages/NewTodoPage.xaml +++ b/TodoApp/Pages/NewTodoPage.xaml @@ -3,19 +3,12 @@ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="TodoApp.NewTodoPage" Title="New Task" - BackgroundColor="#F5F7FA"> - - - #5C6BC0 - #26A69A - #212121 - #757575 - #FFFFFF - #E8EAF6 - + BackgroundColor="{AppThemeBinding Light={StaticResource PageBackgroundLight}, Dark={StaticResource PageBackgroundDark}}"> - + @@ -24,10 +17,10 @@ @@ -36,8 +29,8 @@ FontSize="13" FontAttributes="Bold" TextColor="{StaticResource PrimaryColor}" /> - @@ -46,8 +39,8 @@ + TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" + PlaceholderColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" /> @@ -60,8 +53,8 @@ @@ -70,8 +63,8 @@ diff --git a/TodoApp/Pages/TodoDetailPage.xaml b/TodoApp/Pages/TodoDetailPage.xaml index ea8037a..feee9ea 100644 --- a/TodoApp/Pages/TodoDetailPage.xaml +++ b/TodoApp/Pages/TodoDetailPage.xaml @@ -3,21 +3,15 @@ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="TodoApp.TodoDetailPage" Title="Task Details" - BackgroundColor="#F5F7FA"> - - - #5C6BC0 - #26A69A - #EF5350 - #212121 - #757575 - #FFFFFF - #E8EAF6 - + BackgroundColor="{AppThemeBinding Light={StaticResource PageBackgroundLight}, Dark={StaticResource PageBackgroundDark}}"> - - + + @@ -28,8 +22,8 @@ FontSize="13" FontAttributes="Bold" TextColor="{StaticResource PrimaryColor}" /> - @@ -38,8 +32,8 @@ + TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" + PlaceholderColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" /> @@ -52,8 +46,8 @@ @@ -62,8 +56,8 @@ @@ -73,8 +67,8 @@ FontSize="13" FontAttributes="Bold" TextColor="{StaticResource PrimaryColor}" /> - @@ -88,7 +82,7 @@ @@ -98,7 +92,7 @@