From 50cc186d6d57acfae305abbbe502ddf3e81be5ae Mon Sep 17 00:00:00 2001 From: logikonline Date: Sun, 11 Jan 2026 12:33:48 -0500 Subject: [PATCH] AppTheming and XAML --- CLAUDE.md | 297 +++++++++++++ ShellDemo/App.cs | 78 ---- ShellDemo/App.xaml | 150 +++++++ ShellDemo/App.xaml.cs | 14 + ShellDemo/AppShell.xaml | 136 ++++++ ShellDemo/AppShell.xaml.cs | 16 + ShellDemo/Pages/AboutPage.cs | 115 ----- ShellDemo/Pages/AboutPage.xaml | 120 ++++++ ShellDemo/Pages/AboutPage.xaml.cs | 13 + ShellDemo/Pages/ButtonsPage.cs | 229 ---------- ShellDemo/Pages/ButtonsPage.xaml | 150 +++++++ ShellDemo/Pages/ButtonsPage.xaml.cs | 55 +++ ShellDemo/Pages/ControlsPage.cs | 203 --------- ShellDemo/Pages/ControlsPage.xaml | 132 ++++++ ShellDemo/Pages/ControlsPage.xaml.cs | 39 ++ ShellDemo/Pages/DetailPage.cs | 123 ------ ShellDemo/Pages/DetailPage.xaml | 48 +++ ShellDemo/Pages/DetailPage.xaml.cs | 55 +++ ShellDemo/Pages/GridsPage.cs | 594 -------------------------- ShellDemo/Pages/GridsPage.xaml | 13 + ShellDemo/Pages/GridsPage.xaml.cs | 431 +++++++++++++++++++ ShellDemo/Pages/HomePage.cs | 265 ------------ ShellDemo/Pages/HomePage.xaml | 105 +++++ ShellDemo/Pages/HomePage.xaml.cs | 121 ++++++ ShellDemo/Pages/ListsPage.cs | 249 ----------- ShellDemo/Pages/ListsPage.xaml | 133 ++++++ ShellDemo/Pages/ListsPage.xaml.cs | 104 +++++ ShellDemo/Pages/PickersPage.cs | 261 ----------- ShellDemo/Pages/PickersPage.xaml | 185 ++++++++ ShellDemo/Pages/PickersPage.xaml.cs | 107 +++++ ShellDemo/Pages/ProgressPage.cs | 261 ----------- ShellDemo/Pages/ProgressPage.xaml | 167 ++++++++ ShellDemo/Pages/ProgressPage.xaml.cs | 83 ++++ ShellDemo/Pages/SelectionPage.cs | 239 ----------- ShellDemo/Pages/SelectionPage.xaml | 157 +++++++ ShellDemo/Pages/SelectionPage.xaml.cs | 65 +++ ShellDemo/Pages/TextInputPage.cs | 166 ------- ShellDemo/Pages/TextInputPage.xaml | 121 ++++++ ShellDemo/Pages/TextInputPage.xaml.cs | 34 ++ ShellDemo/Platforms/Linux/Program.cs | 19 - ShellDemo/Program.cs | 67 +++ ShellDemo/ShellDemo.csproj | 2 +- WebViewDemo/App.cs | 21 + WebViewDemo/MauiProgram.cs | 22 + WebViewDemo/Pages/WebViewPage.xaml | 158 +++++++ WebViewDemo/Pages/WebViewPage.xaml.cs | 178 ++++++++ WebViewDemo/Program.cs | 304 ++----------- WebViewDemo/WebViewDemo.csproj | 7 +- 48 files changed, 3544 insertions(+), 3068 deletions(-) create mode 100644 CLAUDE.md delete mode 100644 ShellDemo/App.cs create mode 100644 ShellDemo/App.xaml create mode 100644 ShellDemo/App.xaml.cs create mode 100644 ShellDemo/AppShell.xaml create mode 100644 ShellDemo/AppShell.xaml.cs delete mode 100644 ShellDemo/Pages/AboutPage.cs create mode 100644 ShellDemo/Pages/AboutPage.xaml create mode 100644 ShellDemo/Pages/AboutPage.xaml.cs delete mode 100644 ShellDemo/Pages/ButtonsPage.cs create mode 100644 ShellDemo/Pages/ButtonsPage.xaml create mode 100644 ShellDemo/Pages/ButtonsPage.xaml.cs delete mode 100644 ShellDemo/Pages/ControlsPage.cs create mode 100644 ShellDemo/Pages/ControlsPage.xaml create mode 100644 ShellDemo/Pages/ControlsPage.xaml.cs delete mode 100644 ShellDemo/Pages/DetailPage.cs create mode 100644 ShellDemo/Pages/DetailPage.xaml create mode 100644 ShellDemo/Pages/DetailPage.xaml.cs delete mode 100644 ShellDemo/Pages/GridsPage.cs create mode 100644 ShellDemo/Pages/GridsPage.xaml create mode 100644 ShellDemo/Pages/GridsPage.xaml.cs delete mode 100644 ShellDemo/Pages/HomePage.cs create mode 100644 ShellDemo/Pages/HomePage.xaml create mode 100644 ShellDemo/Pages/HomePage.xaml.cs delete mode 100644 ShellDemo/Pages/ListsPage.cs create mode 100644 ShellDemo/Pages/ListsPage.xaml create mode 100644 ShellDemo/Pages/ListsPage.xaml.cs delete mode 100644 ShellDemo/Pages/PickersPage.cs create mode 100644 ShellDemo/Pages/PickersPage.xaml create mode 100644 ShellDemo/Pages/PickersPage.xaml.cs delete mode 100644 ShellDemo/Pages/ProgressPage.cs create mode 100644 ShellDemo/Pages/ProgressPage.xaml create mode 100644 ShellDemo/Pages/ProgressPage.xaml.cs delete mode 100644 ShellDemo/Pages/SelectionPage.cs create mode 100644 ShellDemo/Pages/SelectionPage.xaml create mode 100644 ShellDemo/Pages/SelectionPage.xaml.cs delete mode 100644 ShellDemo/Pages/TextInputPage.cs create mode 100644 ShellDemo/Pages/TextInputPage.xaml create mode 100644 ShellDemo/Pages/TextInputPage.xaml.cs delete mode 100644 ShellDemo/Platforms/Linux/Program.cs create mode 100644 ShellDemo/Program.cs create mode 100644 WebViewDemo/App.cs create mode 100644 WebViewDemo/MauiProgram.cs create mode 100644 WebViewDemo/Pages/WebViewPage.xaml create mode 100644 WebViewDemo/Pages/WebViewPage.xaml.cs diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..001ab00 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,297 @@ +# CLAUDE.md - OpenMaui XAML Reconstruction + +## CURRENT TASK: Reconstruct XAML from Decompiled Code + +The sample applications (ShellDemo, TodoApp, XamlBrowser) were recovered from decompiled DLLs. The XAML files were compiled away - we have only the generated `InitializeComponent()` code. **Screenshots will be provided** to help verify visual accuracy. + +--- + +## Project Locations + +| What | Path | +|------|------| +| **Main codebase** | `/Users/nible/Documents/Gitea/maui-linux/` | +| **Samples (target)** | `/Users/nible/Documents/Gitea/maui-linux-samples` | +| **Decompiled samples** | `/Users/nible/Documents/GitHub/recovered/source/` | + +--- + +## Git Branch + +**Work on `final` branch.** Commit frequently. + +```bash +git branch # Should show: * final +``` + +--- + +## XAML Reconstruction Overview + +### ShellDemo (10 pages + shell + app) + +| File | Status | Notes | +|------|--------|-------| +| App.xaml | [ ] | Colors, Styles (ThemedEntry, TitleLabel, etc.) | +| AppShell.xaml | [ ] | Shell with FlyoutHeader, 9 FlyoutItems | +| HomePage.xaml | [ ] | Welcome screen with logo | +| ButtonsPage.xaml | [ ] | Button demos | +| TextInputPage.xaml | [ ] | Entry/Editor demos | +| SelectionPage.xaml | [ ] | CheckBox, Switch, RadioButton demos | +| PickersPage.xaml | [ ] | DatePicker, TimePicker, Picker demos | +| ListsPage.xaml | [ ] | CollectionView demos | +| ProgressPage.xaml | [ ] | ProgressBar, ActivityIndicator demos | +| GridsPage.xaml | [ ] | Grid layout demos | +| AboutPage.xaml | [ ] | About information | +| DetailPage.xaml | [ ] | Navigation detail page | + +### TodoApp (app + 3 pages) + +| File | Status | Notes | +|------|--------|-------| +| App.xaml | [ x] | Colors, Icon strings | +| TodoListPage.xaml | [x ] | Main list with swipe actions | +| NewTodoPage.xaml | [x ] | Add new todo form | +| TodoDetailPage.xaml | [ x] | Edit todo details | + +### XamlBrowser (app + 1 page) - Needs Review + +| File | Status | Notes | +|------|--------|-------| +| App.xaml | [x] | Colors, styles (NavButtonStyle, GoButtonStyle, AddressBarStyle, StatusLabelStyle) | +| App.xaml.cs | [x] | BrowserApp with ToggleTheme() | +| MainPage.xaml | [x] | Toolbar with nav buttons, address bar, WebView, status bar | +| MainPage.xaml.cs | [x] | Navigation logic, progress animation, theme toggle | +| MauiProgram.cs | [x] | UseLinuxPlatform() setup | +| Program.cs | [x] | LinuxProgramHost entry point | +| Resources/Images/*.svg | [x] | 10 toolbar icons (dark/light variants) - retrieved from Google Icons | + +--- + +## How to Reconstruct XAML + +### Step 1: Read the decompiled InitializeComponent() + +Look for patterns like: +```csharp +// Setting a property +((BindableObject)val8).SetValue(Label.TextProperty, (object)"OpenMaui"); + +// AppThemeBinding (light/dark mode) +val7.Light = "White"; +val7.Dark = "#E0E0E0"; + +// StaticResource +val.Key = "PrimaryColor"; + +// Layout hierarchy +((Layout)val12).Children.Add((IView)(object)val6); +``` + +### Step 2: Convert to XAML + +```csharp +// This C#: +((BindableObject)val8).SetValue(Label.TextProperty, (object)"OpenMaui"); +((BindableObject)val8).SetValue(Label.FontSizeProperty, (object)22.0); +((BindableObject)val8).SetValue(Label.FontAttributesProperty, (object)(FontAttributes)1); +val7.Light = "White"; +val7.Dark = "#E0E0E0"; +((BindableObject)val8).SetBinding(Label.TextColorProperty, val74); +``` + +```xml + +