# 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/GitHub/maui-linux-main/` | | **Samples (target)** | `/Users/nible/Documents/GitHub/maui-linux-main/samples_temp/` | | **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 | [ ] | Colors, Icon strings | | TodoListPage.xaml | [ ] | Main list with swipe actions | | NewTodoPage.xaml | [ ] | Add new todo form | | TodoDetailPage.xaml | [ ] | Edit todo details | ### XamlBrowser (app + 1 page) - COMPLETE | 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) | --- ## 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