Compare commits

3 Commits

Author SHA1 Message Date
8531f2b972 Icon work - and apptheming 2026-01-11 13:34:36 -05:00
50cc186d6d AppTheming and XAML 2026-01-11 12:33:48 -05:00
f87ea17a6f Restructured sample pages folder 2026-01-11 10:37:01 -05:00
105 changed files with 4017 additions and 23708 deletions

297
CLAUDE.md Normal file
View File

@@ -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
<!-- Becomes this XAML: -->
<Label Text="OpenMaui"
FontSize="22"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light=White, Dark=#E0E0E0}" />
```
### Step 3: Verify with screenshots (when provided)
Compare the reconstructed XAML against the actual screenshots to ensure visual fidelity.
---
## App.xaml Resources Reference
### ShellDemo Colors (extracted from decompiled)
```xml
<!-- Light theme -->
<Color x:Key="PrimaryColor">#2196F3</Color>
<Color x:Key="PrimaryDarkColor">#1976D2</Color>
<Color x:Key="AccentColor">#FF4081</Color>
<Color x:Key="PageBackgroundLight">#F8F8F8</Color>
<Color x:Key="CardBackgroundLight">#FFFFFF</Color>
<Color x:Key="TextPrimaryLight">#212121</Color>
<Color x:Key="TextSecondaryLight">#757575</Color>
<Color x:Key="BorderLight">#E0E0E0</Color>
<Color x:Key="EntryBackgroundLight">#F9F9F9</Color>
<Color x:Key="ShellBackgroundLight">#FFFFFF</Color>
<Color x:Key="FlyoutBackgroundLight">#FFFFFF</Color>
<Color x:Key="ProgressTrackLight">#E0E0E0</Color>
<!-- Dark theme -->
<Color x:Key="PageBackgroundDark">#121212</Color>
<Color x:Key="CardBackgroundDark">#1E1E1E</Color>
<Color x:Key="TextPrimaryDark">#FFFFFF</Color>
<Color x:Key="TextSecondaryDark">#B0B0B0</Color>
<Color x:Key="BorderDark">#424242</Color>
<Color x:Key="EntryBackgroundDark">#2C2C2C</Color>
<Color x:Key="ShellBackgroundDark">#1E1E1E</Color>
<Color x:Key="FlyoutBackgroundDark">#1E1E1E</Color>
<Color x:Key="ProgressTrackDark">#424242</Color>
```
### ShellDemo Styles (extracted from decompiled)
- **ThemedEntry**: BackgroundColor, TextColor, PlaceholderColor with AppThemeBinding
- **ThemedEditor**: BackgroundColor, TextColor, PlaceholderColor with AppThemeBinding
- **TitleLabel**: FontSize=24, FontAttributes=Bold, TextColor with AppThemeBinding
- **SubtitleLabel**: FontSize=16, TextColor with AppThemeBinding
- **ThemedFrame**: BackgroundColor, BorderColor with AppThemeBinding
- **ThemedProgressBar**: ProgressColor=PrimaryColor, BackgroundColor with AppThemeBinding
- **PrimaryButton**: BackgroundColor=PrimaryColor, TextColor=White
- **SecondaryButton**: Light/dark themed background and text
### TodoApp Colors
```xml
<Color x:Key="PrimaryColor">#5C6BC0</Color>
<Color x:Key="PrimaryDarkColor">#3949AB</Color>
<Color x:Key="AccentColor">#26A69A</Color>
<Color x:Key="DangerColor">#EF5350</Color>
<!-- ... plus light/dark theme colors -->
```
### TodoApp Icons (Material Design)
```xml
<x:String x:Key="IconAdd">&#xe145;</x:String>
<x:String x:Key="IconDelete">&#xe872;</x:String>
<x:String x:Key="IconSave">&#xe161;</x:String>
<x:String x:Key="IconCheck">&#xe876;</x:String>
<x:String x:Key="IconEdit">&#xe3c9;</x:String>
```
---
## AppShell.xaml Structure (ShellDemo)
From decompiled code, the shell has:
```xml
<Shell Title="OpenMaui Controls Demo"
FlyoutBehavior="Flyout"
FlyoutBackgroundColor="{AppThemeBinding Light={StaticResource FlyoutBackgroundLight}, Dark={StaticResource FlyoutBackgroundDark}}">
<!-- FlyoutHeader: Grid with logo and title -->
<Shell.FlyoutHeader>
<Grid BackgroundColor="{AppThemeBinding ...}" HeightRequest="140" Padding="15">
<HorizontalStackLayout VerticalOptions="Center" Spacing="12">
<Image Source="openmaui_logo.svg" WidthRequest="60" HeightRequest="60" />
<VerticalStackLayout VerticalOptions="Center">
<Label Text="OpenMaui" FontSize="22" FontAttributes="Bold"
TextColor="{AppThemeBinding Light=White, Dark=#E0E0E0}" />
<Label Text="Controls Demo" FontSize="13" Opacity="0.9"
TextColor="{AppThemeBinding Light=White, Dark=#B0B0B0}" />
</VerticalStackLayout>
</HorizontalStackLayout>
</Grid>
</Shell.FlyoutHeader>
<!-- FlyoutItems with emoji icons -->
<FlyoutItem Title="Home" Route="Home">
<FlyoutItem.Icon><FontImageSource Glyph="🏠" FontFamily="Default" Color="{AppThemeBinding ...}" /></FlyoutItem.Icon>
<ShellContent ContentTemplate="{DataTemplate local:HomePage}" />
</FlyoutItem>
<FlyoutItem Title="Buttons" Route="Buttons">...</FlyoutItem>
<FlyoutItem Title="Text Input" Route="TextInput">...</FlyoutItem>
<FlyoutItem Title="Selection" Route="Selection">...</FlyoutItem>
<FlyoutItem Title="Pickers" Route="Pickers">...</FlyoutItem>
<FlyoutItem Title="Lists" Route="Lists">...</FlyoutItem>
<FlyoutItem Title="Progress" Route="Progress">...</FlyoutItem>
<FlyoutItem Title="Grids" Route="Grids">...</FlyoutItem>
<FlyoutItem Title="About" Route="About">...</FlyoutItem>
</Shell>
```
---
## Decompiled File Locations
| Sample | Decompiled Path |
|--------|-----------------|
| ShellDemo | `/Users/nible/Documents/GitHub/recovered/source/ShellDemo/ShellDemo/` |
| TodoApp | `/Users/nible/Documents/GitHub/recovered/source/TodoApp/TodoApp/` |
| XamlBrowser | `/Users/nible/Documents/GitHub/recovered/source/XamlBrowser/XamlBrowser/` |
---
## Build Command
```bash
cd /Users/nible/Documents/GitHub/maui-linux-main
dotnet build OpenMaui.Controls.Linux.csproj
```
---
## Key Patterns in Decompiled Code
### 1. Color Values
```csharp
Color val = new Color(11f / 85f, 0.5882353f, 81f / 85f, 1f);
// = Color.FromRgba(0.129, 0.588, 0.953, 1.0) = #2196F3
```
### 2. AppThemeBinding
```csharp
AppThemeBindingExtension val7 = new AppThemeBindingExtension();
val7.Light = "White";
val7.Dark = "#E0E0E0";
```
Becomes: `{AppThemeBinding Light=White, Dark=#E0E0E0}`
### 3. StaticResource
```csharp
val.Key = "PrimaryColor";
```
Becomes: `{StaticResource PrimaryColor}`
### 4. Layout Hierarchy
```csharp
((Layout)val12).Children.Add((IView)(object)val6);
((Layout)val12).Children.Add((IView)(object)val11);
```
The children are added in order - first child is val6, second is val11.
### 5. FontAttributes Enum
```csharp
(FontAttributes)1 // Bold
(FontAttributes)2 // Italic
```
---
## Workflow for Each File
1. **Read decompiled** `InitializeComponent()` method
2. **Extract** all UI elements and their properties
3. **Write XAML** with proper structure
4. **Create code-behind** (usually just constructor calling InitializeComponent)
5. **Verify** against screenshot if available
6. **Update tracking** in this file
7. **Commit** with descriptive message
---
## Notes
- The decompiled code has ALL the information needed - it's just in C# form instead of XAML
- Screenshots will help verify visual accuracy
- Focus on one file at a time
- Commit after each completed file

View File

@@ -1,673 +0,0 @@
using System;
using System.CodeDom.Compiler;
using System.Reflection;
using System.Xml;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;
using Microsoft.Maui.Controls.Xaml.Internals;
using Microsoft.Maui.Graphics;
namespace ShellDemo;
[XamlFilePath("App.xaml")]
public class App : Application
{
public App()
{
InitializeComponent();
((Application)this).MainPage = (Page)(object)new AppShell();
}
[GeneratedCode("Microsoft.Maui.Controls.SourceGen", "1.0.0.0")]
private void InitializeComponent()
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Expected O, but got Unknown
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Expected O, but got Unknown
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Expected O, but got Unknown
//IL_0064: Unknown result type (might be due to invalid IL or missing references)
//IL_006a: Expected O, but got Unknown
//IL_007e: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Expected O, but got Unknown
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_00a0: Expected O, but got Unknown
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00bb: Expected O, but got Unknown
//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
//IL_00d6: Expected O, but got Unknown
//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
//IL_00f1: Expected O, but got Unknown
//IL_0105: Unknown result type (might be due to invalid IL or missing references)
//IL_010c: Expected O, but got Unknown
//IL_0120: Unknown result type (might be due to invalid IL or missing references)
//IL_0127: Expected O, but got Unknown
//IL_013b: Unknown result type (might be due to invalid IL or missing references)
//IL_0142: Expected O, but got Unknown
//IL_0156: Unknown result type (might be due to invalid IL or missing references)
//IL_015d: Expected O, but got Unknown
//IL_0171: Unknown result type (might be due to invalid IL or missing references)
//IL_0178: Expected O, but got Unknown
//IL_018c: Unknown result type (might be due to invalid IL or missing references)
//IL_0193: Expected O, but got Unknown
//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
//IL_01ae: Expected O, but got Unknown
//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
//IL_01c9: Expected O, but got Unknown
//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
//IL_01e4: Expected O, but got Unknown
//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
//IL_01ff: Expected O, but got Unknown
//IL_0213: Unknown result type (might be due to invalid IL or missing references)
//IL_021a: Expected O, but got Unknown
//IL_022e: Unknown result type (might be due to invalid IL or missing references)
//IL_0235: Expected O, but got Unknown
//IL_0235: Unknown result type (might be due to invalid IL or missing references)
//IL_023c: Expected O, but got Unknown
//IL_023c: Unknown result type (might be due to invalid IL or missing references)
//IL_0243: Expected O, but got Unknown
//IL_0243: Unknown result type (might be due to invalid IL or missing references)
//IL_024a: Expected O, but got Unknown
//IL_024a: Unknown result type (might be due to invalid IL or missing references)
//IL_0251: Expected O, but got Unknown
//IL_0251: Unknown result type (might be due to invalid IL or missing references)
//IL_0258: Expected O, but got Unknown
//IL_0258: Unknown result type (might be due to invalid IL or missing references)
//IL_025f: Expected O, but got Unknown
//IL_025f: Unknown result type (might be due to invalid IL or missing references)
//IL_0266: Expected O, but got Unknown
//IL_0266: Unknown result type (might be due to invalid IL or missing references)
//IL_026d: Expected O, but got Unknown
//IL_026d: Unknown result type (might be due to invalid IL or missing references)
//IL_0274: Expected O, but got Unknown
//IL_0274: Unknown result type (might be due to invalid IL or missing references)
//IL_027b: Expected O, but got Unknown
//IL_027b: Unknown result type (might be due to invalid IL or missing references)
//IL_0282: Expected O, but got Unknown
//IL_0282: Unknown result type (might be due to invalid IL or missing references)
//IL_0289: Expected O, but got Unknown
//IL_0293: Unknown result type (might be due to invalid IL or missing references)
//IL_029a: Expected O, but got Unknown
//IL_029a: Unknown result type (might be due to invalid IL or missing references)
//IL_02a1: Expected O, but got Unknown
//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
//IL_02a8: Expected O, but got Unknown
//IL_02a8: Unknown result type (might be due to invalid IL or missing references)
//IL_02af: Expected O, but got Unknown
//IL_02af: Unknown result type (might be due to invalid IL or missing references)
//IL_02b6: Expected O, but got Unknown
//IL_02b6: Unknown result type (might be due to invalid IL or missing references)
//IL_02bd: Expected O, but got Unknown
//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
//IL_02c4: Expected O, but got Unknown
//IL_02c4: Unknown result type (might be due to invalid IL or missing references)
//IL_02cb: Expected O, but got Unknown
//IL_02cb: Unknown result type (might be due to invalid IL or missing references)
//IL_02d2: Expected O, but got Unknown
//IL_02d2: Unknown result type (might be due to invalid IL or missing references)
//IL_02d9: Expected O, but got Unknown
//IL_02d9: Unknown result type (might be due to invalid IL or missing references)
//IL_02e0: Expected O, but got Unknown
//IL_02e0: Unknown result type (might be due to invalid IL or missing references)
//IL_02e7: Expected O, but got Unknown
//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
//IL_02ee: Expected O, but got Unknown
//IL_02f8: Unknown result type (might be due to invalid IL or missing references)
//IL_02ff: Expected O, but got Unknown
//IL_02ff: Unknown result type (might be due to invalid IL or missing references)
//IL_0306: Expected O, but got Unknown
//IL_0306: Unknown result type (might be due to invalid IL or missing references)
//IL_030d: Expected O, but got Unknown
//IL_030d: Unknown result type (might be due to invalid IL or missing references)
//IL_0314: Expected O, but got Unknown
//IL_0314: Unknown result type (might be due to invalid IL or missing references)
//IL_031b: Expected O, but got Unknown
//IL_031b: Unknown result type (might be due to invalid IL or missing references)
//IL_0322: Expected O, but got Unknown
//IL_0322: Unknown result type (might be due to invalid IL or missing references)
//IL_0329: Expected O, but got Unknown
//IL_0333: Unknown result type (might be due to invalid IL or missing references)
//IL_033a: Expected O, but got Unknown
//IL_033a: Unknown result type (might be due to invalid IL or missing references)
//IL_0341: Expected O, but got Unknown
//IL_0341: Unknown result type (might be due to invalid IL or missing references)
//IL_0348: Expected O, but got Unknown
//IL_0348: Unknown result type (might be due to invalid IL or missing references)
//IL_034f: Expected O, but got Unknown
//IL_034f: Unknown result type (might be due to invalid IL or missing references)
//IL_0356: Expected O, but got Unknown
//IL_0356: Unknown result type (might be due to invalid IL or missing references)
//IL_035d: Expected O, but got Unknown
//IL_0367: Unknown result type (might be due to invalid IL or missing references)
//IL_036e: Expected O, but got Unknown
//IL_036e: Unknown result type (might be due to invalid IL or missing references)
//IL_0375: Expected O, but got Unknown
//IL_0375: Unknown result type (might be due to invalid IL or missing references)
//IL_037c: Expected O, but got Unknown
//IL_037c: Unknown result type (might be due to invalid IL or missing references)
//IL_0383: Expected O, but got Unknown
//IL_0383: Unknown result type (might be due to invalid IL or missing references)
//IL_038a: Expected O, but got Unknown
//IL_038a: Unknown result type (might be due to invalid IL or missing references)
//IL_0391: Expected O, but got Unknown
//IL_0391: Unknown result type (might be due to invalid IL or missing references)
//IL_0398: Expected O, but got Unknown
//IL_0398: Unknown result type (might be due to invalid IL or missing references)
//IL_039f: Expected O, but got Unknown
//IL_039f: Unknown result type (might be due to invalid IL or missing references)
//IL_03a6: Expected O, but got Unknown
//IL_03b0: Unknown result type (might be due to invalid IL or missing references)
//IL_03b7: Expected O, but got Unknown
//IL_03b7: Unknown result type (might be due to invalid IL or missing references)
//IL_03be: Expected O, but got Unknown
//IL_03be: Unknown result type (might be due to invalid IL or missing references)
//IL_03c5: Expected O, but got Unknown
//IL_03c5: Unknown result type (might be due to invalid IL or missing references)
//IL_03cc: Expected O, but got Unknown
//IL_03cc: Unknown result type (might be due to invalid IL or missing references)
//IL_03d3: Expected O, but got Unknown
//IL_03d3: Unknown result type (might be due to invalid IL or missing references)
//IL_03da: Expected O, but got Unknown
//IL_03da: Unknown result type (might be due to invalid IL or missing references)
//IL_03e1: Expected O, but got Unknown
//IL_03eb: Unknown result type (might be due to invalid IL or missing references)
//IL_03f2: Expected O, but got Unknown
//IL_03f2: Unknown result type (might be due to invalid IL or missing references)
//IL_03f9: Expected O, but got Unknown
//IL_03f9: Unknown result type (might be due to invalid IL or missing references)
//IL_0400: Expected O, but got Unknown
//IL_0400: Unknown result type (might be due to invalid IL or missing references)
//IL_0407: Expected O, but got Unknown
//IL_0411: Unknown result type (might be due to invalid IL or missing references)
//IL_0418: Expected O, but got Unknown
//IL_0418: Unknown result type (might be due to invalid IL or missing references)
//IL_041f: Expected O, but got Unknown
//IL_041f: Unknown result type (might be due to invalid IL or missing references)
//IL_0426: Expected O, but got Unknown
//IL_0426: Unknown result type (might be due to invalid IL or missing references)
//IL_042d: Expected O, but got Unknown
//IL_042d: Unknown result type (might be due to invalid IL or missing references)
//IL_0434: Expected O, but got Unknown
//IL_0434: Unknown result type (might be due to invalid IL or missing references)
//IL_043b: Expected O, but got Unknown
//IL_0445: Unknown result type (might be due to invalid IL or missing references)
//IL_044c: Expected O, but got Unknown
//IL_044c: Unknown result type (might be due to invalid IL or missing references)
//IL_0453: Expected O, but got Unknown
//IL_0470: Unknown result type (might be due to invalid IL or missing references)
//IL_0477: Expected O, but got Unknown
//IL_0477: Unknown result type (might be due to invalid IL or missing references)
//IL_047e: Expected O, but got Unknown
//IL_047e: Unknown result type (might be due to invalid IL or missing references)
//IL_0485: Expected O, but got Unknown
//IL_0485: Unknown result type (might be due to invalid IL or missing references)
//IL_048c: Expected O, but got Unknown
//IL_048c: Unknown result type (might be due to invalid IL or missing references)
//IL_0493: Expected O, but got Unknown
//IL_0493: Unknown result type (might be due to invalid IL or missing references)
//IL_049a: Expected O, but got Unknown
//IL_049a: Unknown result type (might be due to invalid IL or missing references)
//IL_04a1: Expected O, but got Unknown
//IL_04a1: Unknown result type (might be due to invalid IL or missing references)
//IL_04a8: Expected O, but got Unknown
//IL_04a8: Unknown result type (might be due to invalid IL or missing references)
//IL_04af: Expected O, but got Unknown
//IL_04af: Unknown result type (might be due to invalid IL or missing references)
//IL_04b6: Expected O, but got Unknown
//IL_04b6: Unknown result type (might be due to invalid IL or missing references)
//IL_04bd: Expected O, but got Unknown
//IL_04bd: Unknown result type (might be due to invalid IL or missing references)
//IL_04c4: Expected O, but got Unknown
//IL_04c4: Unknown result type (might be due to invalid IL or missing references)
//IL_04cb: Expected O, but got Unknown
//IL_04cb: Unknown result type (might be due to invalid IL or missing references)
//IL_04d2: Expected O, but got Unknown
//IL_04d2: Unknown result type (might be due to invalid IL or missing references)
//IL_04d9: Expected O, but got Unknown
//IL_04d9: Unknown result type (might be due to invalid IL or missing references)
//IL_04e0: Expected O, but got Unknown
//IL_04e0: Unknown result type (might be due to invalid IL or missing references)
//IL_04e7: Expected O, but got Unknown
//IL_04e7: Unknown result type (might be due to invalid IL or missing references)
//IL_04ee: Expected O, but got Unknown
//IL_04ee: Unknown result type (might be due to invalid IL or missing references)
//IL_04f5: Expected O, but got Unknown
//IL_0659: Unknown result type (might be due to invalid IL or missing references)
//IL_065e: Unknown result type (might be due to invalid IL or missing references)
//IL_067f: Unknown result type (might be due to invalid IL or missing references)
//IL_0689: Expected O, but got Unknown
//IL_0689: Unknown result type (might be due to invalid IL or missing references)
//IL_0698: Unknown result type (might be due to invalid IL or missing references)
//IL_06a2: Expected O, but got Unknown
//IL_069d: Unknown result type (might be due to invalid IL or missing references)
//IL_06a7: Expected O, but got Unknown
//IL_06ac: Expected O, but got Unknown
//IL_06fd: Unknown result type (might be due to invalid IL or missing references)
//IL_0702: Unknown result type (might be due to invalid IL or missing references)
//IL_0723: Unknown result type (might be due to invalid IL or missing references)
//IL_072d: Expected O, but got Unknown
//IL_072d: Unknown result type (might be due to invalid IL or missing references)
//IL_073c: Unknown result type (might be due to invalid IL or missing references)
//IL_0746: Expected O, but got Unknown
//IL_0741: Unknown result type (might be due to invalid IL or missing references)
//IL_074b: Expected O, but got Unknown
//IL_0750: Expected O, but got Unknown
//IL_07a1: Unknown result type (might be due to invalid IL or missing references)
//IL_07a6: Unknown result type (might be due to invalid IL or missing references)
//IL_07c7: Unknown result type (might be due to invalid IL or missing references)
//IL_07d1: Expected O, but got Unknown
//IL_07d1: Unknown result type (might be due to invalid IL or missing references)
//IL_07e0: Unknown result type (might be due to invalid IL or missing references)
//IL_07ea: Expected O, but got Unknown
//IL_07e5: Unknown result type (might be due to invalid IL or missing references)
//IL_07ef: Expected O, but got Unknown
//IL_07f4: Expected O, but got Unknown
//IL_0853: Unknown result type (might be due to invalid IL or missing references)
//IL_0858: Unknown result type (might be due to invalid IL or missing references)
//IL_0879: Unknown result type (might be due to invalid IL or missing references)
//IL_0883: Expected O, but got Unknown
//IL_0883: Unknown result type (might be due to invalid IL or missing references)
//IL_0892: Unknown result type (might be due to invalid IL or missing references)
//IL_089c: Expected O, but got Unknown
//IL_0897: Unknown result type (might be due to invalid IL or missing references)
//IL_08a1: Expected O, but got Unknown
//IL_08a6: Expected O, but got Unknown
//IL_08f7: Unknown result type (might be due to invalid IL or missing references)
//IL_08fc: Unknown result type (might be due to invalid IL or missing references)
//IL_091d: Unknown result type (might be due to invalid IL or missing references)
//IL_0927: Expected O, but got Unknown
//IL_0927: Unknown result type (might be due to invalid IL or missing references)
//IL_0936: Unknown result type (might be due to invalid IL or missing references)
//IL_0940: Expected O, but got Unknown
//IL_093b: Unknown result type (might be due to invalid IL or missing references)
//IL_0945: Expected O, but got Unknown
//IL_094a: Expected O, but got Unknown
//IL_099b: Unknown result type (might be due to invalid IL or missing references)
//IL_09a0: Unknown result type (might be due to invalid IL or missing references)
//IL_09c1: Unknown result type (might be due to invalid IL or missing references)
//IL_09cb: Expected O, but got Unknown
//IL_09cb: Unknown result type (might be due to invalid IL or missing references)
//IL_09da: Unknown result type (might be due to invalid IL or missing references)
//IL_09e4: Expected O, but got Unknown
//IL_09df: Unknown result type (might be due to invalid IL or missing references)
//IL_09e9: Expected O, but got Unknown
//IL_09ee: Expected O, but got Unknown
//IL_0abb: Unknown result type (might be due to invalid IL or missing references)
//IL_0ac0: Unknown result type (might be due to invalid IL or missing references)
//IL_0ae1: Unknown result type (might be due to invalid IL or missing references)
//IL_0aeb: Expected O, but got Unknown
//IL_0aeb: Unknown result type (might be due to invalid IL or missing references)
//IL_0afa: Unknown result type (might be due to invalid IL or missing references)
//IL_0b04: Expected O, but got Unknown
//IL_0aff: Unknown result type (might be due to invalid IL or missing references)
//IL_0b09: Expected O, but got Unknown
//IL_0b0e: Expected O, but got Unknown
//IL_0ba8: Unknown result type (might be due to invalid IL or missing references)
//IL_0bad: Unknown result type (might be due to invalid IL or missing references)
//IL_0bce: Unknown result type (might be due to invalid IL or missing references)
//IL_0bd8: Expected O, but got Unknown
//IL_0bd8: Unknown result type (might be due to invalid IL or missing references)
//IL_0be7: Unknown result type (might be due to invalid IL or missing references)
//IL_0bf1: Expected O, but got Unknown
//IL_0bec: Unknown result type (might be due to invalid IL or missing references)
//IL_0bf6: Expected O, but got Unknown
//IL_0bfb: Expected O, but got Unknown
//IL_0c5a: Unknown result type (might be due to invalid IL or missing references)
//IL_0c5f: Unknown result type (might be due to invalid IL or missing references)
//IL_0c80: Unknown result type (might be due to invalid IL or missing references)
//IL_0c8a: Expected O, but got Unknown
//IL_0c8a: Unknown result type (might be due to invalid IL or missing references)
//IL_0c99: Unknown result type (might be due to invalid IL or missing references)
//IL_0ca3: Expected O, but got Unknown
//IL_0c9e: Unknown result type (might be due to invalid IL or missing references)
//IL_0ca8: Expected O, but got Unknown
//IL_0cad: Expected O, but got Unknown
//IL_0cfe: Unknown result type (might be due to invalid IL or missing references)
//IL_0d03: Unknown result type (might be due to invalid IL or missing references)
//IL_0d24: Unknown result type (might be due to invalid IL or missing references)
//IL_0d2e: Expected O, but got Unknown
//IL_0d2e: Unknown result type (might be due to invalid IL or missing references)
//IL_0d3d: Unknown result type (might be due to invalid IL or missing references)
//IL_0d47: Expected O, but got Unknown
//IL_0d42: Unknown result type (might be due to invalid IL or missing references)
//IL_0d4c: Expected O, but got Unknown
//IL_0d51: Expected O, but got Unknown
//IL_0ddf: Unknown result type (might be due to invalid IL or missing references)
//IL_0de4: Unknown result type (might be due to invalid IL or missing references)
//IL_0e05: Unknown result type (might be due to invalid IL or missing references)
//IL_0e0f: Expected O, but got Unknown
//IL_0e0f: Unknown result type (might be due to invalid IL or missing references)
//IL_0e1e: Unknown result type (might be due to invalid IL or missing references)
//IL_0e28: Expected O, but got Unknown
//IL_0e23: Unknown result type (might be due to invalid IL or missing references)
//IL_0e2d: Expected O, but got Unknown
//IL_0e32: Expected O, but got Unknown
//IL_0eee: Unknown result type (might be due to invalid IL or missing references)
//IL_0ef3: Unknown result type (might be due to invalid IL or missing references)
//IL_0f14: Unknown result type (might be due to invalid IL or missing references)
//IL_0f1e: Expected O, but got Unknown
//IL_0f1e: Unknown result type (might be due to invalid IL or missing references)
//IL_0f2d: Unknown result type (might be due to invalid IL or missing references)
//IL_0f37: Expected O, but got Unknown
//IL_0f32: Unknown result type (might be due to invalid IL or missing references)
//IL_0f3c: Expected O, but got Unknown
//IL_0f41: Expected O, but got Unknown
//IL_0f89: Unknown result type (might be due to invalid IL or missing references)
//IL_0f8e: Unknown result type (might be due to invalid IL or missing references)
//IL_0faf: Unknown result type (might be due to invalid IL or missing references)
//IL_0fb9: Expected O, but got Unknown
//IL_0fb9: Unknown result type (might be due to invalid IL or missing references)
//IL_0fc8: Unknown result type (might be due to invalid IL or missing references)
//IL_0fd2: Expected O, but got Unknown
//IL_0fcd: Unknown result type (might be due to invalid IL or missing references)
//IL_0fd7: Expected O, but got Unknown
//IL_0fdc: Expected O, but got Unknown
//IL_0460: Unknown result type (might be due to invalid IL or missing references)
Color val = new Color(11f / 85f, 0.5882353f, 81f / 85f, 1f);
Color val2 = new Color(5f / 51f, 0.4627451f, 0.8235294f, 1f);
Color val3 = new Color(1f, 0.2509804f, 43f / 85f, 1f);
Color val4 = new Color(50f / 51f, 50f / 51f, 50f / 51f, 1f);
Color val5 = new Color(1f, 1f, 1f, 1f);
Color val6 = new Color(11f / 85f, 11f / 85f, 11f / 85f, 1f);
Color val7 = new Color(39f / 85f, 39f / 85f, 39f / 85f, 1f);
Color val8 = new Color(0.8784314f, 0.8784314f, 0.8784314f, 1f);
Color val9 = new Color(49f / 51f, 49f / 51f, 49f / 51f, 1f);
Color val10 = new Color(1f, 1f, 1f, 1f);
Color val11 = new Color(1f, 1f, 1f, 1f);
Color val12 = new Color(0.8784314f, 0.8784314f, 0.8784314f, 1f);
Color val13 = new Color(6f / 85f, 6f / 85f, 6f / 85f, 1f);
Color val14 = new Color(0.11764706f, 0.11764706f, 0.11764706f, 1f);
Color val15 = new Color(1f, 1f, 1f, 1f);
Color val16 = new Color(0.6901961f, 0.6901961f, 0.6901961f, 1f);
Color val17 = new Color(22f / 85f, 22f / 85f, 22f / 85f, 1f);
Color val18 = new Color(0.17254902f, 0.17254902f, 0.17254902f, 1f);
Color val19 = new Color(0.11764706f, 0.11764706f, 0.11764706f, 1f);
Color val20 = new Color(0.11764706f, 0.11764706f, 0.11764706f, 1f);
Color val21 = new Color(22f / 85f, 22f / 85f, 22f / 85f, 1f);
StaticResourceExtension val22 = new StaticResourceExtension();
StaticResourceExtension val23 = new StaticResourceExtension();
AppThemeBindingExtension val24 = new AppThemeBindingExtension();
Setter val25 = new Setter();
StaticResourceExtension val26 = new StaticResourceExtension();
StaticResourceExtension val27 = new StaticResourceExtension();
AppThemeBindingExtension val28 = new AppThemeBindingExtension();
Setter val29 = new Setter();
StaticResourceExtension val30 = new StaticResourceExtension();
StaticResourceExtension val31 = new StaticResourceExtension();
AppThemeBindingExtension val32 = new AppThemeBindingExtension();
Setter val33 = new Setter();
Style val34 = new Style(typeof(Entry));
StaticResourceExtension val35 = new StaticResourceExtension();
StaticResourceExtension val36 = new StaticResourceExtension();
AppThemeBindingExtension val37 = new AppThemeBindingExtension();
Setter val38 = new Setter();
StaticResourceExtension val39 = new StaticResourceExtension();
StaticResourceExtension val40 = new StaticResourceExtension();
AppThemeBindingExtension val41 = new AppThemeBindingExtension();
Setter val42 = new Setter();
StaticResourceExtension val43 = new StaticResourceExtension();
StaticResourceExtension val44 = new StaticResourceExtension();
AppThemeBindingExtension val45 = new AppThemeBindingExtension();
Setter val46 = new Setter();
Style val47 = new Style(typeof(Editor));
Setter val48 = new Setter();
Setter val49 = new Setter();
StaticResourceExtension val50 = new StaticResourceExtension();
StaticResourceExtension val51 = new StaticResourceExtension();
AppThemeBindingExtension val52 = new AppThemeBindingExtension();
Setter val53 = new Setter();
Style val54 = new Style(typeof(Label));
Setter val55 = new Setter();
StaticResourceExtension val56 = new StaticResourceExtension();
StaticResourceExtension val57 = new StaticResourceExtension();
AppThemeBindingExtension val58 = new AppThemeBindingExtension();
Setter val59 = new Setter();
Style val60 = new Style(typeof(Label));
StaticResourceExtension val61 = new StaticResourceExtension();
StaticResourceExtension val62 = new StaticResourceExtension();
AppThemeBindingExtension val63 = new AppThemeBindingExtension();
Setter val64 = new Setter();
StaticResourceExtension val65 = new StaticResourceExtension();
StaticResourceExtension val66 = new StaticResourceExtension();
AppThemeBindingExtension val67 = new AppThemeBindingExtension();
Setter val68 = new Setter();
Style val69 = new Style(typeof(Frame));
StaticResourceExtension val70 = new StaticResourceExtension();
Setter val71 = new Setter();
StaticResourceExtension val72 = new StaticResourceExtension();
StaticResourceExtension val73 = new StaticResourceExtension();
AppThemeBindingExtension val74 = new AppThemeBindingExtension();
Setter val75 = new Setter();
Style val76 = new Style(typeof(ProgressBar));
StaticResourceExtension val77 = new StaticResourceExtension();
Setter val78 = new Setter();
Setter val79 = new Setter();
Style val80 = new Style(typeof(Button));
AppThemeBindingExtension val81 = new AppThemeBindingExtension();
Setter val82 = new Setter();
StaticResourceExtension val83 = new StaticResourceExtension();
AppThemeBindingExtension val84 = new AppThemeBindingExtension();
Setter val85 = new Setter();
Style val86 = new Style(typeof(Button));
ResourceDictionary val87 = new ResourceDictionary();
App app;
NameScope val88 = (NameScope)(((object)NameScope.GetNameScope((BindableObject)(object)(app = this))) ?? ((object)new NameScope()));
NameScope.SetNameScope((BindableObject)(object)app, (INameScope)(object)val88);
NameScope val89 = new NameScope();
NameScope val90 = new NameScope();
NameScope val91 = new NameScope();
NameScope val92 = new NameScope();
NameScope val93 = new NameScope();
NameScope val94 = new NameScope();
NameScope val95 = new NameScope();
NameScope val96 = new NameScope();
NameScope val97 = new NameScope();
NameScope val98 = new NameScope();
NameScope val99 = new NameScope();
NameScope val100 = new NameScope();
NameScope val101 = new NameScope();
NameScope val102 = new NameScope();
NameScope val103 = new NameScope();
NameScope val104 = new NameScope();
NameScope val105 = new NameScope();
NameScope val106 = new NameScope();
NameScope val107 = new NameScope();
((Application)app).Resources = val87;
val87.Add("PrimaryColor", (object)val);
val87.Add("PrimaryDarkColor", (object)val2);
val87.Add("AccentColor", (object)val3);
val87.Add("PageBackgroundLight", (object)val4);
val87.Add("CardBackgroundLight", (object)val5);
val87.Add("TextPrimaryLight", (object)val6);
val87.Add("TextSecondaryLight", (object)val7);
val87.Add("BorderLight", (object)val8);
val87.Add("EntryBackgroundLight", (object)val9);
val87.Add("ShellBackgroundLight", (object)val10);
val87.Add("FlyoutBackgroundLight", (object)val11);
val87.Add("ProgressTrackLight", (object)val12);
val87.Add("PageBackgroundDark", (object)val13);
val87.Add("CardBackgroundDark", (object)val14);
val87.Add("TextPrimaryDark", (object)val15);
val87.Add("TextSecondaryDark", (object)val16);
val87.Add("BorderDark", (object)val17);
val87.Add("EntryBackgroundDark", (object)val18);
val87.Add("ShellBackgroundDark", (object)val19);
val87.Add("FlyoutBackgroundDark", (object)val20);
val87.Add("ProgressTrackDark", (object)val21);
val25.Property = VisualElement.BackgroundColorProperty;
val22.Key = "EntryBackgroundLight";
val24.Light = val9;
val23.Key = "EntryBackgroundDark";
val24.Dark = val18;
XamlServiceProvider val108 = new XamlServiceProvider();
val108.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val25, (object)typeof(Setter).GetRuntimeProperty("Value")));
val108.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(36, 52)));
BindingBase value = ((IMarkupExtension<BindingBase>)(object)val24).ProvideValue((IServiceProvider)val108);
val25.Value = value;
val34.Setters.Add(val25);
val29.Property = Entry.TextColorProperty;
val26.Key = "TextPrimaryLight";
val28.Light = val6;
val27.Key = "TextPrimaryDark";
val28.Dark = val15;
XamlServiceProvider val109 = new XamlServiceProvider();
val109.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val29, (object)typeof(Setter).GetRuntimeProperty("Value")));
val109.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(37, 46)));
BindingBase value2 = ((IMarkupExtension<BindingBase>)(object)val28).ProvideValue((IServiceProvider)val109);
val29.Value = value2;
val34.Setters.Add(val29);
val33.Property = Entry.PlaceholderColorProperty;
val30.Key = "TextSecondaryLight";
val32.Light = val7;
val31.Key = "TextSecondaryDark";
val32.Dark = val16;
XamlServiceProvider val110 = new XamlServiceProvider();
val110.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val33, (object)typeof(Setter).GetRuntimeProperty("Value")));
val110.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(38, 53)));
BindingBase value3 = ((IMarkupExtension<BindingBase>)(object)val32).ProvideValue((IServiceProvider)val110);
val33.Value = value3;
val34.Setters.Add(val33);
val87.Add("ThemedEntry", (object)val34);
val38.Property = VisualElement.BackgroundColorProperty;
val35.Key = "EntryBackgroundLight";
val37.Light = val9;
val36.Key = "EntryBackgroundDark";
val37.Dark = val18;
XamlServiceProvider val111 = new XamlServiceProvider();
val111.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val38, (object)typeof(Setter).GetRuntimeProperty("Value")));
val111.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(43, 52)));
BindingBase value4 = ((IMarkupExtension<BindingBase>)(object)val37).ProvideValue((IServiceProvider)val111);
val38.Value = value4;
val47.Setters.Add(val38);
val42.Property = Editor.TextColorProperty;
val39.Key = "TextPrimaryLight";
val41.Light = val6;
val40.Key = "TextPrimaryDark";
val41.Dark = val15;
XamlServiceProvider val112 = new XamlServiceProvider();
val112.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val42, (object)typeof(Setter).GetRuntimeProperty("Value")));
val112.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(44, 46)));
BindingBase value5 = ((IMarkupExtension<BindingBase>)(object)val41).ProvideValue((IServiceProvider)val112);
val42.Value = value5;
val47.Setters.Add(val42);
val46.Property = Editor.PlaceholderColorProperty;
val43.Key = "TextSecondaryLight";
val45.Light = val7;
val44.Key = "TextSecondaryDark";
val45.Dark = val16;
XamlServiceProvider val113 = new XamlServiceProvider();
val113.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val46, (object)typeof(Setter).GetRuntimeProperty("Value")));
val113.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(45, 53)));
BindingBase value6 = ((IMarkupExtension<BindingBase>)(object)val45).ProvideValue((IServiceProvider)val113);
val46.Value = value6;
val47.Setters.Add(val46);
val87.Add("ThemedEditor", (object)val47);
val48.Property = Label.FontSizeProperty;
val48.Value = "24";
val48.Value = 24.0;
val54.Setters.Add(val48);
val49.Property = Label.FontAttributesProperty;
val49.Value = "Bold";
val49.Value = (object)(FontAttributes)1;
val54.Setters.Add(val49);
val53.Property = Label.TextColorProperty;
val50.Key = "TextPrimaryLight";
val52.Light = val6;
val51.Key = "TextPrimaryDark";
val52.Dark = val15;
XamlServiceProvider val114 = new XamlServiceProvider();
val114.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val53, (object)typeof(Setter).GetRuntimeProperty("Value")));
val114.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(52, 46)));
BindingBase value7 = ((IMarkupExtension<BindingBase>)(object)val52).ProvideValue((IServiceProvider)val114);
val53.Value = value7;
val54.Setters.Add(val53);
val87.Add("TitleLabel", (object)val54);
val55.Property = Label.FontSizeProperty;
val55.Value = "16";
val55.Value = 16.0;
val60.Setters.Add(val55);
val59.Property = Label.TextColorProperty;
val56.Key = "TextSecondaryLight";
val58.Light = val7;
val57.Key = "TextSecondaryDark";
val58.Dark = val16;
XamlServiceProvider val115 = new XamlServiceProvider();
val115.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val59, (object)typeof(Setter).GetRuntimeProperty("Value")));
val115.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(57, 46)));
BindingBase value8 = ((IMarkupExtension<BindingBase>)(object)val58).ProvideValue((IServiceProvider)val115);
val59.Value = value8;
val60.Setters.Add(val59);
val87.Add("SubtitleLabel", (object)val60);
val64.Property = VisualElement.BackgroundColorProperty;
val61.Key = "CardBackgroundLight";
val63.Light = val5;
val62.Key = "CardBackgroundDark";
val63.Dark = val14;
XamlServiceProvider val116 = new XamlServiceProvider();
val116.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val64, (object)typeof(Setter).GetRuntimeProperty("Value")));
val116.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(62, 52)));
BindingBase value9 = ((IMarkupExtension<BindingBase>)(object)val63).ProvideValue((IServiceProvider)val116);
val64.Value = value9;
val69.Setters.Add(val64);
val68.Property = Frame.BorderColorProperty;
val65.Key = "BorderLight";
val67.Light = val8;
val66.Key = "BorderDark";
val67.Dark = val17;
XamlServiceProvider val117 = new XamlServiceProvider();
val117.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val68, (object)typeof(Setter).GetRuntimeProperty("Value")));
val117.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(63, 48)));
BindingBase value10 = ((IMarkupExtension<BindingBase>)(object)val67).ProvideValue((IServiceProvider)val117);
val68.Value = value10;
val69.Setters.Add(val68);
val87.Add("ThemedFrame", (object)val69);
val71.Property = ProgressBar.ProgressColorProperty;
val70.Key = "PrimaryColor";
val71.Value = val;
val76.Setters.Add(val71);
val75.Property = VisualElement.BackgroundColorProperty;
val72.Key = "ProgressTrackLight";
val74.Light = val12;
val73.Key = "ProgressTrackDark";
val74.Dark = val21;
XamlServiceProvider val118 = new XamlServiceProvider();
val118.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val75, (object)typeof(Setter).GetRuntimeProperty("Value")));
val118.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(69, 52)));
BindingBase value11 = ((IMarkupExtension<BindingBase>)(object)val74).ProvideValue((IServiceProvider)val118);
val75.Value = value11;
val76.Setters.Add(val75);
val87.Add("ThemedProgressBar", (object)val76);
val78.Property = VisualElement.BackgroundColorProperty;
val77.Key = "PrimaryColor";
val78.Value = val;
val80.Setters.Add(val78);
val79.Property = Button.TextColorProperty;
val79.Value = "White";
val79.Value = Colors.White;
val80.Setters.Add(val79);
val87.Add("PrimaryButton", (object)val80);
val82.Property = VisualElement.BackgroundColorProperty;
val81.Light = "#E3F2FD";
val81.Dark = "#1565C0";
XamlServiceProvider val119 = new XamlServiceProvider();
val119.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val82, (object)typeof(Setter).GetRuntimeProperty("Value")));
val119.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(79, 52)));
BindingBase value12 = ((IMarkupExtension<BindingBase>)(object)val81).ProvideValue((IServiceProvider)val119);
val82.Value = value12;
val86.Setters.Add(val82);
val85.Property = Button.TextColorProperty;
val83.Key = "PrimaryColor";
val84.Light = val;
val84.Dark = "White";
XamlServiceProvider val120 = new XamlServiceProvider();
val120.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val85, (object)typeof(Setter).GetRuntimeProperty("Value")));
val120.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(80, 46)));
BindingBase value13 = ((IMarkupExtension<BindingBase>)(object)val84).ProvideValue((IServiceProvider)val120);
val85.Value = value13;
val86.Setters.Add(val85);
val87.Add("SecondaryButton", (object)val86);
((Application)app).Resources = val87;
}
}

150
ShellDemo/App.xaml Normal file
View File

@@ -0,0 +1,150 @@
<?xml version="1.0" encoding="utf-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShellDemo.App">
<Application.Resources>
<ResourceDictionary>
<!-- Primary Colors -->
<Color x:Key="PrimaryColor">#2196F3</Color>
<Color x:Key="PrimaryDarkColor">#1976D2</Color>
<Color x:Key="AccentColor">#FF4081</Color>
<Color x:Key="SuccessColor">#4CAF50</Color>
<Color x:Key="WarningColor">#FF9800</Color>
<Color x:Key="DangerColor">#F44336</Color>
<Color x:Key="PurpleColor">#9C27B0</Color>
<!-- Light Theme Colors -->
<Color x:Key="PageBackgroundLight">#F8F8F8</Color>
<Color x:Key="CardBackgroundLight">#FFFFFF</Color>
<Color x:Key="TextPrimaryLight">#212121</Color>
<Color x:Key="TextSecondaryLight">#757575</Color>
<Color x:Key="BorderLight">#E0E0E0</Color>
<Color x:Key="EntryBackgroundLight">#F9F9F9</Color>
<Color x:Key="ShellBackgroundLight">#FFFFFF</Color>
<Color x:Key="FlyoutBackgroundLight">#FFFFFF</Color>
<Color x:Key="FlyoutHeaderBackgroundLight">#1976D2</Color>
<Color x:Key="ProgressTrackLight">#E0E0E0</Color>
<!-- Dark Theme Colors -->
<Color x:Key="PageBackgroundDark">#121212</Color>
<Color x:Key="CardBackgroundDark">#1E1E1E</Color>
<Color x:Key="TextPrimaryDark">#FFFFFF</Color>
<Color x:Key="TextSecondaryDark">#B0B0B0</Color>
<Color x:Key="BorderDark">#424242</Color>
<Color x:Key="EntryBackgroundDark">#2C2C2C</Color>
<Color x:Key="ShellBackgroundDark">#1E1E1E</Color>
<Color x:Key="FlyoutBackgroundDark">#1E1E1E</Color>
<Color x:Key="FlyoutHeaderBackgroundDark">#0D47A1</Color>
<Color x:Key="ProgressTrackDark">#424242</Color>
<!-- Themed Entry Style -->
<Style x:Key="ThemedEntry" TargetType="Entry">
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource EntryBackgroundLight}, Dark={StaticResource EntryBackgroundDark}}" />
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
</Style>
<!-- Themed Editor Style -->
<Style x:Key="ThemedEditor" TargetType="Editor">
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource EntryBackgroundLight}, Dark={StaticResource EntryBackgroundDark}}" />
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
</Style>
<!-- Title Label Style -->
<Style x:Key="TitleLabel" TargetType="Label">
<Setter Property="FontSize" Value="24" />
<Setter Property="FontAttributes" Value="Bold" />
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</Style>
<!-- Subtitle Label Style -->
<Style x:Key="SubtitleLabel" TargetType="Label">
<Setter Property="FontSize" Value="16" />
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
</Style>
<!-- Body Label Style -->
<Style x:Key="BodyLabel" TargetType="Label">
<Setter Property="FontSize" Value="14" />
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</Style>
<!-- Caption Label Style -->
<Style x:Key="CaptionLabel" TargetType="Label">
<Setter Property="FontSize" Value="12" />
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
</Style>
<!-- Themed Frame Style -->
<Style x:Key="ThemedFrame" TargetType="Frame">
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource CardBackgroundLight}, Dark={StaticResource CardBackgroundDark}}" />
<Setter Property="BorderColor" Value="{AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource BorderDark}}" />
<Setter Property="CornerRadius" Value="8" />
<Setter Property="Padding" Value="15" />
</Style>
<!-- Themed Border Style -->
<Style x:Key="ThemedBorder" TargetType="Border">
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource CardBackgroundLight}, Dark={StaticResource CardBackgroundDark}}" />
<Setter Property="Stroke" Value="{AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource BorderDark}}" />
<Setter Property="StrokeThickness" Value="1" />
</Style>
<!-- Themed Card Border Style -->
<Style x:Key="ThemedCard" TargetType="Border">
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource CardBackgroundLight}, Dark={StaticResource CardBackgroundDark}}" />
<Setter Property="StrokeThickness" Value="0" />
<Setter Property="Padding" Value="15" />
<Setter Property="StrokeShape">
<Setter.Value>
<RoundRectangle CornerRadius="8" />
</Setter.Value>
</Setter>
</Style>
<!-- Themed ProgressBar Style -->
<Style x:Key="ThemedProgressBar" TargetType="ProgressBar">
<Setter Property="ProgressColor" Value="{StaticResource PrimaryColor}" />
</Style>
<!-- Primary Button Style -->
<Style x:Key="PrimaryButton" TargetType="Button">
<Setter Property="BackgroundColor" Value="{StaticResource PrimaryColor}" />
<Setter Property="TextColor" Value="White" />
<Setter Property="CornerRadius" Value="5" />
</Style>
<!-- Secondary Button Style -->
<Style x:Key="SecondaryButton" TargetType="Button">
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light=#E0E0E0, Dark=#424242}" />
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Setter Property="CornerRadius" Value="5" />
</Style>
<!-- Success Button Style -->
<Style x:Key="SuccessButton" TargetType="Button">
<Setter Property="BackgroundColor" Value="{StaticResource SuccessColor}" />
<Setter Property="TextColor" Value="White" />
<Setter Property="CornerRadius" Value="5" />
</Style>
<!-- Danger Button Style -->
<Style x:Key="DangerButton" TargetType="Button">
<Setter Property="BackgroundColor" Value="{StaticResource DangerColor}" />
<Setter Property="TextColor" Value="White" />
<Setter Property="CornerRadius" Value="5" />
</Style>
<!-- Themed BoxView Divider -->
<Style x:Key="ThemedDivider" TargetType="BoxView">
<Setter Property="HeightRequest" Value="1" />
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource BorderDark}}" />
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>

14
ShellDemo/App.xaml.cs Normal file
View File

@@ -0,0 +1,14 @@
// App.xaml.cs - Main Application code-behind
using Microsoft.Maui.Controls;
namespace ShellDemo;
public partial class App : Application
{
public App()
{
InitializeComponent();
MainPage = new AppShell();
}
}

View File

@@ -1,650 +0,0 @@
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Reflection;
using System.Xml;
using Microsoft.Maui;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;
using Microsoft.Maui.Controls.Xaml.Internals;
namespace ShellDemo;
[XamlFilePath("AppShell.xaml")]
public class AppShell : Shell
{
public AppShell()
{
InitializeComponent();
Routing.RegisterRoute("detail", typeof(DetailPage));
}
[GeneratedCode("Microsoft.Maui.Controls.SourceGen", "1.0.0.0")]
private void InitializeComponent()
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Expected O, but got Unknown
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Expected O, but got Unknown
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: Expected O, but got Unknown
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_0019: Expected O, but got Unknown
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Expected O, but got Unknown
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Expected O, but got Unknown
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Expected O, but got Unknown
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Expected O, but got Unknown
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Expected O, but got Unknown
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Expected O, but got Unknown
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Expected O, but got Unknown
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Expected O, but got Unknown
//IL_0051: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Expected O, but got Unknown
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Expected O, but got Unknown
//IL_005f: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Expected O, but got Unknown
//IL_0070: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Expected O, but got Unknown
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_007e: Expected O, but got Unknown
//IL_007e: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Expected O, but got Unknown
//IL_0085: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Expected O, but got Unknown
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0093: Expected O, but got Unknown
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
//IL_00a4: Expected O, but got Unknown
//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
//IL_00ab: Expected O, but got Unknown
//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
//IL_00b2: Expected O, but got Unknown
//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: Expected O, but got Unknown
//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
//IL_00c0: Expected O, but got Unknown
//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
//IL_00d1: Expected O, but got Unknown
//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
//IL_00d8: Expected O, but got Unknown
//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
//IL_00df: Expected O, but got Unknown
//IL_00df: Unknown result type (might be due to invalid IL or missing references)
//IL_00e6: Expected O, but got Unknown
//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
//IL_00ed: Expected O, but got Unknown
//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
//IL_00fe: Expected O, but got Unknown
//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
//IL_0105: Expected O, but got Unknown
//IL_0105: Unknown result type (might be due to invalid IL or missing references)
//IL_010c: Expected O, but got Unknown
//IL_010c: Unknown result type (might be due to invalid IL or missing references)
//IL_0113: Expected O, but got Unknown
//IL_0113: Unknown result type (might be due to invalid IL or missing references)
//IL_011a: Expected O, but got Unknown
//IL_0124: Unknown result type (might be due to invalid IL or missing references)
//IL_012b: Expected O, but got Unknown
//IL_012b: Unknown result type (might be due to invalid IL or missing references)
//IL_0132: Expected O, but got Unknown
//IL_0132: Unknown result type (might be due to invalid IL or missing references)
//IL_0139: Expected O, but got Unknown
//IL_0139: Unknown result type (might be due to invalid IL or missing references)
//IL_0140: Expected O, but got Unknown
//IL_0140: Unknown result type (might be due to invalid IL or missing references)
//IL_0147: Expected O, but got Unknown
//IL_0151: Unknown result type (might be due to invalid IL or missing references)
//IL_0158: Expected O, but got Unknown
//IL_0158: Unknown result type (might be due to invalid IL or missing references)
//IL_015f: Expected O, but got Unknown
//IL_015f: Unknown result type (might be due to invalid IL or missing references)
//IL_0166: Expected O, but got Unknown
//IL_0166: Unknown result type (might be due to invalid IL or missing references)
//IL_016d: Expected O, but got Unknown
//IL_016d: Unknown result type (might be due to invalid IL or missing references)
//IL_0174: Expected O, but got Unknown
//IL_017e: Unknown result type (might be due to invalid IL or missing references)
//IL_0185: Expected O, but got Unknown
//IL_0185: Unknown result type (might be due to invalid IL or missing references)
//IL_018c: Expected O, but got Unknown
//IL_018c: Unknown result type (might be due to invalid IL or missing references)
//IL_0193: Expected O, but got Unknown
//IL_0193: Unknown result type (might be due to invalid IL or missing references)
//IL_019a: Expected O, but got Unknown
//IL_019a: Unknown result type (might be due to invalid IL or missing references)
//IL_01a1: Expected O, but got Unknown
//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
//IL_01b2: Expected O, but got Unknown
//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
//IL_01b9: Expected O, but got Unknown
//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
//IL_01c0: Expected O, but got Unknown
//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
//IL_01c7: Expected O, but got Unknown
//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
//IL_01ce: Expected O, but got Unknown
//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
//IL_01df: Expected O, but got Unknown
//IL_01df: Unknown result type (might be due to invalid IL or missing references)
//IL_01e6: Expected O, but got Unknown
//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
//IL_01ed: Expected O, but got Unknown
//IL_0361: Unknown result type (might be due to invalid IL or missing references)
//IL_0366: Unknown result type (might be due to invalid IL or missing references)
//IL_0371: Unknown result type (might be due to invalid IL or missing references)
//IL_0376: Unknown result type (might be due to invalid IL or missing references)
//IL_03bc: Unknown result type (might be due to invalid IL or missing references)
//IL_03c1: Unknown result type (might be due to invalid IL or missing references)
//IL_03c4: Expected O, but got Unknown
//IL_03c9: Expected O, but got Unknown
//IL_03c9: Unknown result type (might be due to invalid IL or missing references)
//IL_03db: Unknown result type (might be due to invalid IL or missing references)
//IL_03e8: Unknown result type (might be due to invalid IL or missing references)
//IL_03f2: Expected O, but got Unknown
//IL_03ed: Unknown result type (might be due to invalid IL or missing references)
//IL_03f7: Expected O, but got Unknown
//IL_03fc: Expected O, but got Unknown
//IL_0411: Unknown result type (might be due to invalid IL or missing references)
//IL_0416: Unknown result type (might be due to invalid IL or missing references)
//IL_0421: Unknown result type (might be due to invalid IL or missing references)
//IL_0426: Unknown result type (might be due to invalid IL or missing references)
//IL_046c: Unknown result type (might be due to invalid IL or missing references)
//IL_0471: Unknown result type (might be due to invalid IL or missing references)
//IL_0474: Expected O, but got Unknown
//IL_0479: Expected O, but got Unknown
//IL_0479: Unknown result type (might be due to invalid IL or missing references)
//IL_048b: Unknown result type (might be due to invalid IL or missing references)
//IL_0498: Unknown result type (might be due to invalid IL or missing references)
//IL_04a2: Expected O, but got Unknown
//IL_049d: Unknown result type (might be due to invalid IL or missing references)
//IL_04a7: Expected O, but got Unknown
//IL_04ac: Expected O, but got Unknown
//IL_04b7: Unknown result type (might be due to invalid IL or missing references)
//IL_04bc: Unknown result type (might be due to invalid IL or missing references)
//IL_04ce: Unknown result type (might be due to invalid IL or missing references)
//IL_04d8: Expected O, but got Unknown
//IL_04d8: Unknown result type (might be due to invalid IL or missing references)
//IL_04e5: Unknown result type (might be due to invalid IL or missing references)
//IL_04ef: Expected O, but got Unknown
//IL_04ea: Unknown result type (might be due to invalid IL or missing references)
//IL_04f4: Expected O, but got Unknown
//IL_04f9: Expected O, but got Unknown
//IL_0514: Unknown result type (might be due to invalid IL or missing references)
//IL_0519: Unknown result type (might be due to invalid IL or missing references)
//IL_0524: Unknown result type (might be due to invalid IL or missing references)
//IL_0529: Unknown result type (might be due to invalid IL or missing references)
//IL_057a: Unknown result type (might be due to invalid IL or missing references)
//IL_057f: Unknown result type (might be due to invalid IL or missing references)
//IL_0582: Expected O, but got Unknown
//IL_0587: Expected O, but got Unknown
//IL_0587: Unknown result type (might be due to invalid IL or missing references)
//IL_0599: Unknown result type (might be due to invalid IL or missing references)
//IL_05a8: Unknown result type (might be due to invalid IL or missing references)
//IL_05b2: Expected O, but got Unknown
//IL_05ad: Unknown result type (might be due to invalid IL or missing references)
//IL_05b7: Expected O, but got Unknown
//IL_05bc: Expected O, but got Unknown
//IL_05d5: Unknown result type (might be due to invalid IL or missing references)
//IL_05da: Unknown result type (might be due to invalid IL or missing references)
//IL_05ec: Unknown result type (might be due to invalid IL or missing references)
//IL_05f6: Expected O, but got Unknown
//IL_05f6: Unknown result type (might be due to invalid IL or missing references)
//IL_0605: Unknown result type (might be due to invalid IL or missing references)
//IL_060f: Expected O, but got Unknown
//IL_060a: Unknown result type (might be due to invalid IL or missing references)
//IL_0614: Expected O, but got Unknown
//IL_0619: Expected O, but got Unknown
//IL_0653: Unknown result type (might be due to invalid IL or missing references)
//IL_0669: Unknown result type (might be due to invalid IL or missing references)
//IL_06f1: Unknown result type (might be due to invalid IL or missing references)
//IL_0757: Unknown result type (might be due to invalid IL or missing references)
//IL_075c: Unknown result type (might be due to invalid IL or missing references)
//IL_076e: Unknown result type (might be due to invalid IL or missing references)
//IL_0778: Expected O, but got Unknown
//IL_0778: Unknown result type (might be due to invalid IL or missing references)
//IL_0787: Unknown result type (might be due to invalid IL or missing references)
//IL_0791: Expected O, but got Unknown
//IL_078c: Unknown result type (might be due to invalid IL or missing references)
//IL_0796: Expected O, but got Unknown
//IL_079b: Expected O, but got Unknown
//IL_07fe: Unknown result type (might be due to invalid IL or missing references)
//IL_0803: Unknown result type (might be due to invalid IL or missing references)
//IL_0815: Unknown result type (might be due to invalid IL or missing references)
//IL_081f: Expected O, but got Unknown
//IL_081f: Unknown result type (might be due to invalid IL or missing references)
//IL_082e: Unknown result type (might be due to invalid IL or missing references)
//IL_0838: Expected O, but got Unknown
//IL_0833: Unknown result type (might be due to invalid IL or missing references)
//IL_083d: Expected O, but got Unknown
//IL_0842: Expected O, but got Unknown
//IL_08fd: Unknown result type (might be due to invalid IL or missing references)
//IL_0902: Unknown result type (might be due to invalid IL or missing references)
//IL_0914: Unknown result type (might be due to invalid IL or missing references)
//IL_091e: Expected O, but got Unknown
//IL_091e: Unknown result type (might be due to invalid IL or missing references)
//IL_092d: Unknown result type (might be due to invalid IL or missing references)
//IL_0937: Expected O, but got Unknown
//IL_0932: Unknown result type (might be due to invalid IL or missing references)
//IL_093c: Expected O, but got Unknown
//IL_0941: Expected O, but got Unknown
//IL_09f1: Unknown result type (might be due to invalid IL or missing references)
//IL_09f6: Unknown result type (might be due to invalid IL or missing references)
//IL_0a08: Unknown result type (might be due to invalid IL or missing references)
//IL_0a12: Expected O, but got Unknown
//IL_0a12: Unknown result type (might be due to invalid IL or missing references)
//IL_0a21: Unknown result type (might be due to invalid IL or missing references)
//IL_0a2b: Expected O, but got Unknown
//IL_0a26: Unknown result type (might be due to invalid IL or missing references)
//IL_0a30: Expected O, but got Unknown
//IL_0a35: Expected O, but got Unknown
//IL_0ae5: Unknown result type (might be due to invalid IL or missing references)
//IL_0aea: Unknown result type (might be due to invalid IL or missing references)
//IL_0afc: Unknown result type (might be due to invalid IL or missing references)
//IL_0b06: Expected O, but got Unknown
//IL_0b06: Unknown result type (might be due to invalid IL or missing references)
//IL_0b15: Unknown result type (might be due to invalid IL or missing references)
//IL_0b1f: Expected O, but got Unknown
//IL_0b1a: Unknown result type (might be due to invalid IL or missing references)
//IL_0b24: Expected O, but got Unknown
//IL_0b29: Expected O, but got Unknown
//IL_0bd9: Unknown result type (might be due to invalid IL or missing references)
//IL_0bde: Unknown result type (might be due to invalid IL or missing references)
//IL_0bf0: Unknown result type (might be due to invalid IL or missing references)
//IL_0bfa: Expected O, but got Unknown
//IL_0bfa: Unknown result type (might be due to invalid IL or missing references)
//IL_0c09: Unknown result type (might be due to invalid IL or missing references)
//IL_0c13: Expected O, but got Unknown
//IL_0c0e: Unknown result type (might be due to invalid IL or missing references)
//IL_0c18: Expected O, but got Unknown
//IL_0c1d: Expected O, but got Unknown
//IL_0ccd: Unknown result type (might be due to invalid IL or missing references)
//IL_0cd2: Unknown result type (might be due to invalid IL or missing references)
//IL_0ce4: Unknown result type (might be due to invalid IL or missing references)
//IL_0cee: Expected O, but got Unknown
//IL_0cee: Unknown result type (might be due to invalid IL or missing references)
//IL_0cfd: Unknown result type (might be due to invalid IL or missing references)
//IL_0d07: Expected O, but got Unknown
//IL_0d02: Unknown result type (might be due to invalid IL or missing references)
//IL_0d0c: Expected O, but got Unknown
//IL_0d11: Expected O, but got Unknown
//IL_0dc1: Unknown result type (might be due to invalid IL or missing references)
//IL_0dc6: Unknown result type (might be due to invalid IL or missing references)
//IL_0dd8: Unknown result type (might be due to invalid IL or missing references)
//IL_0de2: Expected O, but got Unknown
//IL_0de2: Unknown result type (might be due to invalid IL or missing references)
//IL_0df1: Unknown result type (might be due to invalid IL or missing references)
//IL_0dfb: Expected O, but got Unknown
//IL_0df6: Unknown result type (might be due to invalid IL or missing references)
//IL_0e00: Expected O, but got Unknown
//IL_0e05: Expected O, but got Unknown
//IL_0eb5: Unknown result type (might be due to invalid IL or missing references)
//IL_0eba: Unknown result type (might be due to invalid IL or missing references)
//IL_0ecc: Unknown result type (might be due to invalid IL or missing references)
//IL_0ed6: Expected O, but got Unknown
//IL_0ed6: Unknown result type (might be due to invalid IL or missing references)
//IL_0ee5: Unknown result type (might be due to invalid IL or missing references)
//IL_0eef: Expected O, but got Unknown
//IL_0eea: Unknown result type (might be due to invalid IL or missing references)
//IL_0ef4: Expected O, but got Unknown
//IL_0ef9: Expected O, but got Unknown
//IL_0fa9: Unknown result type (might be due to invalid IL or missing references)
//IL_0fae: Unknown result type (might be due to invalid IL or missing references)
//IL_0fc0: Unknown result type (might be due to invalid IL or missing references)
//IL_0fca: Expected O, but got Unknown
//IL_0fca: Unknown result type (might be due to invalid IL or missing references)
//IL_0fd9: Unknown result type (might be due to invalid IL or missing references)
//IL_0fe3: Expected O, but got Unknown
//IL_0fde: Unknown result type (might be due to invalid IL or missing references)
//IL_0fe8: Expected O, but got Unknown
//IL_0fed: Expected O, but got Unknown
//IL_109d: Unknown result type (might be due to invalid IL or missing references)
//IL_10a2: Unknown result type (might be due to invalid IL or missing references)
//IL_10b4: Unknown result type (might be due to invalid IL or missing references)
//IL_10be: Expected O, but got Unknown
//IL_10be: Unknown result type (might be due to invalid IL or missing references)
//IL_10cd: Unknown result type (might be due to invalid IL or missing references)
//IL_10d7: Expected O, but got Unknown
//IL_10d2: Unknown result type (might be due to invalid IL or missing references)
//IL_10dc: Expected O, but got Unknown
//IL_10e1: Expected O, but got Unknown
//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
StaticResourceExtension val = new StaticResourceExtension();
StaticResourceExtension val2 = new StaticResourceExtension();
AppThemeBindingExtension val3 = new AppThemeBindingExtension();
StaticResourceExtension val4 = new StaticResourceExtension();
AppThemeBindingExtension val5 = new AppThemeBindingExtension();
Image val6 = new Image();
AppThemeBindingExtension val7 = new AppThemeBindingExtension();
Label val8 = new Label();
AppThemeBindingExtension val9 = new AppThemeBindingExtension();
Label val10 = new Label();
VerticalStackLayout val11 = new VerticalStackLayout();
HorizontalStackLayout val12 = new HorizontalStackLayout();
Grid val13 = new Grid();
AppThemeBindingExtension val14 = new AppThemeBindingExtension();
FontImageSource val15 = new FontImageSource();
DataTemplate val16 = new DataTemplate(typeof(HomePage));
ShellContent val17 = new ShellContent();
FlyoutItem val18 = new FlyoutItem();
AppThemeBindingExtension val19 = new AppThemeBindingExtension();
FontImageSource val20 = new FontImageSource();
DataTemplate val21 = new DataTemplate(typeof(ButtonsPage));
ShellContent val22 = new ShellContent();
FlyoutItem val23 = new FlyoutItem();
AppThemeBindingExtension val24 = new AppThemeBindingExtension();
FontImageSource val25 = new FontImageSource();
DataTemplate val26 = new DataTemplate(typeof(TextInputPage));
ShellContent val27 = new ShellContent();
FlyoutItem val28 = new FlyoutItem();
AppThemeBindingExtension val29 = new AppThemeBindingExtension();
FontImageSource val30 = new FontImageSource();
DataTemplate val31 = new DataTemplate(typeof(SelectionPage));
ShellContent val32 = new ShellContent();
FlyoutItem val33 = new FlyoutItem();
AppThemeBindingExtension val34 = new AppThemeBindingExtension();
FontImageSource val35 = new FontImageSource();
DataTemplate val36 = new DataTemplate(typeof(PickersPage));
ShellContent val37 = new ShellContent();
FlyoutItem val38 = new FlyoutItem();
AppThemeBindingExtension val39 = new AppThemeBindingExtension();
FontImageSource val40 = new FontImageSource();
DataTemplate val41 = new DataTemplate(typeof(ListsPage));
ShellContent val42 = new ShellContent();
FlyoutItem val43 = new FlyoutItem();
AppThemeBindingExtension val44 = new AppThemeBindingExtension();
FontImageSource val45 = new FontImageSource();
DataTemplate val46 = new DataTemplate(typeof(ProgressPage));
ShellContent val47 = new ShellContent();
FlyoutItem val48 = new FlyoutItem();
AppThemeBindingExtension val49 = new AppThemeBindingExtension();
FontImageSource val50 = new FontImageSource();
DataTemplate val51 = new DataTemplate(typeof(GridsPage));
ShellContent val52 = new ShellContent();
FlyoutItem val53 = new FlyoutItem();
AppThemeBindingExtension val54 = new AppThemeBindingExtension();
FontImageSource val55 = new FontImageSource();
DataTemplate val56 = new DataTemplate(typeof(AboutPage));
ShellContent val57 = new ShellContent();
FlyoutItem val58 = new FlyoutItem();
AppShell appShell;
NameScope val59 = (NameScope)(((object)NameScope.GetNameScope((BindableObject)(object)(appShell = this))) ?? ((object)new NameScope()));
NameScope.SetNameScope((BindableObject)(object)appShell, (INameScope)(object)val59);
((Element)val13).transientNamescope = (INameScope)(object)val59;
((Element)val12).transientNamescope = (INameScope)(object)val59;
((Element)val6).transientNamescope = (INameScope)(object)val59;
((Element)val11).transientNamescope = (INameScope)(object)val59;
((Element)val8).transientNamescope = (INameScope)(object)val59;
((Element)val10).transientNamescope = (INameScope)(object)val59;
((Element)val18).transientNamescope = (INameScope)(object)val59;
((Element)val15).transientNamescope = (INameScope)(object)val59;
((Element)val17).transientNamescope = (INameScope)(object)val59;
((Element)val23).transientNamescope = (INameScope)(object)val59;
((Element)val20).transientNamescope = (INameScope)(object)val59;
((Element)val22).transientNamescope = (INameScope)(object)val59;
((Element)val28).transientNamescope = (INameScope)(object)val59;
((Element)val25).transientNamescope = (INameScope)(object)val59;
((Element)val27).transientNamescope = (INameScope)(object)val59;
((Element)val33).transientNamescope = (INameScope)(object)val59;
((Element)val30).transientNamescope = (INameScope)(object)val59;
((Element)val32).transientNamescope = (INameScope)(object)val59;
((Element)val38).transientNamescope = (INameScope)(object)val59;
((Element)val35).transientNamescope = (INameScope)(object)val59;
((Element)val37).transientNamescope = (INameScope)(object)val59;
((Element)val43).transientNamescope = (INameScope)(object)val59;
((Element)val40).transientNamescope = (INameScope)(object)val59;
((Element)val42).transientNamescope = (INameScope)(object)val59;
((Element)val48).transientNamescope = (INameScope)(object)val59;
((Element)val45).transientNamescope = (INameScope)(object)val59;
((Element)val47).transientNamescope = (INameScope)(object)val59;
((Element)val53).transientNamescope = (INameScope)(object)val59;
((Element)val50).transientNamescope = (INameScope)(object)val59;
((Element)val52).transientNamescope = (INameScope)(object)val59;
((Element)val58).transientNamescope = (INameScope)(object)val59;
((Element)val55).transientNamescope = (INameScope)(object)val59;
((Element)val57).transientNamescope = (INameScope)(object)val59;
((BindableObject)appShell).SetValue(Page.TitleProperty, (object)"OpenMaui Controls Demo");
((BindableObject)appShell).SetValue(Shell.FlyoutBehaviorProperty, (object)(FlyoutBehavior)1);
val.Key = "FlyoutBackgroundLight";
StaticResourceExtension val60 = new StaticResourceExtension
{
Key = "FlyoutBackgroundLight"
};
XamlServiceProvider val61 = new XamlServiceProvider();
Type? typeFromHandle = typeof(IProvideValueTarget);
object[] array = new object[0 + 2];
array[0] = val3;
array[1] = appShell;
SimpleValueTargetProvider val62 = new SimpleValueTargetProvider(array, (object)typeof(AppThemeBindingExtension).GetRuntimeProperty("Light"), (INameScope[])(object)new NameScope[3] { val59, val59, val59 }, false);
object obj = (object)val62;
val61.Add(typeFromHandle, (object)val62);
val61.Add(typeof(IReferenceProvider), obj);
val61.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(8, 8)));
object light = val60.ProvideValue((IServiceProvider)val61);
val3.Light = light;
val2.Key = "FlyoutBackgroundDark";
StaticResourceExtension val63 = new StaticResourceExtension
{
Key = "FlyoutBackgroundDark"
};
XamlServiceProvider val64 = new XamlServiceProvider();
Type? typeFromHandle2 = typeof(IProvideValueTarget);
object[] array2 = new object[0 + 2];
array2[0] = val3;
array2[1] = appShell;
SimpleValueTargetProvider val65 = new SimpleValueTargetProvider(array2, (object)typeof(AppThemeBindingExtension).GetRuntimeProperty("Dark"), (INameScope[])(object)new NameScope[3] { val59, val59, val59 }, false);
object obj2 = (object)val65;
val64.Add(typeFromHandle2, (object)val65);
val64.Add(typeof(IReferenceProvider), obj2);
val64.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(8, 8)));
object dark = val63.ProvideValue((IServiceProvider)val64);
val3.Dark = dark;
XamlServiceProvider val66 = new XamlServiceProvider();
val66.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)appShell, (object)Shell.FlyoutBackgroundColorProperty));
val66.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(8, 8)));
BindingBase val67 = ((IMarkupExtension<BindingBase>)(object)val3).ProvideValue((IServiceProvider)val66);
((BindableObject)appShell).SetBinding(Shell.FlyoutBackgroundColorProperty, val67);
val4.Key = "PrimaryColor";
StaticResourceExtension val68 = new StaticResourceExtension
{
Key = "PrimaryColor"
};
XamlServiceProvider val69 = new XamlServiceProvider();
Type? typeFromHandle3 = typeof(IProvideValueTarget);
object[] array3 = new object[0 + 3];
array3[0] = val5;
array3[1] = val13;
array3[2] = appShell;
SimpleValueTargetProvider val70 = new SimpleValueTargetProvider(array3, (object)typeof(AppThemeBindingExtension).GetRuntimeProperty("Light"), (INameScope[])(object)new NameScope[4] { val59, val59, val59, val59 }, false);
object obj3 = (object)val70;
val69.Add(typeFromHandle3, (object)val70);
val69.Add(typeof(IReferenceProvider), obj3);
val69.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(12, 15)));
object light2 = val68.ProvideValue((IServiceProvider)val69);
val5.Light = light2;
val5.Dark = "#1A1A2E";
XamlServiceProvider val71 = new XamlServiceProvider();
val71.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val13, (object)VisualElement.BackgroundColorProperty));
val71.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(12, 15)));
BindingBase val72 = ((IMarkupExtension<BindingBase>)(object)val5).ProvideValue((IServiceProvider)val71);
((BindableObject)val13).SetBinding(VisualElement.BackgroundColorProperty, val72);
((BindableObject)val13).SetValue(VisualElement.HeightRequestProperty, (object)140.0);
((BindableObject)val13).SetValue(Layout.PaddingProperty, (object)new Thickness(15.0));
((BindableObject)val12).SetValue(View.VerticalOptionsProperty, (object)LayoutOptions.Center);
((BindableObject)val12).SetValue(StackBase.SpacingProperty, (object)12.0);
((BindableObject)val6).SetValue(Image.SourceProperty, (object)ImageSource.FromFile("openmaui_logo.svg"));
((BindableObject)val6).SetValue(VisualElement.WidthRequestProperty, (object)60.0);
((BindableObject)val6).SetValue(VisualElement.HeightRequestProperty, (object)60.0);
((Layout)val12).Children.Add((IView)(object)val6);
((BindableObject)val11).SetValue(View.VerticalOptionsProperty, (object)LayoutOptions.Center);
((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";
XamlServiceProvider val73 = new XamlServiceProvider();
val73.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val8, (object)Label.TextColorProperty));
val73.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(23, 28)));
BindingBase val74 = ((IMarkupExtension<BindingBase>)(object)val7).ProvideValue((IServiceProvider)val73);
((BindableObject)val8).SetBinding(Label.TextColorProperty, val74);
((Layout)val11).Children.Add((IView)(object)val8);
((BindableObject)val10).SetValue(Label.TextProperty, (object)"Controls Demo");
((BindableObject)val10).SetValue(Label.FontSizeProperty, (object)13.0);
val9.Light = "White";
val9.Dark = "#B0B0B0";
XamlServiceProvider val75 = new XamlServiceProvider();
val75.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val10, (object)Label.TextColorProperty));
val75.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(26, 28)));
BindingBase val76 = ((IMarkupExtension<BindingBase>)(object)val9).ProvideValue((IServiceProvider)val75);
((BindableObject)val10).SetBinding(Label.TextColorProperty, val76);
((BindableObject)val10).SetValue(VisualElement.OpacityProperty, (object)0.9);
((Layout)val11).Children.Add((IView)(object)val10);
((Layout)val12).Children.Add((IView)(object)val11);
((Layout)val13).Children.Add((IView)(object)val12);
((BindableObject)appShell).SetValue(Shell.FlyoutHeaderProperty, (object)val13);
((BindableObject)val18).SetValue(BaseShellItem.TitleProperty, (object)"Home");
((BaseShellItem)val18).Route = "Home";
((BindableObject)val15).SetValue(FontImageSource.GlyphProperty, (object)"\ud83c\udfe0");
((BindableObject)val15).SetValue(FontImageSource.FontFamilyProperty, (object)"Default");
val14.Light = "#424242";
val14.Dark = "#E0E0E0";
XamlServiceProvider val77 = new XamlServiceProvider();
val77.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val15, (object)FontImageSource.ColorProperty));
val77.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(36, 69)));
BindingBase val78 = ((IMarkupExtension<BindingBase>)(object)val14).ProvideValue((IServiceProvider)val77);
((BindableObject)val15).SetBinding(FontImageSource.ColorProperty, val78);
((BindableObject)val18).SetValue(BaseShellItem.IconProperty, (object)val15);
((BindableObject)val17).SetValue(ShellContent.ContentTemplateProperty, (object)val16);
((ICollection<ShellSection>)((BindableObject)val18).GetValue(ShellItem.ItemsProperty)).Add(ShellSection.op_Implicit(val17));
((ICollection<ShellItem>)((BindableObject)appShell).GetValue(Shell.ItemsProperty)).Add((ShellItem)(object)val18);
((BindableObject)val23).SetValue(BaseShellItem.TitleProperty, (object)"Buttons");
((BaseShellItem)val23).Route = "Buttons";
((BindableObject)val20).SetValue(FontImageSource.GlyphProperty, (object)"\ud83d\udc46");
((BindableObject)val20).SetValue(FontImageSource.FontFamilyProperty, (object)"Default");
val19.Light = "#424242";
val19.Dark = "#E0E0E0";
XamlServiceProvider val79 = new XamlServiceProvider();
val79.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val20, (object)FontImageSource.ColorProperty));
val79.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(44, 69)));
BindingBase val80 = ((IMarkupExtension<BindingBase>)(object)val19).ProvideValue((IServiceProvider)val79);
((BindableObject)val20).SetBinding(FontImageSource.ColorProperty, val80);
((BindableObject)val23).SetValue(BaseShellItem.IconProperty, (object)val20);
((BindableObject)val22).SetValue(ShellContent.ContentTemplateProperty, (object)val21);
((ICollection<ShellSection>)((BindableObject)val23).GetValue(ShellItem.ItemsProperty)).Add(ShellSection.op_Implicit(val22));
((ICollection<ShellItem>)((BindableObject)appShell).GetValue(Shell.ItemsProperty)).Add((ShellItem)(object)val23);
((BindableObject)val28).SetValue(BaseShellItem.TitleProperty, (object)"Text Input");
((BaseShellItem)val28).Route = "TextInput";
((BindableObject)val25).SetValue(FontImageSource.GlyphProperty, (object)"\ud83d\udcdd");
((BindableObject)val25).SetValue(FontImageSource.FontFamilyProperty, (object)"Default");
val24.Light = "#424242";
val24.Dark = "#E0E0E0";
XamlServiceProvider val81 = new XamlServiceProvider();
val81.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val25, (object)FontImageSource.ColorProperty));
val81.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(52, 69)));
BindingBase val82 = ((IMarkupExtension<BindingBase>)(object)val24).ProvideValue((IServiceProvider)val81);
((BindableObject)val25).SetBinding(FontImageSource.ColorProperty, val82);
((BindableObject)val28).SetValue(BaseShellItem.IconProperty, (object)val25);
((BindableObject)val27).SetValue(ShellContent.ContentTemplateProperty, (object)val26);
((ICollection<ShellSection>)((BindableObject)val28).GetValue(ShellItem.ItemsProperty)).Add(ShellSection.op_Implicit(val27));
((ICollection<ShellItem>)((BindableObject)appShell).GetValue(Shell.ItemsProperty)).Add((ShellItem)(object)val28);
((BindableObject)val33).SetValue(BaseShellItem.TitleProperty, (object)"Selection");
((BaseShellItem)val33).Route = "Selection";
((BindableObject)val30).SetValue(FontImageSource.GlyphProperty, (object)"☑");
((BindableObject)val30).SetValue(FontImageSource.FontFamilyProperty, (object)"Default");
val29.Light = "#424242";
val29.Dark = "#E0E0E0";
XamlServiceProvider val83 = new XamlServiceProvider();
val83.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val30, (object)FontImageSource.ColorProperty));
val83.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(60, 68)));
BindingBase val84 = ((IMarkupExtension<BindingBase>)(object)val29).ProvideValue((IServiceProvider)val83);
((BindableObject)val30).SetBinding(FontImageSource.ColorProperty, val84);
((BindableObject)val33).SetValue(BaseShellItem.IconProperty, (object)val30);
((BindableObject)val32).SetValue(ShellContent.ContentTemplateProperty, (object)val31);
((ICollection<ShellSection>)((BindableObject)val33).GetValue(ShellItem.ItemsProperty)).Add(ShellSection.op_Implicit(val32));
((ICollection<ShellItem>)((BindableObject)appShell).GetValue(Shell.ItemsProperty)).Add((ShellItem)(object)val33);
((BindableObject)val38).SetValue(BaseShellItem.TitleProperty, (object)"Pickers");
((BaseShellItem)val38).Route = "Pickers";
((BindableObject)val35).SetValue(FontImageSource.GlyphProperty, (object)"\ud83d\udcc5");
((BindableObject)val35).SetValue(FontImageSource.FontFamilyProperty, (object)"Default");
val34.Light = "#424242";
val34.Dark = "#E0E0E0";
XamlServiceProvider val85 = new XamlServiceProvider();
val85.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val35, (object)FontImageSource.ColorProperty));
val85.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(68, 69)));
BindingBase val86 = ((IMarkupExtension<BindingBase>)(object)val34).ProvideValue((IServiceProvider)val85);
((BindableObject)val35).SetBinding(FontImageSource.ColorProperty, val86);
((BindableObject)val38).SetValue(BaseShellItem.IconProperty, (object)val35);
((BindableObject)val37).SetValue(ShellContent.ContentTemplateProperty, (object)val36);
((ICollection<ShellSection>)((BindableObject)val38).GetValue(ShellItem.ItemsProperty)).Add(ShellSection.op_Implicit(val37));
((ICollection<ShellItem>)((BindableObject)appShell).GetValue(Shell.ItemsProperty)).Add((ShellItem)(object)val38);
((BindableObject)val43).SetValue(BaseShellItem.TitleProperty, (object)"Lists");
((BaseShellItem)val43).Route = "Lists";
((BindableObject)val40).SetValue(FontImageSource.GlyphProperty, (object)"\ud83d\udccb");
((BindableObject)val40).SetValue(FontImageSource.FontFamilyProperty, (object)"Default");
val39.Light = "#424242";
val39.Dark = "#E0E0E0";
XamlServiceProvider val87 = new XamlServiceProvider();
val87.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val40, (object)FontImageSource.ColorProperty));
val87.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(76, 69)));
BindingBase val88 = ((IMarkupExtension<BindingBase>)(object)val39).ProvideValue((IServiceProvider)val87);
((BindableObject)val40).SetBinding(FontImageSource.ColorProperty, val88);
((BindableObject)val43).SetValue(BaseShellItem.IconProperty, (object)val40);
((BindableObject)val42).SetValue(ShellContent.ContentTemplateProperty, (object)val41);
((ICollection<ShellSection>)((BindableObject)val43).GetValue(ShellItem.ItemsProperty)).Add(ShellSection.op_Implicit(val42));
((ICollection<ShellItem>)((BindableObject)appShell).GetValue(Shell.ItemsProperty)).Add((ShellItem)(object)val43);
((BindableObject)val48).SetValue(BaseShellItem.TitleProperty, (object)"Progress");
((BaseShellItem)val48).Route = "Progress";
((BindableObject)val45).SetValue(FontImageSource.GlyphProperty, (object)"⏳");
((BindableObject)val45).SetValue(FontImageSource.FontFamilyProperty, (object)"Default");
val44.Light = "#424242";
val44.Dark = "#E0E0E0";
XamlServiceProvider val89 = new XamlServiceProvider();
val89.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val45, (object)FontImageSource.ColorProperty));
val89.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(84, 68)));
BindingBase val90 = ((IMarkupExtension<BindingBase>)(object)val44).ProvideValue((IServiceProvider)val89);
((BindableObject)val45).SetBinding(FontImageSource.ColorProperty, val90);
((BindableObject)val48).SetValue(BaseShellItem.IconProperty, (object)val45);
((BindableObject)val47).SetValue(ShellContent.ContentTemplateProperty, (object)val46);
((ICollection<ShellSection>)((BindableObject)val48).GetValue(ShellItem.ItemsProperty)).Add(ShellSection.op_Implicit(val47));
((ICollection<ShellItem>)((BindableObject)appShell).GetValue(Shell.ItemsProperty)).Add((ShellItem)(object)val48);
((BindableObject)val53).SetValue(BaseShellItem.TitleProperty, (object)"Grids");
((BaseShellItem)val53).Route = "Grids";
((BindableObject)val50).SetValue(FontImageSource.GlyphProperty, (object)"\ud83d\udcca");
((BindableObject)val50).SetValue(FontImageSource.FontFamilyProperty, (object)"Default");
val49.Light = "#424242";
val49.Dark = "#E0E0E0";
XamlServiceProvider val91 = new XamlServiceProvider();
val91.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val50, (object)FontImageSource.ColorProperty));
val91.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(92, 69)));
BindingBase val92 = ((IMarkupExtension<BindingBase>)(object)val49).ProvideValue((IServiceProvider)val91);
((BindableObject)val50).SetBinding(FontImageSource.ColorProperty, val92);
((BindableObject)val53).SetValue(BaseShellItem.IconProperty, (object)val50);
((BindableObject)val52).SetValue(ShellContent.ContentTemplateProperty, (object)val51);
((ICollection<ShellSection>)((BindableObject)val53).GetValue(ShellItem.ItemsProperty)).Add(ShellSection.op_Implicit(val52));
((ICollection<ShellItem>)((BindableObject)appShell).GetValue(Shell.ItemsProperty)).Add((ShellItem)(object)val53);
((BindableObject)val58).SetValue(BaseShellItem.TitleProperty, (object)"About");
((BaseShellItem)val58).Route = "About";
((BindableObject)val55).SetValue(FontImageSource.GlyphProperty, (object)"");
((BindableObject)val55).SetValue(FontImageSource.FontFamilyProperty, (object)"Default");
val54.Light = "#424242";
val54.Dark = "#E0E0E0";
XamlServiceProvider val93 = new XamlServiceProvider();
val93.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val55, (object)FontImageSource.ColorProperty));
val93.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(100, 68)));
BindingBase val94 = ((IMarkupExtension<BindingBase>)(object)val54).ProvideValue((IServiceProvider)val93);
((BindableObject)val55).SetBinding(FontImageSource.ColorProperty, val94);
((BindableObject)val58).SetValue(BaseShellItem.IconProperty, (object)val55);
((BindableObject)val57).SetValue(ShellContent.ContentTemplateProperty, (object)val56);
((ICollection<ShellSection>)((BindableObject)val58).GetValue(ShellItem.ItemsProperty)).Add(ShellSection.op_Implicit(val57));
((ICollection<ShellItem>)((BindableObject)appShell).GetValue(Shell.ItemsProperty)).Add((ShellItem)(object)val58);
}
}

100
ShellDemo/AppShell.xaml Normal file
View File

@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="utf-8" ?>
<Shell xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:ShellDemo"
x:Class="ShellDemo.AppShell"
Title="OpenMaui Controls Demo"
FlyoutBehavior="Flyout"
FlyoutBackgroundColor="{AppThemeBinding Light={StaticResource FlyoutBackgroundLight}, Dark={StaticResource FlyoutBackgroundDark}}"
Shell.BackgroundColor="{AppThemeBinding Light={StaticResource ShellBackgroundLight}, Dark={StaticResource ShellBackgroundDark}}"
Shell.ForegroundColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}"
Shell.TitleColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}">
<!-- Flyout Header -->
<Shell.FlyoutHeader>
<Grid BackgroundColor="{AppThemeBinding Light={StaticResource FlyoutHeaderBackgroundLight}, Dark={StaticResource FlyoutHeaderBackgroundDark}}"
HeightRequest="140"
Padding="15">
<HorizontalStackLayout VerticalOptions="Center" Spacing="12">
<Border WidthRequest="60"
HeightRequest="60"
StrokeThickness="0"
BackgroundColor="{AppThemeBinding Light=White, Dark=#2C2C2C}">
<Border.StrokeShape>
<RoundRectangle CornerRadius="30" />
</Border.StrokeShape>
<Label Text="OM"
FontSize="24"
FontAttributes="Bold"
TextColor="{StaticResource PrimaryColor}"
HorizontalOptions="Center"
VerticalOptions="Center" />
</Border>
<VerticalStackLayout VerticalOptions="Center">
<Label Text="OpenMaui"
FontSize="22"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light=White, Dark=#E0E0E0}" />
<Label Text="Controls Demo"
FontSize="13"
TextColor="{AppThemeBinding Light=#E0E0E0, Dark=#B0B0B0}" />
</VerticalStackLayout>
</HorizontalStackLayout>
</Grid>
</Shell.FlyoutHeader>
<!-- Home -->
<FlyoutItem Title="Home" Route="Home"
Icon="{AppThemeBinding Light=home_light.svg, Dark=home_dark.svg}">
<ShellContent ContentTemplate="{DataTemplate local:HomePage}" />
</FlyoutItem>
<!-- Buttons -->
<FlyoutItem Title="Buttons" Route="Buttons"
Icon="{AppThemeBinding Light=smart_button_light.svg, Dark=smart_button_dark.svg}">
<ShellContent ContentTemplate="{DataTemplate local:ButtonsPage}" />
</FlyoutItem>
<!-- Text Input -->
<FlyoutItem Title="Text Input" Route="TextInput"
Icon="{AppThemeBinding Light=edit_note_light.svg, Dark=edit_note_dark.svg}">
<ShellContent ContentTemplate="{DataTemplate local:TextInputPage}" />
</FlyoutItem>
<!-- Selection -->
<FlyoutItem Title="Selection" Route="Selection"
Icon="{AppThemeBinding Light=check_box_light.svg, Dark=check_box_dark.svg}">
<ShellContent ContentTemplate="{DataTemplate local:SelectionPage}" />
</FlyoutItem>
<!-- Pickers -->
<FlyoutItem Title="Pickers" Route="Pickers"
Icon="{AppThemeBinding Light=calendar_month_light.svg, Dark=calendar_month_dark.svg}">
<ShellContent ContentTemplate="{DataTemplate local:PickersPage}" />
</FlyoutItem>
<!-- Lists -->
<FlyoutItem Title="Lists" Route="Lists"
Icon="{AppThemeBinding Light=format_list_bulleted_light.svg, Dark=format_list_bulleted_dark.svg}">
<ShellContent ContentTemplate="{DataTemplate local:ListsPage}" />
</FlyoutItem>
<!-- Progress -->
<FlyoutItem Title="Progress" Route="Progress"
Icon="{AppThemeBinding Light=hourglass_empty_light.svg, Dark=hourglass_empty_dark.svg}">
<ShellContent ContentTemplate="{DataTemplate local:ProgressPage}" />
</FlyoutItem>
<!-- Grids -->
<FlyoutItem Title="Grids" Route="Grids"
Icon="{AppThemeBinding Light=grid_view_light.svg, Dark=grid_view_dark.svg}">
<ShellContent ContentTemplate="{DataTemplate local:GridsPage}" />
</FlyoutItem>
<!-- About -->
<FlyoutItem Title="About" Route="About"
Icon="{AppThemeBinding Light=info_light.svg, Dark=info_dark.svg}">
<ShellContent ContentTemplate="{DataTemplate local:AboutPage}" />
</FlyoutItem>
</Shell>

View File

@@ -0,0 +1,16 @@
// AppShell - Shell navigation with flyout menu
using Microsoft.Maui.Controls;
namespace ShellDemo;
public partial class AppShell : Shell
{
public AppShell()
{
InitializeComponent();
// Register routes for push navigation (pages not in flyout)
Routing.RegisterRoute("detail", typeof(DetailPage));
}
}

View File

@@ -1,4 +1,6 @@
using Microsoft.Maui.Controls.Hosting;
// MauiProgram.cs - Shared MAUI app configuration
// Works across all platforms (iOS, Android, Windows, Linux)
using Microsoft.Maui.Hosting;
using Microsoft.Maui.Platform.Linux.Hosting;
@@ -6,11 +8,17 @@ namespace ShellDemo;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
MauiAppBuilder obj = MauiApp.CreateBuilder(true);
AppHostBuilderExtensions.UseMauiApp<App>(obj);
obj.UseLinux();
return obj.Build();
}
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
// Configure the app (shared across all platforms)
builder.UseMauiApp<App>();
// Add Linux platform support
// On other platforms, this would be iOS/Android/Windows specific
builder.UseLinux();
return builder.Build();
}
}

View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShellDemo.AboutPage"
Title="About"
BackgroundColor="{AppThemeBinding Light={StaticResource PageBackgroundLight}, Dark={StaticResource PageBackgroundDark}}">
<ScrollView>
<VerticalStackLayout Padding="20" Spacing="20">
<!-- Header -->
<Label Text="OpenMaui Linux"
FontSize="32"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light=#1A237E, Dark=#7986CB}"
HorizontalOptions="Center" />
<Label Text="Version 1.0.0"
FontSize="16"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}"
HorizontalOptions="Center" />
<BoxView Style="{StaticResource ThemedDivider}" />
<Label Text="OpenMaui Linux brings .NET MAUI to Linux desktops using SkiaSharp for rendering. It provides a native Linux experience while maintaining compatibility with MAUI's cross-platform API."
FontSize="14"
LineBreakMode="WordWrap"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- Info Cards -->
<Border Style="{StaticResource ThemedCard}">
<HorizontalStackLayout>
<Label Text="Platform:" FontAttributes="Bold" WidthRequest="100"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Label Text="Linux (X11/Wayland)"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
</HorizontalStackLayout>
</Border>
<Border Style="{StaticResource ThemedCard}">
<HorizontalStackLayout>
<Label Text="Rendering:" FontAttributes="Bold" WidthRequest="100"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Label Text="SkiaSharp"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
</HorizontalStackLayout>
</Border>
<Border Style="{StaticResource ThemedCard}">
<HorizontalStackLayout>
<Label Text="Framework:" FontAttributes="Bold" WidthRequest="100"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Label Text=".NET MAUI"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
</HorizontalStackLayout>
</Border>
<Border Style="{StaticResource ThemedCard}">
<HorizontalStackLayout>
<Label Text="License:" FontAttributes="Bold" WidthRequest="100"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Label Text="MIT License"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
</HorizontalStackLayout>
</Border>
<BoxView Style="{StaticResource ThemedDivider}" />
<!-- Features Section -->
<Label Text="Features"
FontSize="20"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<HorizontalStackLayout Spacing="10">
<Label Text="✓" TextColor="{StaticResource SuccessColor}" FontSize="16" />
<Label Text="Full XAML support with styles and resources" FontSize="14"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</HorizontalStackLayout>
<HorizontalStackLayout Spacing="10">
<Label Text="✓" TextColor="{StaticResource SuccessColor}" FontSize="16" />
<Label Text="Shell navigation with flyout menus" FontSize="14"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</HorizontalStackLayout>
<HorizontalStackLayout Spacing="10">
<Label Text="✓" TextColor="{StaticResource SuccessColor}" FontSize="16" />
<Label Text="All standard MAUI controls" FontSize="14"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</HorizontalStackLayout>
<HorizontalStackLayout Spacing="10">
<Label Text="✓" TextColor="{StaticResource SuccessColor}" FontSize="16" />
<Label Text="Data binding and MVVM" FontSize="14"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</HorizontalStackLayout>
<HorizontalStackLayout Spacing="10">
<Label Text="✓" TextColor="{StaticResource SuccessColor}" FontSize="16" />
<Label Text="Keyboard and mouse input" FontSize="14"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</HorizontalStackLayout>
<HorizontalStackLayout Spacing="10">
<Label Text="✓" TextColor="{StaticResource SuccessColor}" FontSize="16" />
<Label Text="High DPI support" FontSize="14"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</HorizontalStackLayout>
<BoxView Style="{StaticResource ThemedDivider}" />
<Label Text="https://github.com/pablotoledo/OpenMaui-Linux"
FontSize="12"
TextColor="{StaticResource PrimaryColor}"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ScrollView>
</ContentPage>

View File

@@ -0,0 +1,13 @@
// AboutPage - Information about OpenMaui Linux
using Microsoft.Maui.Controls;
namespace ShellDemo;
public partial class AboutPage : ContentPage
{
public AboutPage()
{
InitializeComponent();
}
}

View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,150 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShellDemo.ButtonsPage"
Title="Buttons Demo"
BackgroundColor="{AppThemeBinding Light={StaticResource PageBackgroundLight}, Dark={StaticResource PageBackgroundDark}}">
<Grid RowDefinitions="*,120">
<!-- Main Content -->
<ScrollView Grid.Row="0">
<VerticalStackLayout Padding="20" Spacing="20">
<Label Text="Button Styles &amp; Events"
FontSize="24"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- Basic Buttons Section -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="10">
<Label Text="Basic Buttons"
FontSize="16"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Button x:Name="DefaultButton"
Text="Default Button"
Clicked="OnDefaultButtonClicked" />
<Button x:Name="TextButton"
Text="Text Only"
BackgroundColor="Transparent"
TextColor="{StaticResource PrimaryColor}" />
</VerticalStackLayout>
</Border>
<!-- Styled Buttons Section -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="10">
<Label Text="Styled Buttons"
FontSize="16"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<HorizontalStackLayout Spacing="10">
<Button Text="Primary"
Style="{StaticResource PrimaryButton}"
Clicked="OnStyledButtonClicked" />
<Button Text="Success"
Style="{StaticResource SuccessButton}"
Clicked="OnStyledButtonClicked" />
<Button Text="Warning"
BackgroundColor="{StaticResource WarningColor}"
TextColor="White"
CornerRadius="5"
Clicked="OnStyledButtonClicked" />
<Button Text="Danger"
Style="{StaticResource DangerButton}"
Clicked="OnStyledButtonClicked" />
<Button Text="Purple"
BackgroundColor="{StaticResource PurpleColor}"
TextColor="White"
CornerRadius="5"
Clicked="OnStyledButtonClicked" />
</HorizontalStackLayout>
</VerticalStackLayout>
</Border>
<!-- Button States Section -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="10">
<Label Text="Button States"
FontSize="16"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Button x:Name="EnabledButton"
Text="Enabled Button"
IsEnabled="True"
Clicked="OnEnabledButtonClicked" />
<Button x:Name="DisabledButton"
Text="Disabled Button"
IsEnabled="False" />
<Button x:Name="ToggleButton"
Text="Toggle Above Button"
Style="{StaticResource SecondaryButton}"
Clicked="OnToggleButtonClicked" />
</VerticalStackLayout>
</Border>
<!-- Button Variations Section -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="10">
<Label Text="Button Variations"
FontSize="16"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Button Text="Wide Button"
HorizontalOptions="Fill"
BackgroundColor="#673AB7"
TextColor="White"
Clicked="OnVariationButtonClicked" />
<Button Text="Tall Button"
HeightRequest="60"
BackgroundColor="#009688"
TextColor="White"
Clicked="OnVariationButtonClicked" />
<HorizontalStackLayout>
<Button Text="Round"
WidthRequest="80"
HeightRequest="80"
CornerRadius="40"
BackgroundColor="#E91E63"
TextColor="White"
Clicked="OnVariationButtonClicked" />
</HorizontalStackLayout>
</VerticalStackLayout>
</Border>
</VerticalStackLayout>
</ScrollView>
<!-- Event Log Panel -->
<Border Grid.Row="1"
BackgroundColor="{AppThemeBinding Light=#F5F5F5, Dark=#2C2C2C}"
StrokeThickness="0"
Padding="10">
<VerticalStackLayout>
<Label Text="Event Log:"
FontSize="12"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<ScrollView HeightRequest="80">
<Label x:Name="EventLogLabel"
Text="Events will appear here..."
FontSize="11"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}"
LineBreakMode="WordWrap" />
</ScrollView>
</VerticalStackLayout>
</Border>
</Grid>
</ContentPage>

View File

@@ -0,0 +1,55 @@
// ButtonsPage - Comprehensive Button Control Demo
using Microsoft.Maui.Controls;
namespace ShellDemo;
public partial class ButtonsPage : ContentPage
{
private int _eventCount = 0;
public ButtonsPage()
{
InitializeComponent();
}
private void OnDefaultButtonClicked(object? sender, EventArgs e)
{
LogEvent("Default Button clicked");
}
private void OnStyledButtonClicked(object? sender, EventArgs e)
{
if (sender is Button btn)
{
LogEvent($"{btn.Text} button clicked");
}
}
private void OnEnabledButtonClicked(object? sender, EventArgs e)
{
LogEvent("Enabled button clicked");
}
private void OnToggleButtonClicked(object? sender, EventArgs e)
{
DisabledButton.IsEnabled = !DisabledButton.IsEnabled;
DisabledButton.Text = DisabledButton.IsEnabled ? "Now Enabled!" : "Disabled Button";
LogEvent($"Toggled button to: {(DisabledButton.IsEnabled ? "Enabled" : "Disabled")}");
}
private void OnVariationButtonClicked(object? sender, EventArgs e)
{
if (sender is Button btn)
{
LogEvent($"{btn.Text} button clicked");
}
}
private void LogEvent(string message)
{
_eventCount++;
var timestamp = DateTime.Now.ToString("HH:mm:ss");
EventLogLabel.Text = $"[{timestamp}] {_eventCount}. {message}\n{EventLogLabel.Text}";
}
}

View File

@@ -1,203 +0,0 @@
// ControlsPage - Demonstrates various MAUI controls
using Microsoft.Maui.Controls;
using Microsoft.Maui.Graphics;
namespace ShellDemo;
public class ControlsPage : ContentPage
{
public ControlsPage()
{
Title = "Controls";
Content = new ScrollView
{
Content = new VerticalStackLayout
{
Padding = new Thickness(20),
Spacing = 15,
Children =
{
new Label
{
Text = "Control Gallery",
FontSize = 24,
FontAttributes = FontAttributes.Bold
},
// Buttons
CreateSection("Buttons", new View[]
{
CreateButtonRow()
}),
// CheckBox & Switch
CreateSection("Selection", new View[]
{
CreateCheckBoxRow(),
CreateSwitchRow()
}),
// Slider
CreateSection("Slider", new View[]
{
CreateSliderRow()
}),
// Picker
CreateSection("Picker", new View[]
{
CreatePickerRow()
}),
// Progress
CreateSection("Progress", new View[]
{
CreateProgressRow()
})
}
}
};
}
private Frame CreateSection(string title, View[] content)
{
var layout = new VerticalStackLayout { Spacing = 10 };
layout.Children.Add(new Label
{
Text = title,
FontSize = 18,
FontAttributes = FontAttributes.Bold
});
foreach (var view in content)
{
layout.Children.Add(view);
}
return new Frame
{
CornerRadius = 8,
Padding = new Thickness(15),
BackgroundColor = Colors.White,
Content = layout
};
}
private View CreateButtonRow()
{
var resultLabel = new Label { TextColor = Colors.Gray, FontSize = 12 };
var layout = new VerticalStackLayout { Spacing = 10 };
var buttonRow = new HorizontalStackLayout { Spacing = 10 };
var primaryBtn = new Button { Text = "Primary", BackgroundColor = Color.FromArgb("#2196F3"), TextColor = Colors.White };
primaryBtn.Clicked += (s, e) => resultLabel.Text = "Primary clicked!";
var successBtn = new Button { Text = "Success", BackgroundColor = Color.FromArgb("#4CAF50"), TextColor = Colors.White };
successBtn.Clicked += (s, e) => resultLabel.Text = "Success clicked!";
var dangerBtn = new Button { Text = "Danger", BackgroundColor = Color.FromArgb("#F44336"), TextColor = Colors.White };
dangerBtn.Clicked += (s, e) => resultLabel.Text = "Danger clicked!";
buttonRow.Children.Add(primaryBtn);
buttonRow.Children.Add(successBtn);
buttonRow.Children.Add(dangerBtn);
layout.Children.Add(buttonRow);
layout.Children.Add(resultLabel);
return layout;
}
private View CreateCheckBoxRow()
{
var layout = new HorizontalStackLayout { Spacing = 20 };
var cb1 = new CheckBox { IsChecked = true };
var cb2 = new CheckBox { IsChecked = false };
layout.Children.Add(cb1);
layout.Children.Add(new Label { Text = "Option 1", VerticalOptions = LayoutOptions.Center });
layout.Children.Add(cb2);
layout.Children.Add(new Label { Text = "Option 2", VerticalOptions = LayoutOptions.Center });
return layout;
}
private View CreateSwitchRow()
{
var label = new Label { Text = "Off", VerticalOptions = LayoutOptions.Center };
var sw = new Switch { IsToggled = false };
sw.Toggled += (s, e) => label.Text = e.Value ? "On" : "Off";
return new HorizontalStackLayout
{
Spacing = 10,
Children = { sw, label }
};
}
private View CreateSliderRow()
{
var label = new Label { Text = "Value: 50" };
var slider = new Slider { Minimum = 0, Maximum = 100, Value = 50 };
slider.ValueChanged += (s, e) => label.Text = $"Value: {(int)e.NewValue}";
return new VerticalStackLayout
{
Spacing = 5,
Children = { slider, label }
};
}
private View CreatePickerRow()
{
var label = new Label { Text = "Selected: (none)", TextColor = Colors.Gray };
var picker = new Picker { Title = "Select a fruit" };
picker.Items.Add("Apple");
picker.Items.Add("Banana");
picker.Items.Add("Cherry");
picker.Items.Add("Date");
picker.Items.Add("Elderberry");
picker.SelectedIndexChanged += (s, e) =>
{
if (picker.SelectedIndex >= 0)
label.Text = $"Selected: {picker.Items[picker.SelectedIndex]}";
};
return new VerticalStackLayout
{
Spacing = 5,
Children = { picker, label }
};
}
private View CreateProgressRow()
{
var progress = new ProgressBar { Progress = 0.7 };
var activity = new ActivityIndicator { IsRunning = true };
return new VerticalStackLayout
{
Spacing = 10,
Children =
{
progress,
new Label { Text = "70% Complete", FontSize = 12, TextColor = Colors.Gray },
new HorizontalStackLayout
{
Spacing = 10,
Children =
{
activity,
new Label { Text = "Loading...", VerticalOptions = LayoutOptions.Center, TextColor = Colors.Gray }
}
}
}
};
}
}

View File

@@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShellDemo.ControlsPage"
Title="Controls"
BackgroundColor="{AppThemeBinding Light={StaticResource PageBackgroundLight}, Dark={StaticResource PageBackgroundDark}}">
<ScrollView>
<VerticalStackLayout Padding="20" Spacing="15">
<Label Text="Control Gallery"
FontSize="24"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- Buttons Section -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="10">
<Label Text="Buttons"
FontSize="18"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<HorizontalStackLayout Spacing="10">
<Button Text="Primary"
Style="{StaticResource PrimaryButton}"
Clicked="OnButtonClicked" />
<Button Text="Success"
Style="{StaticResource SuccessButton}"
Clicked="OnButtonClicked" />
<Button Text="Danger"
Style="{StaticResource DangerButton}"
Clicked="OnButtonClicked" />
</HorizontalStackLayout>
<Label x:Name="ButtonResultLabel"
FontSize="12"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
</VerticalStackLayout>
</Border>
<!-- Selection Section -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="10">
<Label Text="Selection"
FontSize="18"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- CheckBox Row -->
<HorizontalStackLayout Spacing="20">
<CheckBox x:Name="Checkbox1" IsChecked="True" />
<Label Text="Option 1" VerticalOptions="Center"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<CheckBox x:Name="Checkbox2" IsChecked="False" />
<Label Text="Option 2" VerticalOptions="Center"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</HorizontalStackLayout>
<!-- Switch Row -->
<HorizontalStackLayout Spacing="10">
<Switch x:Name="MainSwitch" IsToggled="False" Toggled="OnSwitchToggled" />
<Label x:Name="SwitchLabel" Text="Off" VerticalOptions="Center"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</HorizontalStackLayout>
</VerticalStackLayout>
</Border>
<!-- Slider Section -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="10">
<Label Text="Slider"
FontSize="18"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Slider x:Name="MainSlider" Minimum="0" Maximum="100" Value="50" ValueChanged="OnSliderValueChanged" />
<Label x:Name="SliderLabel" Text="Value: 50"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</VerticalStackLayout>
</Border>
<!-- Picker Section -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="10">
<Label Text="Picker"
FontSize="18"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Picker x:Name="MainPicker"
Title="Select a fruit"
SelectedIndexChanged="OnPickerSelectedIndexChanged">
<Picker.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>Apple</x:String>
<x:String>Banana</x:String>
<x:String>Cherry</x:String>
<x:String>Date</x:String>
<x:String>Elderberry</x:String>
</x:Array>
</Picker.ItemsSource>
</Picker>
<Label x:Name="PickerLabel" Text="Selected: (none)"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
</VerticalStackLayout>
</Border>
<!-- Progress Section -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="10">
<Label Text="Progress"
FontSize="18"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<ProgressBar Progress="0.7" ProgressColor="{StaticResource PrimaryColor}" />
<Label Text="70% Complete"
FontSize="12"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<HorizontalStackLayout Spacing="10">
<ActivityIndicator IsRunning="True" Color="{StaticResource PrimaryColor}" />
<Label Text="Loading..." VerticalOptions="Center"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
</HorizontalStackLayout>
</VerticalStackLayout>
</Border>
</VerticalStackLayout>
</ScrollView>
</ContentPage>

View File

@@ -0,0 +1,39 @@
// ControlsPage - Demonstrates various MAUI controls
using Microsoft.Maui.Controls;
namespace ShellDemo;
public partial class ControlsPage : ContentPage
{
public ControlsPage()
{
InitializeComponent();
}
private void OnButtonClicked(object? sender, EventArgs e)
{
if (sender is Button btn)
{
ButtonResultLabel.Text = $"{btn.Text} clicked!";
}
}
private void OnSwitchToggled(object? sender, ToggledEventArgs e)
{
SwitchLabel.Text = e.Value ? "On" : "Off";
}
private void OnSliderValueChanged(object? sender, ValueChangedEventArgs e)
{
SliderLabel.Text = $"Value: {(int)e.NewValue}";
}
private void OnPickerSelectedIndexChanged(object? sender, EventArgs e)
{
if (MainPicker.SelectedIndex >= 0)
{
PickerLabel.Text = $"Selected: {MainPicker.ItemsSource[MainPicker.SelectedIndex]}";
}
}
}

View File

@@ -1,848 +0,0 @@
using System;
using System.CodeDom.Compiler;
using System.Reflection;
using System.Xml;
using Microsoft.Maui;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Compatibility;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;
using Microsoft.Maui.Controls.Xaml.Internals;
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Platform.Linux.Hosting;
namespace ShellDemo;
[XamlFilePath("Pages/DetailPage.xaml")]
public class DetailPage : ContentPage
{
public DetailPage()
{
InitializeComponent();
}
private void OnGoBackClicked(object? sender, EventArgs e)
{
Console.WriteLine("[DetailPage] Go Back clicked");
LinuxViewRenderer.PopPage();
}
[GeneratedCode("Microsoft.Maui.Controls.SourceGen", "1.0.0.0")]
private void InitializeComponent()
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Expected O, but got Unknown
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Expected O, but got Unknown
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: Expected O, but got Unknown
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_0019: Expected O, but got Unknown
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Expected O, but got Unknown
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Expected O, but got Unknown
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Expected O, but got Unknown
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Expected O, but got Unknown
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Expected O, but got Unknown
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Expected O, but got Unknown
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Expected O, but got Unknown
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Expected O, but got Unknown
//IL_0051: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Expected O, but got Unknown
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Expected O, but got Unknown
//IL_005f: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Expected O, but got Unknown
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_006d: Expected O, but got Unknown
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Expected O, but got Unknown
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_007b: Expected O, but got Unknown
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: Expected O, but got Unknown
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
//IL_0089: Expected O, but got Unknown
//IL_0089: Unknown result type (might be due to invalid IL or missing references)
//IL_0090: Expected O, but got Unknown
//IL_0090: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Expected O, but got Unknown
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_009e: Expected O, but got Unknown
//IL_009e: Unknown result type (might be due to invalid IL or missing references)
//IL_00a5: Expected O, but got Unknown
//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ac: Expected O, but got Unknown
//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: Expected O, but got Unknown
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00ba: Expected O, but got Unknown
//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: Expected O, but got Unknown
//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
//IL_00c8: Expected O, but got Unknown
//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
//IL_00cf: Expected O, but got Unknown
//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
//IL_00d6: Expected O, but got Unknown
//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
//IL_00dd: Expected O, but got Unknown
//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
//IL_00e4: Expected O, but got Unknown
//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
//IL_00eb: Expected O, but got Unknown
//IL_018f: Unknown result type (might be due to invalid IL or missing references)
//IL_0194: Unknown result type (might be due to invalid IL or missing references)
//IL_019f: Unknown result type (might be due to invalid IL or missing references)
//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
//IL_01f2: Expected O, but got Unknown
//IL_01f7: Expected O, but got Unknown
//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
//IL_0209: Unknown result type (might be due to invalid IL or missing references)
//IL_0217: Unknown result type (might be due to invalid IL or missing references)
//IL_0221: Expected O, but got Unknown
//IL_021c: Unknown result type (might be due to invalid IL or missing references)
//IL_0226: Expected O, but got Unknown
//IL_022b: Expected O, but got Unknown
//IL_0240: Unknown result type (might be due to invalid IL or missing references)
//IL_0245: Unknown result type (might be due to invalid IL or missing references)
//IL_0250: Unknown result type (might be due to invalid IL or missing references)
//IL_0255: Unknown result type (might be due to invalid IL or missing references)
//IL_029b: Unknown result type (might be due to invalid IL or missing references)
//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
//IL_02a3: Expected O, but got Unknown
//IL_02a8: Expected O, but got Unknown
//IL_02a8: Unknown result type (might be due to invalid IL or missing references)
//IL_02ba: Unknown result type (might be due to invalid IL or missing references)
//IL_02c8: Unknown result type (might be due to invalid IL or missing references)
//IL_02d2: Expected O, but got Unknown
//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
//IL_02d7: Expected O, but got Unknown
//IL_02dc: Expected O, but got Unknown
//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
//IL_02ec: Unknown result type (might be due to invalid IL or missing references)
//IL_02fe: Unknown result type (might be due to invalid IL or missing references)
//IL_0308: Expected O, but got Unknown
//IL_0308: Unknown result type (might be due to invalid IL or missing references)
//IL_0316: Unknown result type (might be due to invalid IL or missing references)
//IL_0320: Expected O, but got Unknown
//IL_031b: Unknown result type (might be due to invalid IL or missing references)
//IL_0325: Expected O, but got Unknown
//IL_032a: Expected O, but got Unknown
//IL_034a: Unknown result type (might be due to invalid IL or missing references)
//IL_037a: Unknown result type (might be due to invalid IL or missing references)
//IL_03da: Unknown result type (might be due to invalid IL or missing references)
//IL_03f9: Unknown result type (might be due to invalid IL or missing references)
//IL_0423: Unknown result type (might be due to invalid IL or missing references)
//IL_042d: Expected O, but got Unknown
//IL_046c: Unknown result type (might be due to invalid IL or missing references)
//IL_0481: Unknown result type (might be due to invalid IL or missing references)
//IL_04ef: Unknown result type (might be due to invalid IL or missing references)
//IL_050a: Unknown result type (might be due to invalid IL or missing references)
//IL_050f: Unknown result type (might be due to invalid IL or missing references)
//IL_051a: Unknown result type (might be due to invalid IL or missing references)
//IL_051f: Unknown result type (might be due to invalid IL or missing references)
//IL_057a: Unknown result type (might be due to invalid IL or missing references)
//IL_057f: Unknown result type (might be due to invalid IL or missing references)
//IL_0582: Expected O, but got Unknown
//IL_0587: Expected O, but got Unknown
//IL_0587: Unknown result type (might be due to invalid IL or missing references)
//IL_0599: Unknown result type (might be due to invalid IL or missing references)
//IL_05a8: Unknown result type (might be due to invalid IL or missing references)
//IL_05b2: Expected O, but got Unknown
//IL_05ad: Unknown result type (might be due to invalid IL or missing references)
//IL_05b7: Expected O, but got Unknown
//IL_05bc: Expected O, but got Unknown
//IL_05d3: Unknown result type (might be due to invalid IL or missing references)
//IL_05d8: Unknown result type (might be due to invalid IL or missing references)
//IL_05e3: Unknown result type (might be due to invalid IL or missing references)
//IL_05e8: Unknown result type (might be due to invalid IL or missing references)
//IL_0643: Unknown result type (might be due to invalid IL or missing references)
//IL_0648: Unknown result type (might be due to invalid IL or missing references)
//IL_064b: Expected O, but got Unknown
//IL_0650: Expected O, but got Unknown
//IL_0650: Unknown result type (might be due to invalid IL or missing references)
//IL_0662: Unknown result type (might be due to invalid IL or missing references)
//IL_0671: Unknown result type (might be due to invalid IL or missing references)
//IL_067b: Expected O, but got Unknown
//IL_0676: Unknown result type (might be due to invalid IL or missing references)
//IL_0680: Expected O, but got Unknown
//IL_0685: Expected O, but got Unknown
//IL_0692: Unknown result type (might be due to invalid IL or missing references)
//IL_0697: Unknown result type (might be due to invalid IL or missing references)
//IL_06a9: Unknown result type (might be due to invalid IL or missing references)
//IL_06b3: Expected O, but got Unknown
//IL_06b3: Unknown result type (might be due to invalid IL or missing references)
//IL_06c2: Unknown result type (might be due to invalid IL or missing references)
//IL_06cc: Expected O, but got Unknown
//IL_06c7: Unknown result type (might be due to invalid IL or missing references)
//IL_06d1: Expected O, but got Unknown
//IL_06d6: Expected O, but got Unknown
//IL_0726: Unknown result type (might be due to invalid IL or missing references)
//IL_0753: Unknown result type (might be due to invalid IL or missing references)
//IL_0758: Unknown result type (might be due to invalid IL or missing references)
//IL_0763: Unknown result type (might be due to invalid IL or missing references)
//IL_0768: Unknown result type (might be due to invalid IL or missing references)
//IL_07c3: Unknown result type (might be due to invalid IL or missing references)
//IL_07c8: Unknown result type (might be due to invalid IL or missing references)
//IL_07cb: Expected O, but got Unknown
//IL_07d0: Expected O, but got Unknown
//IL_07d0: Unknown result type (might be due to invalid IL or missing references)
//IL_07e2: Unknown result type (might be due to invalid IL or missing references)
//IL_07f1: Unknown result type (might be due to invalid IL or missing references)
//IL_07fb: Expected O, but got Unknown
//IL_07f6: Unknown result type (might be due to invalid IL or missing references)
//IL_0800: Expected O, but got Unknown
//IL_0805: Expected O, but got Unknown
//IL_081c: Unknown result type (might be due to invalid IL or missing references)
//IL_0821: Unknown result type (might be due to invalid IL or missing references)
//IL_082c: Unknown result type (might be due to invalid IL or missing references)
//IL_0831: Unknown result type (might be due to invalid IL or missing references)
//IL_088c: Unknown result type (might be due to invalid IL or missing references)
//IL_0891: Unknown result type (might be due to invalid IL or missing references)
//IL_0894: Expected O, but got Unknown
//IL_0899: Expected O, but got Unknown
//IL_0899: Unknown result type (might be due to invalid IL or missing references)
//IL_08ab: Unknown result type (might be due to invalid IL or missing references)
//IL_08ba: Unknown result type (might be due to invalid IL or missing references)
//IL_08c4: Expected O, but got Unknown
//IL_08bf: Unknown result type (might be due to invalid IL or missing references)
//IL_08c9: Expected O, but got Unknown
//IL_08ce: Expected O, but got Unknown
//IL_08db: Unknown result type (might be due to invalid IL or missing references)
//IL_08e0: Unknown result type (might be due to invalid IL or missing references)
//IL_08f2: Unknown result type (might be due to invalid IL or missing references)
//IL_08fc: Expected O, but got Unknown
//IL_08fc: Unknown result type (might be due to invalid IL or missing references)
//IL_090b: Unknown result type (might be due to invalid IL or missing references)
//IL_0915: Expected O, but got Unknown
//IL_0910: Unknown result type (might be due to invalid IL or missing references)
//IL_091a: Expected O, but got Unknown
//IL_091f: Expected O, but got Unknown
//IL_0949: Unknown result type (might be due to invalid IL or missing references)
//IL_094e: Unknown result type (might be due to invalid IL or missing references)
//IL_0959: Unknown result type (might be due to invalid IL or missing references)
//IL_095e: Unknown result type (might be due to invalid IL or missing references)
//IL_09a0: Unknown result type (might be due to invalid IL or missing references)
//IL_09a5: Unknown result type (might be due to invalid IL or missing references)
//IL_09a8: Expected O, but got Unknown
//IL_09ad: Expected O, but got Unknown
//IL_09ad: Unknown result type (might be due to invalid IL or missing references)
//IL_09bf: Unknown result type (might be due to invalid IL or missing references)
//IL_09ce: Unknown result type (might be due to invalid IL or missing references)
//IL_09d8: Expected O, but got Unknown
//IL_09d3: Unknown result type (might be due to invalid IL or missing references)
//IL_09dd: Expected O, but got Unknown
//IL_09e2: Expected O, but got Unknown
//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
//IL_0a3a: Unknown result type (might be due to invalid IL or missing references)
//IL_0a62: Unknown result type (might be due to invalid IL or missing references)
//IL_0ad4: Unknown result type (might be due to invalid IL or missing references)
//IL_0ad9: Unknown result type (might be due to invalid IL or missing references)
//IL_0ae4: Unknown result type (might be due to invalid IL or missing references)
//IL_0ae9: Unknown result type (might be due to invalid IL or missing references)
//IL_0b58: Unknown result type (might be due to invalid IL or missing references)
//IL_0b5d: Unknown result type (might be due to invalid IL or missing references)
//IL_0b60: Expected O, but got Unknown
//IL_0b65: Expected O, but got Unknown
//IL_0b65: Unknown result type (might be due to invalid IL or missing references)
//IL_0b77: Unknown result type (might be due to invalid IL or missing references)
//IL_0b86: Unknown result type (might be due to invalid IL or missing references)
//IL_0b90: Expected O, but got Unknown
//IL_0b8b: Unknown result type (might be due to invalid IL or missing references)
//IL_0b95: Expected O, but got Unknown
//IL_0b9a: Expected O, but got Unknown
//IL_0bb1: Unknown result type (might be due to invalid IL or missing references)
//IL_0bb6: Unknown result type (might be due to invalid IL or missing references)
//IL_0bc1: Unknown result type (might be due to invalid IL or missing references)
//IL_0bc6: Unknown result type (might be due to invalid IL or missing references)
//IL_0c35: Unknown result type (might be due to invalid IL or missing references)
//IL_0c3a: Unknown result type (might be due to invalid IL or missing references)
//IL_0c3d: Expected O, but got Unknown
//IL_0c42: Expected O, but got Unknown
//IL_0c42: Unknown result type (might be due to invalid IL or missing references)
//IL_0c54: Unknown result type (might be due to invalid IL or missing references)
//IL_0c63: Unknown result type (might be due to invalid IL or missing references)
//IL_0c6d: Expected O, but got Unknown
//IL_0c68: Unknown result type (might be due to invalid IL or missing references)
//IL_0c72: Expected O, but got Unknown
//IL_0c77: Expected O, but got Unknown
//IL_0c84: Unknown result type (might be due to invalid IL or missing references)
//IL_0c89: Unknown result type (might be due to invalid IL or missing references)
//IL_0c9b: Unknown result type (might be due to invalid IL or missing references)
//IL_0ca5: Expected O, but got Unknown
//IL_0ca5: Unknown result type (might be due to invalid IL or missing references)
//IL_0cb4: Unknown result type (might be due to invalid IL or missing references)
//IL_0cbe: Expected O, but got Unknown
//IL_0cb9: Unknown result type (might be due to invalid IL or missing references)
//IL_0cc3: Expected O, but got Unknown
//IL_0cc8: Expected O, but got Unknown
//IL_0d1d: Unknown result type (might be due to invalid IL or missing references)
//IL_0d22: Unknown result type (might be due to invalid IL or missing references)
//IL_0d2d: Unknown result type (might be due to invalid IL or missing references)
//IL_0d32: Unknown result type (might be due to invalid IL or missing references)
//IL_0da1: Unknown result type (might be due to invalid IL or missing references)
//IL_0da6: Unknown result type (might be due to invalid IL or missing references)
//IL_0da9: Expected O, but got Unknown
//IL_0dae: Expected O, but got Unknown
//IL_0dae: Unknown result type (might be due to invalid IL or missing references)
//IL_0dc0: Unknown result type (might be due to invalid IL or missing references)
//IL_0dcf: Unknown result type (might be due to invalid IL or missing references)
//IL_0dd9: Expected O, but got Unknown
//IL_0dd4: Unknown result type (might be due to invalid IL or missing references)
//IL_0dde: Expected O, but got Unknown
//IL_0de3: Expected O, but got Unknown
//IL_0dfa: Unknown result type (might be due to invalid IL or missing references)
//IL_0dff: Unknown result type (might be due to invalid IL or missing references)
//IL_0e0a: Unknown result type (might be due to invalid IL or missing references)
//IL_0e0f: Unknown result type (might be due to invalid IL or missing references)
//IL_0e7e: Unknown result type (might be due to invalid IL or missing references)
//IL_0e83: Unknown result type (might be due to invalid IL or missing references)
//IL_0e86: Expected O, but got Unknown
//IL_0e8b: Expected O, but got Unknown
//IL_0e8b: Unknown result type (might be due to invalid IL or missing references)
//IL_0e9d: Unknown result type (might be due to invalid IL or missing references)
//IL_0eac: Unknown result type (might be due to invalid IL or missing references)
//IL_0eb6: Expected O, but got Unknown
//IL_0eb1: Unknown result type (might be due to invalid IL or missing references)
//IL_0ebb: Expected O, but got Unknown
//IL_0ec0: Expected O, but got Unknown
//IL_0ecd: Unknown result type (might be due to invalid IL or missing references)
//IL_0ed2: Unknown result type (might be due to invalid IL or missing references)
//IL_0ee4: Unknown result type (might be due to invalid IL or missing references)
//IL_0eee: Expected O, but got Unknown
//IL_0eee: Unknown result type (might be due to invalid IL or missing references)
//IL_0efd: Unknown result type (might be due to invalid IL or missing references)
//IL_0f07: Expected O, but got Unknown
//IL_0f02: Unknown result type (might be due to invalid IL or missing references)
//IL_0f0c: Expected O, but got Unknown
//IL_0f11: Expected O, but got Unknown
//IL_0f66: Unknown result type (might be due to invalid IL or missing references)
//IL_0f6b: Unknown result type (might be due to invalid IL or missing references)
//IL_0f76: Unknown result type (might be due to invalid IL or missing references)
//IL_0f7b: Unknown result type (might be due to invalid IL or missing references)
//IL_0fea: Unknown result type (might be due to invalid IL or missing references)
//IL_0fef: Unknown result type (might be due to invalid IL or missing references)
//IL_0ff2: Expected O, but got Unknown
//IL_0ff7: Expected O, but got Unknown
//IL_0ff7: Unknown result type (might be due to invalid IL or missing references)
//IL_1009: Unknown result type (might be due to invalid IL or missing references)
//IL_1018: Unknown result type (might be due to invalid IL or missing references)
//IL_1022: Expected O, but got Unknown
//IL_101d: Unknown result type (might be due to invalid IL or missing references)
//IL_1027: Expected O, but got Unknown
//IL_102c: Expected O, but got Unknown
//IL_1043: Unknown result type (might be due to invalid IL or missing references)
//IL_1048: Unknown result type (might be due to invalid IL or missing references)
//IL_1053: Unknown result type (might be due to invalid IL or missing references)
//IL_1058: Unknown result type (might be due to invalid IL or missing references)
//IL_10c7: Unknown result type (might be due to invalid IL or missing references)
//IL_10cc: Unknown result type (might be due to invalid IL or missing references)
//IL_10cf: Expected O, but got Unknown
//IL_10d4: Expected O, but got Unknown
//IL_10d4: Unknown result type (might be due to invalid IL or missing references)
//IL_10e6: Unknown result type (might be due to invalid IL or missing references)
//IL_10f5: Unknown result type (might be due to invalid IL or missing references)
//IL_10ff: Expected O, but got Unknown
//IL_10fa: Unknown result type (might be due to invalid IL or missing references)
//IL_1104: Expected O, but got Unknown
//IL_1109: Expected O, but got Unknown
//IL_1116: Unknown result type (might be due to invalid IL or missing references)
//IL_111b: Unknown result type (might be due to invalid IL or missing references)
//IL_112d: Unknown result type (might be due to invalid IL or missing references)
//IL_1137: Expected O, but got Unknown
//IL_1137: Unknown result type (might be due to invalid IL or missing references)
//IL_1146: Unknown result type (might be due to invalid IL or missing references)
//IL_1150: Expected O, but got Unknown
//IL_114b: Unknown result type (might be due to invalid IL or missing references)
//IL_1155: Expected O, but got Unknown
//IL_115a: Expected O, but got Unknown
//IL_11af: Unknown result type (might be due to invalid IL or missing references)
//IL_11b4: Unknown result type (might be due to invalid IL or missing references)
//IL_11bf: Unknown result type (might be due to invalid IL or missing references)
//IL_11c4: Unknown result type (might be due to invalid IL or missing references)
//IL_1233: Unknown result type (might be due to invalid IL or missing references)
//IL_1238: Unknown result type (might be due to invalid IL or missing references)
//IL_123b: Expected O, but got Unknown
//IL_1240: Expected O, but got Unknown
//IL_1240: Unknown result type (might be due to invalid IL or missing references)
//IL_1252: Unknown result type (might be due to invalid IL or missing references)
//IL_1261: Unknown result type (might be due to invalid IL or missing references)
//IL_126b: Expected O, but got Unknown
//IL_1266: Unknown result type (might be due to invalid IL or missing references)
//IL_1270: Expected O, but got Unknown
//IL_1275: Expected O, but got Unknown
//IL_128c: Unknown result type (might be due to invalid IL or missing references)
//IL_1291: Unknown result type (might be due to invalid IL or missing references)
//IL_129c: Unknown result type (might be due to invalid IL or missing references)
//IL_12a1: Unknown result type (might be due to invalid IL or missing references)
//IL_1310: Unknown result type (might be due to invalid IL or missing references)
//IL_1315: Unknown result type (might be due to invalid IL or missing references)
//IL_1318: Expected O, but got Unknown
//IL_131d: Expected O, but got Unknown
//IL_131d: Unknown result type (might be due to invalid IL or missing references)
//IL_132f: Unknown result type (might be due to invalid IL or missing references)
//IL_133e: Unknown result type (might be due to invalid IL or missing references)
//IL_1348: Expected O, but got Unknown
//IL_1343: Unknown result type (might be due to invalid IL or missing references)
//IL_134d: Expected O, but got Unknown
//IL_1352: Expected O, but got Unknown
//IL_135f: Unknown result type (might be due to invalid IL or missing references)
//IL_1364: Unknown result type (might be due to invalid IL or missing references)
//IL_1376: Unknown result type (might be due to invalid IL or missing references)
//IL_1380: Expected O, but got Unknown
//IL_1380: Unknown result type (might be due to invalid IL or missing references)
//IL_138f: Unknown result type (might be due to invalid IL or missing references)
//IL_1399: Expected O, but got Unknown
//IL_1394: Unknown result type (might be due to invalid IL or missing references)
//IL_139e: Expected O, but got Unknown
//IL_13a3: Expected O, but got Unknown
//IL_141d: Unknown result type (might be due to invalid IL or missing references)
//IL_1427: Expected O, but got Unknown
//IL_143f: Unknown result type (might be due to invalid IL or missing references)
//IL_1467: Unknown result type (might be due to invalid IL or missing references)
StaticResourceExtension val = new StaticResourceExtension();
StaticResourceExtension val2 = new StaticResourceExtension();
AppThemeBindingExtension val3 = new AppThemeBindingExtension();
Label val4 = new Label();
Frame val5 = new Frame();
StaticResourceExtension val6 = new StaticResourceExtension();
StaticResourceExtension val7 = new StaticResourceExtension();
AppThemeBindingExtension val8 = new AppThemeBindingExtension();
Label val9 = new Label();
StaticResourceExtension val10 = new StaticResourceExtension();
StaticResourceExtension val11 = new StaticResourceExtension();
AppThemeBindingExtension val12 = new AppThemeBindingExtension();
Label val13 = new Label();
StaticResourceExtension val14 = new StaticResourceExtension();
StaticResourceExtension val15 = new StaticResourceExtension();
StaticResourceExtension val16 = new StaticResourceExtension();
AppThemeBindingExtension val17 = new AppThemeBindingExtension();
Label val18 = new Label();
StaticResourceExtension val19 = new StaticResourceExtension();
StaticResourceExtension val20 = new StaticResourceExtension();
AppThemeBindingExtension val21 = new AppThemeBindingExtension();
Label val22 = new Label();
StaticResourceExtension val23 = new StaticResourceExtension();
StaticResourceExtension val24 = new StaticResourceExtension();
AppThemeBindingExtension val25 = new AppThemeBindingExtension();
Label val26 = new Label();
StaticResourceExtension val27 = new StaticResourceExtension();
StaticResourceExtension val28 = new StaticResourceExtension();
AppThemeBindingExtension val29 = new AppThemeBindingExtension();
Label val30 = new Label();
VerticalStackLayout val31 = new VerticalStackLayout();
Frame val32 = new Frame();
Button val33 = new Button();
VerticalStackLayout val34 = new VerticalStackLayout();
DetailPage detailPage;
NameScope val35 = (NameScope)(((object)NameScope.GetNameScope((BindableObject)(object)(detailPage = this))) ?? ((object)new NameScope()));
NameScope.SetNameScope((BindableObject)(object)detailPage, (INameScope)(object)val35);
((Element)val34).transientNamescope = (INameScope)(object)val35;
((Element)val5).transientNamescope = (INameScope)(object)val35;
((Element)val4).transientNamescope = (INameScope)(object)val35;
((Element)val9).transientNamescope = (INameScope)(object)val35;
((Element)val13).transientNamescope = (INameScope)(object)val35;
((Element)val32).transientNamescope = (INameScope)(object)val35;
((Element)val31).transientNamescope = (INameScope)(object)val35;
((Element)val18).transientNamescope = (INameScope)(object)val35;
((Element)val22).transientNamescope = (INameScope)(object)val35;
((Element)val26).transientNamescope = (INameScope)(object)val35;
((Element)val30).transientNamescope = (INameScope)(object)val35;
((Element)val33).transientNamescope = (INameScope)(object)val35;
((BindableObject)detailPage).SetValue(Page.TitleProperty, (object)"Detail Page");
val.Key = "PageBackgroundLight";
StaticResourceExtension val36 = new StaticResourceExtension
{
Key = "PageBackgroundLight"
};
XamlServiceProvider val37 = new XamlServiceProvider();
Type? typeFromHandle = typeof(IProvideValueTarget);
object[] array = new object[0 + 2];
array[0] = val3;
array[1] = detailPage;
SimpleValueTargetProvider val38 = new SimpleValueTargetProvider(array, (object)typeof(AppThemeBindingExtension).GetRuntimeProperty("Light"), (INameScope[])(object)new NameScope[3] { val35, val35, val35 }, false);
object obj = (object)val38;
val37.Add(typeFromHandle, (object)val38);
val37.Add(typeof(IReferenceProvider), obj);
val37.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(6, 14)));
object light = val36.ProvideValue((IServiceProvider)val37);
val3.Light = light;
val2.Key = "PageBackgroundDark";
StaticResourceExtension val39 = new StaticResourceExtension
{
Key = "PageBackgroundDark"
};
XamlServiceProvider val40 = new XamlServiceProvider();
Type? typeFromHandle2 = typeof(IProvideValueTarget);
object[] array2 = new object[0 + 2];
array2[0] = val3;
array2[1] = detailPage;
SimpleValueTargetProvider val41 = new SimpleValueTargetProvider(array2, (object)typeof(AppThemeBindingExtension).GetRuntimeProperty("Dark"), (INameScope[])(object)new NameScope[3] { val35, val35, val35 }, false);
object obj2 = (object)val41;
val40.Add(typeFromHandle2, (object)val41);
val40.Add(typeof(IReferenceProvider), obj2);
val40.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(6, 14)));
object dark = val39.ProvideValue((IServiceProvider)val40);
val3.Dark = dark;
XamlServiceProvider val42 = new XamlServiceProvider();
val42.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)detailPage, (object)VisualElement.BackgroundColorProperty));
val42.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(6, 14)));
BindingBase val43 = ((IMarkupExtension<BindingBase>)(object)val3).ProvideValue((IServiceProvider)val42);
((BindableObject)detailPage).SetBinding(VisualElement.BackgroundColorProperty, val43);
((BindableObject)val34).SetValue(Layout.PaddingProperty, (object)new Thickness(30.0));
((BindableObject)val34).SetValue(StackBase.SpacingProperty, (object)20.0);
((BindableObject)val34).SetValue(View.VerticalOptionsProperty, (object)LayoutOptions.Center);
((BindableObject)val5).SetValue(Frame.CornerRadiusProperty, (object)50f);
((BindableObject)val5).SetValue(VisualElement.WidthRequestProperty, (object)80.0);
((BindableObject)val5).SetValue(VisualElement.HeightRequestProperty, (object)80.0);
((BindableObject)val5).SetValue(View.HorizontalOptionsProperty, (object)LayoutOptions.Center);
((BindableObject)val5).SetValue(Layout.PaddingProperty, (object)new Thickness(0.0));
((BindableObject)val5).SetValue(VisualElement.BackgroundColorProperty, (object)new Color(52f / 85f, 13f / 85f, 0.6901961f, 1f));
((BindableObject)val4).SetValue(Label.TextProperty, (object)"→");
((BindableObject)val4).SetValue(Label.FontSizeProperty, (object)32.0);
((BindableObject)val4).SetValue(Label.TextColorProperty, (object)Colors.White);
((BindableObject)val4).SetValue(View.HorizontalOptionsProperty, (object)LayoutOptions.Center);
((BindableObject)val4).SetValue(View.VerticalOptionsProperty, (object)LayoutOptions.Center);
((BindableObject)val5).SetValue(ContentView.ContentProperty, (object)val4);
((Layout)val34).Children.Add((IView)(object)val5);
((BindableObject)val9).SetValue(Label.TextProperty, (object)"Detail Page");
((BindableObject)val9).SetValue(Label.FontSizeProperty, (object)28.0);
((BindableObject)val9).SetValue(Label.FontAttributesProperty, (object)(FontAttributes)1);
((BindableObject)val9).SetValue(View.HorizontalOptionsProperty, (object)LayoutOptions.Center);
val6.Key = "TextPrimaryLight";
StaticResourceExtension val44 = new StaticResourceExtension
{
Key = "TextPrimaryLight"
};
XamlServiceProvider val45 = new XamlServiceProvider();
Type? typeFromHandle3 = typeof(IProvideValueTarget);
object[] array3 = new object[0 + 4];
array3[0] = val8;
array3[1] = val9;
array3[2] = val34;
array3[3] = detailPage;
SimpleValueTargetProvider val46 = new SimpleValueTargetProvider(array3, (object)typeof(AppThemeBindingExtension).GetRuntimeProperty("Light"), (INameScope[])(object)new NameScope[5] { val35, val35, val35, val35, val35 }, false);
object obj3 = (object)val46;
val45.Add(typeFromHandle3, (object)val46);
val45.Add(typeof(IReferenceProvider), obj3);
val45.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(17, 16)));
object light2 = val44.ProvideValue((IServiceProvider)val45);
val8.Light = light2;
val7.Key = "TextPrimaryDark";
StaticResourceExtension val47 = new StaticResourceExtension
{
Key = "TextPrimaryDark"
};
XamlServiceProvider val48 = new XamlServiceProvider();
Type? typeFromHandle4 = typeof(IProvideValueTarget);
object[] array4 = new object[0 + 4];
array4[0] = val8;
array4[1] = val9;
array4[2] = val34;
array4[3] = detailPage;
SimpleValueTargetProvider val49 = new SimpleValueTargetProvider(array4, (object)typeof(AppThemeBindingExtension).GetRuntimeProperty("Dark"), (INameScope[])(object)new NameScope[5] { val35, val35, val35, val35, val35 }, false);
object obj4 = (object)val49;
val48.Add(typeFromHandle4, (object)val49);
val48.Add(typeof(IReferenceProvider), obj4);
val48.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(17, 16)));
object dark2 = val47.ProvideValue((IServiceProvider)val48);
val8.Dark = dark2;
XamlServiceProvider val50 = new XamlServiceProvider();
val50.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val9, (object)Label.TextColorProperty));
val50.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(17, 16)));
BindingBase val51 = ((IMarkupExtension<BindingBase>)(object)val8).ProvideValue((IServiceProvider)val50);
((BindableObject)val9).SetBinding(Label.TextColorProperty, val51);
((Layout)val34).Children.Add((IView)(object)val9);
((BindableObject)val13).SetValue(Label.TextProperty, (object)"This page was pushed onto the navigation stack.");
((BindableObject)val13).SetValue(Label.FontSizeProperty, (object)16.0);
((BindableObject)val13).SetValue(View.HorizontalOptionsProperty, (object)LayoutOptions.Center);
((BindableObject)val13).SetValue(Label.HorizontalTextAlignmentProperty, (object)(TextAlignment)1);
val10.Key = "TextSecondaryLight";
StaticResourceExtension val52 = new StaticResourceExtension
{
Key = "TextSecondaryLight"
};
XamlServiceProvider val53 = new XamlServiceProvider();
Type? typeFromHandle5 = typeof(IProvideValueTarget);
object[] array5 = new object[0 + 4];
array5[0] = val12;
array5[1] = val13;
array5[2] = val34;
array5[3] = detailPage;
SimpleValueTargetProvider val54 = new SimpleValueTargetProvider(array5, (object)typeof(AppThemeBindingExtension).GetRuntimeProperty("Light"), (INameScope[])(object)new NameScope[5] { val35, val35, val35, val35, val35 }, false);
object obj5 = (object)val54;
val53.Add(typeFromHandle5, (object)val54);
val53.Add(typeof(IReferenceProvider), obj5);
val53.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(21, 16)));
object light3 = val52.ProvideValue((IServiceProvider)val53);
val12.Light = light3;
val11.Key = "TextSecondaryDark";
StaticResourceExtension val55 = new StaticResourceExtension
{
Key = "TextSecondaryDark"
};
XamlServiceProvider val56 = new XamlServiceProvider();
Type? typeFromHandle6 = typeof(IProvideValueTarget);
object[] array6 = new object[0 + 4];
array6[0] = val12;
array6[1] = val13;
array6[2] = val34;
array6[3] = detailPage;
SimpleValueTargetProvider val57 = new SimpleValueTargetProvider(array6, (object)typeof(AppThemeBindingExtension).GetRuntimeProperty("Dark"), (INameScope[])(object)new NameScope[5] { val35, val35, val35, val35, val35 }, false);
object obj6 = (object)val57;
val56.Add(typeFromHandle6, (object)val57);
val56.Add(typeof(IReferenceProvider), obj6);
val56.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(21, 16)));
object dark3 = val55.ProvideValue((IServiceProvider)val56);
val12.Dark = dark3;
XamlServiceProvider val58 = new XamlServiceProvider();
val58.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val13, (object)Label.TextColorProperty));
val58.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(21, 16)));
BindingBase val59 = ((IMarkupExtension<BindingBase>)(object)val12).ProvideValue((IServiceProvider)val58);
((BindableObject)val13).SetBinding(Label.TextColorProperty, val59);
((Layout)val34).Children.Add((IView)(object)val13);
val14.Key = "ThemedFrame";
StaticResourceExtension val60 = new StaticResourceExtension
{
Key = "ThemedFrame"
};
XamlServiceProvider val61 = new XamlServiceProvider();
Type? typeFromHandle7 = typeof(IProvideValueTarget);
object[] array7 = new object[0 + 3];
array7[0] = val32;
array7[1] = val34;
array7[2] = detailPage;
SimpleValueTargetProvider val62 = new SimpleValueTargetProvider(array7, (object)VisualElement.StyleProperty, (INameScope[])(object)new NameScope[4] { val35, val35, val35, val35 }, false);
object obj7 = (object)val62;
val61.Add(typeFromHandle7, (object)val62);
val61.Add(typeof(IReferenceProvider), obj7);
val61.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(23, 16)));
object obj8 = val60.ProvideValue((IServiceProvider)val61);
((BindableObject)val32).SetValue(VisualElement.StyleProperty, (obj8 == null || !typeof(BindingBase).IsAssignableFrom(obj8.GetType())) ? obj8 : obj8);
((BindableObject)val32).SetValue(Frame.CornerRadiusProperty, (object)8f);
((BindableObject)val32).SetValue(Layout.PaddingProperty, (object)new Thickness(20.0));
((BindableObject)val32).SetValue(View.MarginProperty, (object)new Thickness(0.0, 20.0));
((BindableObject)val31).SetValue(StackBase.SpacingProperty, (object)10.0);
((BindableObject)val18).SetValue(Label.TextProperty, (object)"Navigation Info");
((BindableObject)val18).SetValue(Label.FontSizeProperty, (object)18.0);
((BindableObject)val18).SetValue(Label.FontAttributesProperty, (object)(FontAttributes)1);
val15.Key = "TextPrimaryLight";
StaticResourceExtension val63 = new StaticResourceExtension
{
Key = "TextPrimaryLight"
};
XamlServiceProvider val64 = new XamlServiceProvider();
Type? typeFromHandle8 = typeof(IProvideValueTarget);
object[] array8 = new object[0 + 6];
array8[0] = val17;
array8[1] = val18;
array8[2] = val31;
array8[3] = val32;
array8[4] = val34;
array8[5] = detailPage;
SimpleValueTargetProvider val65 = new SimpleValueTargetProvider(array8, (object)typeof(AppThemeBindingExtension).GetRuntimeProperty("Light"), (INameScope[])(object)new NameScope[7] { val35, val35, val35, val35, val35, val35, val35 }, false);
object obj9 = (object)val65;
val64.Add(typeFromHandle8, (object)val65);
val64.Add(typeof(IReferenceProvider), obj9);
val64.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(26, 24)));
object light4 = val63.ProvideValue((IServiceProvider)val64);
val17.Light = light4;
val16.Key = "TextPrimaryDark";
StaticResourceExtension val66 = new StaticResourceExtension
{
Key = "TextPrimaryDark"
};
XamlServiceProvider val67 = new XamlServiceProvider();
Type? typeFromHandle9 = typeof(IProvideValueTarget);
object[] array9 = new object[0 + 6];
array9[0] = val17;
array9[1] = val18;
array9[2] = val31;
array9[3] = val32;
array9[4] = val34;
array9[5] = detailPage;
SimpleValueTargetProvider val68 = new SimpleValueTargetProvider(array9, (object)typeof(AppThemeBindingExtension).GetRuntimeProperty("Dark"), (INameScope[])(object)new NameScope[7] { val35, val35, val35, val35, val35, val35, val35 }, false);
object obj10 = (object)val68;
val67.Add(typeFromHandle9, (object)val68);
val67.Add(typeof(IReferenceProvider), obj10);
val67.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(26, 24)));
object dark4 = val66.ProvideValue((IServiceProvider)val67);
val17.Dark = dark4;
XamlServiceProvider val69 = new XamlServiceProvider();
val69.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val18, (object)Label.TextColorProperty));
val69.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(26, 24)));
BindingBase val70 = ((IMarkupExtension<BindingBase>)(object)val17).ProvideValue((IServiceProvider)val69);
((BindableObject)val18).SetBinding(Label.TextColorProperty, val70);
((Layout)val31).Children.Add((IView)(object)val18);
((BindableObject)val22).SetValue(Label.TextProperty, (object)"• Use Shell.GoToAsync() to navigate");
((BindableObject)val22).SetValue(Label.FontSizeProperty, (object)14.0);
val19.Key = "TextPrimaryLight";
StaticResourceExtension val71 = new StaticResourceExtension
{
Key = "TextPrimaryLight"
};
XamlServiceProvider val72 = new XamlServiceProvider();
Type? typeFromHandle10 = typeof(IProvideValueTarget);
object[] array10 = new object[0 + 6];
array10[0] = val21;
array10[1] = val22;
array10[2] = val31;
array10[3] = val32;
array10[4] = val34;
array10[5] = detailPage;
SimpleValueTargetProvider val73 = new SimpleValueTargetProvider(array10, (object)typeof(AppThemeBindingExtension).GetRuntimeProperty("Light"), (INameScope[])(object)new NameScope[7] { val35, val35, val35, val35, val35, val35, val35 }, false);
object obj11 = (object)val73;
val72.Add(typeFromHandle10, (object)val73);
val72.Add(typeof(IReferenceProvider), obj11);
val72.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(28, 24)));
object light5 = val71.ProvideValue((IServiceProvider)val72);
val21.Light = light5;
val20.Key = "TextPrimaryDark";
StaticResourceExtension val74 = new StaticResourceExtension
{
Key = "TextPrimaryDark"
};
XamlServiceProvider val75 = new XamlServiceProvider();
Type? typeFromHandle11 = typeof(IProvideValueTarget);
object[] array11 = new object[0 + 6];
array11[0] = val21;
array11[1] = val22;
array11[2] = val31;
array11[3] = val32;
array11[4] = val34;
array11[5] = detailPage;
SimpleValueTargetProvider val76 = new SimpleValueTargetProvider(array11, (object)typeof(AppThemeBindingExtension).GetRuntimeProperty("Dark"), (INameScope[])(object)new NameScope[7] { val35, val35, val35, val35, val35, val35, val35 }, false);
object obj12 = (object)val76;
val75.Add(typeFromHandle11, (object)val76);
val75.Add(typeof(IReferenceProvider), obj12);
val75.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(28, 24)));
object dark5 = val74.ProvideValue((IServiceProvider)val75);
val21.Dark = dark5;
XamlServiceProvider val77 = new XamlServiceProvider();
val77.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val22, (object)Label.TextColorProperty));
val77.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(28, 24)));
BindingBase val78 = ((IMarkupExtension<BindingBase>)(object)val21).ProvideValue((IServiceProvider)val77);
((BindableObject)val22).SetBinding(Label.TextColorProperty, val78);
((Layout)val31).Children.Add((IView)(object)val22);
((BindableObject)val26).SetValue(Label.TextProperty, (object)"• Use the back button to return");
((BindableObject)val26).SetValue(Label.FontSizeProperty, (object)14.0);
val23.Key = "TextPrimaryLight";
StaticResourceExtension val79 = new StaticResourceExtension
{
Key = "TextPrimaryLight"
};
XamlServiceProvider val80 = new XamlServiceProvider();
Type? typeFromHandle12 = typeof(IProvideValueTarget);
object[] array12 = new object[0 + 6];
array12[0] = val25;
array12[1] = val26;
array12[2] = val31;
array12[3] = val32;
array12[4] = val34;
array12[5] = detailPage;
SimpleValueTargetProvider val81 = new SimpleValueTargetProvider(array12, (object)typeof(AppThemeBindingExtension).GetRuntimeProperty("Light"), (INameScope[])(object)new NameScope[7] { val35, val35, val35, val35, val35, val35, val35 }, false);
object obj13 = (object)val81;
val80.Add(typeFromHandle12, (object)val81);
val80.Add(typeof(IReferenceProvider), obj13);
val80.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(30, 24)));
object light6 = val79.ProvideValue((IServiceProvider)val80);
val25.Light = light6;
val24.Key = "TextPrimaryDark";
StaticResourceExtension val82 = new StaticResourceExtension
{
Key = "TextPrimaryDark"
};
XamlServiceProvider val83 = new XamlServiceProvider();
Type? typeFromHandle13 = typeof(IProvideValueTarget);
object[] array13 = new object[0 + 6];
array13[0] = val25;
array13[1] = val26;
array13[2] = val31;
array13[3] = val32;
array13[4] = val34;
array13[5] = detailPage;
SimpleValueTargetProvider val84 = new SimpleValueTargetProvider(array13, (object)typeof(AppThemeBindingExtension).GetRuntimeProperty("Dark"), (INameScope[])(object)new NameScope[7] { val35, val35, val35, val35, val35, val35, val35 }, false);
object obj14 = (object)val84;
val83.Add(typeFromHandle13, (object)val84);
val83.Add(typeof(IReferenceProvider), obj14);
val83.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(30, 24)));
object dark6 = val82.ProvideValue((IServiceProvider)val83);
val25.Dark = dark6;
XamlServiceProvider val85 = new XamlServiceProvider();
val85.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val26, (object)Label.TextColorProperty));
val85.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(30, 24)));
BindingBase val86 = ((IMarkupExtension<BindingBase>)(object)val25).ProvideValue((IServiceProvider)val85);
((BindableObject)val26).SetBinding(Label.TextColorProperty, val86);
((Layout)val31).Children.Add((IView)(object)val26);
((BindableObject)val30).SetValue(Label.TextProperty, (object)"• Or tap 'Go Back' below");
((BindableObject)val30).SetValue(Label.FontSizeProperty, (object)14.0);
val27.Key = "TextPrimaryLight";
StaticResourceExtension val87 = new StaticResourceExtension
{
Key = "TextPrimaryLight"
};
XamlServiceProvider val88 = new XamlServiceProvider();
Type? typeFromHandle14 = typeof(IProvideValueTarget);
object[] array14 = new object[0 + 6];
array14[0] = val29;
array14[1] = val30;
array14[2] = val31;
array14[3] = val32;
array14[4] = val34;
array14[5] = detailPage;
SimpleValueTargetProvider val89 = new SimpleValueTargetProvider(array14, (object)typeof(AppThemeBindingExtension).GetRuntimeProperty("Light"), (INameScope[])(object)new NameScope[7] { val35, val35, val35, val35, val35, val35, val35 }, false);
object obj15 = (object)val89;
val88.Add(typeFromHandle14, (object)val89);
val88.Add(typeof(IReferenceProvider), obj15);
val88.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(32, 24)));
object light7 = val87.ProvideValue((IServiceProvider)val88);
val29.Light = light7;
val28.Key = "TextPrimaryDark";
StaticResourceExtension val90 = new StaticResourceExtension
{
Key = "TextPrimaryDark"
};
XamlServiceProvider val91 = new XamlServiceProvider();
Type? typeFromHandle15 = typeof(IProvideValueTarget);
object[] array15 = new object[0 + 6];
array15[0] = val29;
array15[1] = val30;
array15[2] = val31;
array15[3] = val32;
array15[4] = val34;
array15[5] = detailPage;
SimpleValueTargetProvider val92 = new SimpleValueTargetProvider(array15, (object)typeof(AppThemeBindingExtension).GetRuntimeProperty("Dark"), (INameScope[])(object)new NameScope[7] { val35, val35, val35, val35, val35, val35, val35 }, false);
object obj16 = (object)val92;
val91.Add(typeFromHandle15, (object)val92);
val91.Add(typeof(IReferenceProvider), obj16);
val91.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(32, 24)));
object dark7 = val90.ProvideValue((IServiceProvider)val91);
val29.Dark = dark7;
XamlServiceProvider val93 = new XamlServiceProvider();
val93.Add(typeof(IProvideValueTarget), (object)new ValueTargetProvider((object)val30, (object)Label.TextColorProperty));
val93.Add(typeof(IXmlLineInfoProvider), (object)new XmlLineInfoProvider((IXmlLineInfo)new XmlLineInfo(32, 24)));
BindingBase val94 = ((IMarkupExtension<BindingBase>)(object)val29).ProvideValue((IServiceProvider)val93);
((BindableObject)val30).SetBinding(Label.TextColorProperty, val94);
((Layout)val31).Children.Add((IView)(object)val30);
((BindableObject)val32).SetValue(ContentView.ContentProperty, (object)val31);
((Layout)val34).Children.Add((IView)(object)val32);
((BindableObject)val33).SetValue(Button.TextProperty, (object)"Go Back");
val33.Clicked += detailPage.OnGoBackClicked;
((BindableObject)val33).SetValue(VisualElement.BackgroundColorProperty, (object)new Color(52f / 85f, 13f / 85f, 0.6901961f, 1f));
((BindableObject)val33).SetValue(Button.TextColorProperty, (object)Colors.White);
((BindableObject)val33).SetValue(View.HorizontalOptionsProperty, (object)LayoutOptions.Center);
((BindableObject)val33).SetValue(Button.PaddingProperty, (object)new Thickness(30.0, 10.0));
((Layout)val34).Children.Add((IView)(object)val33);
((BindableObject)detailPage).SetValue(ContentPage.ContentProperty, (object)val34);
}
}

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShellDemo.DetailPage"
Title="Detail Page"
BackgroundColor="{AppThemeBinding Light={StaticResource PageBackgroundLight}, Dark={StaticResource PageBackgroundDark}}">
<VerticalStackLayout Padding="30"
Spacing="20"
VerticalOptions="Center">
<Label Text="Pushed Page"
FontSize="28"
FontAttributes="Bold"
HorizontalOptions="Center"
TextColor="{StaticResource PurpleColor}" />
<Label x:Name="ItemNameLabel"
Text="You navigated to: Detail Item"
FontSize="16"
HorizontalOptions="Center"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Label Text="This page was pushed onto the navigation stack using Shell.Current.GoToAsync()"
FontSize="14"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}"
HorizontalTextAlignment="Center"
LineBreakMode="WordWrap" />
<BoxView Style="{StaticResource ThemedDivider}" Margin="0,20" />
<Button x:Name="BackButton"
Text="Go Back (Pop)"
BackgroundColor="{StaticResource PurpleColor}"
TextColor="White"
HorizontalOptions="Center"
Padding="30,10"
CornerRadius="5"
Clicked="OnBackClicked" />
<Label Text="Use the back button above or the hardware/gesture back to pop this page"
FontSize="12"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}"
HorizontalTextAlignment="Center"
Margin="0,20,0,0" />
</VerticalStackLayout>
</ContentPage>

View File

@@ -0,0 +1,55 @@
// DetailPage - Demonstrates push/pop navigation
using Microsoft.Maui.Controls;
using Microsoft.Maui.Platform.Linux.Hosting;
namespace ShellDemo;
/// <summary>
/// A detail page that can be pushed onto the navigation stack.
/// </summary>
public partial class DetailPage : ContentPage
{
private readonly string _itemName;
public DetailPage() : this("Detail Item")
{
}
public DetailPage(string itemName)
{
_itemName = itemName;
InitializeComponent();
ItemNameLabel.Text = $"You navigated to: {_itemName}";
}
private void OnBackClicked(object? sender, EventArgs e)
{
Console.WriteLine("[DetailPage] Go Back clicked");
var success = LinuxViewRenderer.PopPage();
Console.WriteLine($"[DetailPage] PopPage result: {success}");
}
}
/// <summary>
/// Query property for passing data to DetailPage.
/// </summary>
[QueryProperty(nameof(ItemName), "item")]
public class DetailPageWithQuery : DetailPage
{
private string _itemName = "Item";
public string ItemName
{
get => _itemName;
set
{
_itemName = value;
Title = $"Detail: {value}";
}
}
public DetailPageWithQuery() : base()
{
}
}

View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShellDemo.GridsPage"
Title="Grids"
BackgroundColor="{AppThemeBinding Light={StaticResource PageBackgroundLight}, Dark={StaticResource PageBackgroundDark}}">
<ScrollView Orientation="Both">
<VerticalStackLayout x:Name="MainContent" Spacing="25" Padding="20">
<!-- Content will be added dynamically with proper theming -->
</VerticalStackLayout>
</ScrollView>
</ContentPage>

View File

@@ -0,0 +1,431 @@
// GridsPage - Demonstrates Grid layouts with various options
using Microsoft.Maui.Controls;
using Microsoft.Maui.Graphics;
namespace ShellDemo;
public partial class GridsPage : ContentPage
{
public GridsPage()
{
InitializeComponent();
BuildContent();
}
private void BuildContent()
{
MainContent.Children.Add(CreateSectionHeader("Basic Grid (2x2)"));
MainContent.Children.Add(CreateBasicGrid());
MainContent.Children.Add(CreateSectionHeader("Column Definitions"));
MainContent.Children.Add(CreateColumnDefinitionsDemo());
MainContent.Children.Add(CreateSectionHeader("Row Definitions"));
MainContent.Children.Add(CreateRowDefinitionsDemo());
MainContent.Children.Add(CreateSectionHeader("Star Sizing (Proportional)"));
MainContent.Children.Add(CreateStarSizingDemo());
MainContent.Children.Add(CreateSectionHeader("Row & Column Spacing"));
MainContent.Children.Add(CreateSpacingDemo());
MainContent.Children.Add(CreateSectionHeader("Row & Column Span"));
MainContent.Children.Add(CreateSpanDemo());
MainContent.Children.Add(CreateSectionHeader("Mixed Sizing"));
MainContent.Children.Add(CreateMixedSizingDemo());
MainContent.Children.Add(new BoxView { HeightRequest = 20 });
}
private Label CreateSectionHeader(string text)
{
var label = new Label
{
Text = text,
FontSize = 18,
FontAttributes = FontAttributes.Bold,
Margin = new Thickness(0, 10, 0, 5)
};
label.SetAppThemeColor(Label.TextColorProperty,
Color.FromArgb("#2196F3"),
Color.FromArgb("#64B5F6"));
return label;
}
private View CreateBasicGrid()
{
var grid = new Grid
{
RowDefinitions =
{
new RowDefinition { Height = GridLength.Auto },
new RowDefinition { Height = GridLength.Auto }
},
ColumnDefinitions =
{
new ColumnDefinition { Width = GridLength.Star },
new ColumnDefinition { Width = GridLength.Star }
}
};
grid.SetAppThemeColor(Grid.BackgroundColorProperty,
Color.FromArgb("#F5F5F5"),
Color.FromArgb("#2C2C2C"));
var cell1 = CreateCell("Row 0, Col 0", "#E3F2FD", "#1A3A5C");
var cell2 = CreateCell("Row 0, Col 1", "#E8F5E9", "#1A3C1A");
var cell3 = CreateCell("Row 1, Col 0", "#FFF3E0", "#3C2A1A");
var cell4 = CreateCell("Row 1, Col 1", "#FCE4EC", "#3C1A2A");
Grid.SetRow(cell1, 0); Grid.SetColumn(cell1, 0);
Grid.SetRow(cell2, 0); Grid.SetColumn(cell2, 1);
Grid.SetRow(cell3, 1); Grid.SetColumn(cell3, 0);
Grid.SetRow(cell4, 1); Grid.SetColumn(cell4, 1);
grid.Children.Add(cell1);
grid.Children.Add(cell2);
grid.Children.Add(cell3);
grid.Children.Add(cell4);
return CreateDemoContainer(grid, "Equal columns using Star sizing");
}
private View CreateColumnDefinitionsDemo()
{
var stack = new VerticalStackLayout { Spacing = 15 };
// Auto width columns
var autoGrid = new Grid
{
ColumnDefinitions =
{
new ColumnDefinition { Width = GridLength.Auto },
new ColumnDefinition { Width = GridLength.Auto },
new ColumnDefinition { Width = GridLength.Auto }
}
};
autoGrid.SetAppThemeColor(Grid.BackgroundColorProperty,
Color.FromArgb("#F5F5F5"),
Color.FromArgb("#2C2C2C"));
var a1 = CreateCell("Auto", "#BBDEFB", "#1A3A5C");
var a2 = CreateCell("Auto Width", "#C8E6C9", "#1A3C1A");
var a3 = CreateCell("A", "#FFECB3", "#3C3A1A");
Grid.SetColumn(a1, 0);
Grid.SetColumn(a2, 1);
Grid.SetColumn(a3, 2);
autoGrid.Children.Add(a1);
autoGrid.Children.Add(a2);
autoGrid.Children.Add(a3);
var autoLabel = new Label { Text = "Auto: Sizes to content", FontSize = 12 };
autoLabel.SetAppThemeColor(Label.TextColorProperty,
Color.FromArgb("#757575"),
Color.FromArgb("#B0B0B0"));
stack.Children.Add(autoLabel);
stack.Children.Add(autoGrid);
// Absolute width columns
var absoluteGrid = new Grid
{
ColumnDefinitions =
{
new ColumnDefinition { Width = new GridLength(50) },
new ColumnDefinition { Width = new GridLength(100) },
new ColumnDefinition { Width = new GridLength(150) }
}
};
absoluteGrid.SetAppThemeColor(Grid.BackgroundColorProperty,
Color.FromArgb("#F5F5F5"),
Color.FromArgb("#2C2C2C"));
var b1 = CreateCell("50px", "#BBDEFB", "#1A3A5C");
var b2 = CreateCell("100px", "#C8E6C9", "#1A3C1A");
var b3 = CreateCell("150px", "#FFECB3", "#3C3A1A");
Grid.SetColumn(b1, 0);
Grid.SetColumn(b2, 1);
Grid.SetColumn(b3, 2);
absoluteGrid.Children.Add(b1);
absoluteGrid.Children.Add(b2);
absoluteGrid.Children.Add(b3);
var absLabel = new Label { Text = "Absolute: Fixed pixel widths (50, 100, 150)", FontSize = 12, Margin = new Thickness(0, 10, 0, 0) };
absLabel.SetAppThemeColor(Label.TextColorProperty,
Color.FromArgb("#757575"),
Color.FromArgb("#B0B0B0"));
stack.Children.Add(absLabel);
stack.Children.Add(absoluteGrid);
return stack;
}
private View CreateRowDefinitionsDemo()
{
var grid = new Grid
{
WidthRequest = 200,
RowDefinitions =
{
new RowDefinition { Height = new GridLength(30) },
new RowDefinition { Height = new GridLength(50) },
new RowDefinition { Height = GridLength.Auto },
new RowDefinition { Height = new GridLength(40) }
},
ColumnDefinitions =
{
new ColumnDefinition { Width = GridLength.Star }
}
};
grid.SetAppThemeColor(Grid.BackgroundColorProperty,
Color.FromArgb("#F5F5F5"),
Color.FromArgb("#2C2C2C"));
var r1 = CreateCell("30px height", "#BBDEFB", "#1A3A5C");
var r2 = CreateCell("50px height", "#C8E6C9", "#1A3C1A");
var r3 = CreateCell("Auto height\n(fits content)", "#FFECB3", "#3C3A1A");
var r4 = CreateCell("40px height", "#F8BBD9", "#3C1A3C");
Grid.SetRow(r1, 0);
Grid.SetRow(r2, 1);
Grid.SetRow(r3, 2);
Grid.SetRow(r4, 3);
grid.Children.Add(r1);
grid.Children.Add(r2);
grid.Children.Add(r3);
grid.Children.Add(r4);
return CreateDemoContainer(grid, "Different row heights: 30px, 50px, Auto, 40px");
}
private View CreateStarSizingDemo()
{
var grid = new Grid
{
ColumnDefinitions =
{
new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) },
new ColumnDefinition { Width = new GridLength(2, GridUnitType.Star) },
new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) }
}
};
grid.SetAppThemeColor(Grid.BackgroundColorProperty,
Color.FromArgb("#F5F5F5"),
Color.FromArgb("#2C2C2C"));
var s1 = CreateCell("1*", "#BBDEFB", "#1A3A5C");
var s2 = CreateCell("2* (double)", "#C8E6C9", "#1A3C1A");
var s3 = CreateCell("1*", "#FFECB3", "#3C3A1A");
Grid.SetColumn(s1, 0);
Grid.SetColumn(s2, 1);
Grid.SetColumn(s3, 2);
grid.Children.Add(s1);
grid.Children.Add(s2);
grid.Children.Add(s3);
return CreateDemoContainer(grid, "Star proportions: 1* | 2* | 1* = 25% | 50% | 25%");
}
private View CreateSpacingDemo()
{
var stack = new VerticalStackLayout { Spacing = 15 };
// No spacing
var noSpacing = CreateSpacedGrid(0, 0);
var noLabel = new Label { Text = "No spacing (RowSpacing=0, ColumnSpacing=0)", FontSize = 12 };
noLabel.SetAppThemeColor(Label.TextColorProperty,
Color.FromArgb("#757575"),
Color.FromArgb("#B0B0B0"));
stack.Children.Add(noLabel);
stack.Children.Add(noSpacing);
// With spacing
var withSpacing = CreateSpacedGrid(10, 10);
var withLabel = new Label { Text = "With spacing (RowSpacing=10, ColumnSpacing=10)", FontSize = 12, Margin = new Thickness(0, 10, 0, 0) };
withLabel.SetAppThemeColor(Label.TextColorProperty,
Color.FromArgb("#757575"),
Color.FromArgb("#B0B0B0"));
stack.Children.Add(withLabel);
stack.Children.Add(withSpacing);
return stack;
}
private Grid CreateSpacedGrid(int rowSpacing, int columnSpacing)
{
var grid = new Grid
{
RowSpacing = rowSpacing,
ColumnSpacing = columnSpacing,
RowDefinitions =
{
new RowDefinition { Height = GridLength.Auto },
new RowDefinition { Height = GridLength.Auto }
},
ColumnDefinitions =
{
new ColumnDefinition { Width = GridLength.Star },
new ColumnDefinition { Width = GridLength.Star }
}
};
var c1 = CreateCell("0,0", "#BBDEFB", "#1A3A5C");
var c2 = CreateCell("0,1", "#C8E6C9", "#1A3C1A");
var c3 = CreateCell("1,0", "#FFECB3", "#3C3A1A");
var c4 = CreateCell("1,1", "#F8BBD9", "#3C1A3C");
Grid.SetRow(c1, 0); Grid.SetColumn(c1, 0);
Grid.SetRow(c2, 0); Grid.SetColumn(c2, 1);
Grid.SetRow(c3, 1); Grid.SetColumn(c3, 0);
Grid.SetRow(c4, 1); Grid.SetColumn(c4, 1);
grid.Children.Add(c1);
grid.Children.Add(c2);
grid.Children.Add(c3);
grid.Children.Add(c4);
return grid;
}
private View CreateSpanDemo()
{
var grid = new Grid
{
RowSpacing = 5,
ColumnSpacing = 5,
RowDefinitions =
{
new RowDefinition { Height = GridLength.Auto },
new RowDefinition { Height = GridLength.Auto },
new RowDefinition { Height = GridLength.Auto }
},
ColumnDefinitions =
{
new ColumnDefinition { Width = GridLength.Star },
new ColumnDefinition { Width = GridLength.Star },
new ColumnDefinition { Width = GridLength.Star }
}
};
// Spanning header
var header = CreateCell("ColumnSpan=3 (Header)", "#1976D2", "#0D47A1", Colors.White);
Grid.SetRow(header, 0);
Grid.SetColumn(header, 0);
Grid.SetColumnSpan(header, 3);
// Left sidebar spanning 2 rows
var sidebar = CreateCell("RowSpan=2\n(Sidebar)", "#388E3C", "#1B5E20", Colors.White);
Grid.SetRow(sidebar, 1);
Grid.SetColumn(sidebar, 0);
Grid.SetRowSpan(sidebar, 2);
// Content cells
var content1 = CreateCell("Content 1", "#E3F2FD", "#1A3A5C");
Grid.SetRow(content1, 1); Grid.SetColumn(content1, 1);
var content2 = CreateCell("Content 2", "#E8F5E9", "#1A3C1A");
Grid.SetRow(content2, 1); Grid.SetColumn(content2, 2);
var content3 = CreateCell("Content 3", "#FFF3E0", "#3C2A1A");
Grid.SetRow(content3, 2); Grid.SetColumn(content3, 1);
var content4 = CreateCell("Content 4", "#FCE4EC", "#3C1A2A");
Grid.SetRow(content4, 2); Grid.SetColumn(content4, 2);
grid.Children.Add(header);
grid.Children.Add(sidebar);
grid.Children.Add(content1);
grid.Children.Add(content2);
grid.Children.Add(content3);
grid.Children.Add(content4);
return CreateDemoContainer(grid, "Header spans 3 columns, Sidebar spans 2 rows");
}
private View CreateMixedSizingDemo()
{
var grid = new Grid
{
ColumnSpacing = 5,
ColumnDefinitions =
{
new ColumnDefinition { Width = new GridLength(60) },
new ColumnDefinition { Width = GridLength.Star },
new ColumnDefinition { Width = GridLength.Auto },
new ColumnDefinition { Width = new GridLength(60) }
}
};
grid.SetAppThemeColor(Grid.BackgroundColorProperty,
Color.FromArgb("#F5F5F5"),
Color.FromArgb("#2C2C2C"));
var c1 = CreateCell("60px", "#BBDEFB", "#1A3A5C");
var c2 = CreateCell("Star (fills remaining)", "#C8E6C9", "#1A3C1A");
var c3 = CreateCell("Auto", "#FFECB3", "#3C3A1A");
var c4 = CreateCell("60px", "#F8BBD9", "#3C1A3C");
Grid.SetColumn(c1, 0);
Grid.SetColumn(c2, 1);
Grid.SetColumn(c3, 2);
Grid.SetColumn(c4, 3);
grid.Children.Add(c1);
grid.Children.Add(c2);
grid.Children.Add(c3);
grid.Children.Add(c4);
return CreateDemoContainer(grid, "Mixed: 60px | Star | Auto | 60px");
}
private Border CreateCell(string text, string lightBgColor, string darkBgColor, Color? textColor = null)
{
var label = new Label
{
Text = text,
FontSize = 12,
HorizontalTextAlignment = TextAlignment.Center,
VerticalTextAlignment = TextAlignment.Center
};
if (textColor != null)
{
label.TextColor = textColor;
}
else
{
label.SetAppThemeColor(Label.TextColorProperty,
Colors.Black,
Colors.White);
}
var border = new Border
{
Padding = new Thickness(10, 8),
StrokeThickness = 0,
Content = label
};
border.SetAppThemeColor(Border.BackgroundColorProperty,
Color.FromArgb(lightBgColor),
Color.FromArgb(darkBgColor));
return border;
}
private View CreateDemoContainer(View content, string description)
{
var descLabel = new Label { Text = description, FontSize = 12 };
descLabel.SetAppThemeColor(Label.TextColorProperty,
Color.FromArgb("#757575"),
Color.FromArgb("#B0B0B0"));
return new VerticalStackLayout
{
Spacing = 5,
Children = { descLabel, content }
};
}
}

View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShellDemo.HomePage"
Title="Home"
BackgroundColor="{AppThemeBinding Light={StaticResource PageBackgroundLight}, Dark={StaticResource PageBackgroundDark}}">
<ScrollView Orientation="Both">
<VerticalStackLayout Padding="30" Spacing="20">
<!-- Header -->
<Label Text="OpenMaui Linux"
FontSize="32"
FontAttributes="Bold"
HorizontalOptions="Center"
TextColor="{StaticResource PrimaryColor}" />
<Label Text="Controls Demo"
FontSize="20"
HorizontalOptions="Center"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<BoxView Style="{StaticResource ThemedDivider}" Margin="0,10" />
<Label Text="Welcome to the comprehensive controls demonstration for OpenMaui Linux. This app showcases all the major UI controls available in the framework."
FontSize="14"
LineBreakMode="WordWrap"
HorizontalTextAlignment="Center"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- Feature Grid -->
<Grid x:Name="FeatureGrid"
ColumnDefinitions="*,*"
RowDefinitions="Auto,Auto,Auto"
ColumnSpacing="15"
RowSpacing="15"
Margin="0,20" />
<Label Text="Use the flyout menu (swipe from left or tap the hamburger icon) to navigate between different control demos."
FontSize="12"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}"
LineBreakMode="WordWrap"
HorizontalTextAlignment="Center"
Margin="0,20,0,0" />
<!-- Quick Actions Section -->
<VerticalStackLayout Spacing="10" Margin="0,20,0,0">
<Label Text="Quick Actions"
FontSize="16"
FontAttributes="Bold"
HorizontalOptions="Center"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<HorizontalStackLayout Spacing="10" HorizontalOptions="Center">
<Button x:Name="TryButtonsBtn"
Text="Try Buttons"
Style="{StaticResource PrimaryButton}"
Clicked="OnTryButtonsClicked" />
<Button x:Name="TryListsBtn"
Text="Try Lists"
Style="{StaticResource SuccessButton}"
Clicked="OnTryListsClicked" />
</HorizontalStackLayout>
</VerticalStackLayout>
<!-- Navigation Demo Section -->
<Border BackgroundColor="{AppThemeBinding Light=#F3E5F5, Dark=#2D1F3D}"
StrokeThickness="0"
Padding="20"
Margin="0,20,0,0">
<Border.StrokeShape>
<RoundRectangle CornerRadius="8" />
</Border.StrokeShape>
<VerticalStackLayout Spacing="15">
<Label Text="Navigation Stack Demo"
FontSize="18"
FontAttributes="Bold"
TextColor="{StaticResource PurpleColor}"
HorizontalOptions="Center" />
<Label Text="Demonstrate push/pop navigation using Shell.GoToAsync()"
FontSize="12"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}"
HorizontalTextAlignment="Center" />
<Button x:Name="PushDetailBtn"
Text="Push Detail Page"
BackgroundColor="{StaticResource PurpleColor}"
TextColor="White"
HorizontalOptions="Center"
Padding="30,10"
Clicked="OnPushDetailClicked" />
<Label Text="Click the button to push a new page onto the navigation stack. Use the back button or 'Go Back' to pop it off."
FontSize="11"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}"
HorizontalTextAlignment="Center"
LineBreakMode="WordWrap" />
</VerticalStackLayout>
</Border>
</VerticalStackLayout>
</ScrollView>
</ContentPage>

View File

@@ -0,0 +1,122 @@
// 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;
namespace ShellDemo;
public partial class HomePage : ContentPage
{
public HomePage()
{
InitializeComponent();
CreateFeatureCards();
}
private void CreateFeatureCards()
{
var features = new[]
{
("Buttons", "Various button styles and events"),
("Text Input", "Entry, Editor, SearchBar"),
("Selection", "CheckBox, Switch, Slider"),
("Pickers", "Picker, DatePicker, TimePicker"),
("Lists", "CollectionView with selection"),
("Progress", "ProgressBar, ActivityIndicator")
};
for (int i = 0; i < features.Length; i++)
{
var (title, desc) = features[i];
var card = CreateFeatureCard(title, desc);
Grid.SetRow(card, i / 2);
Grid.SetColumn(card, i % 2);
FeatureGrid.Children.Add(card);
}
}
private Border CreateFeatureCard(string title, string description)
{
// Use AppThemeBinding for card colors
var cardBackground = new AppThemeBindingExtension
{
Light = Application.Current?.Resources["CardBackgroundLight"] as Color ?? Colors.White,
Dark = Application.Current?.Resources["CardBackgroundDark"] as Color ?? Color.FromArgb("#1E1E1E")
};
var textPrimary = new AppThemeBindingExtension
{
Light = Application.Current?.Resources["TextPrimaryLight"] as Color ?? Colors.Black,
Dark = Application.Current?.Resources["TextPrimaryDark"] as Color ?? Colors.White
};
var textSecondary = new AppThemeBindingExtension
{
Light = Application.Current?.Resources["TextSecondaryLight"] as Color ?? Colors.Gray,
Dark = Application.Current?.Resources["TextSecondaryDark"] as Color ?? Color.FromArgb("#B0B0B0")
};
var titleLabel = new Label
{
Text = title,
FontSize = 14,
FontAttributes = FontAttributes.Bold,
TextColor = Color.FromArgb("#2196F3")
};
var descLabel = new Label
{
Text = description,
FontSize = 11,
LineBreakMode = LineBreakMode.WordWrap
};
descLabel.SetBinding(Label.TextColorProperty, new Binding { Source = textSecondary, Path = "." });
descLabel.SetAppThemeColor(Label.TextColorProperty,
Application.Current?.Resources["TextSecondaryLight"] as Color ?? Colors.Gray,
Application.Current?.Resources["TextSecondaryDark"] as Color ?? Color.FromArgb("#B0B0B0"));
var border = new Border
{
Padding = new Thickness(15),
StrokeThickness = 0,
StrokeShape = new RoundRectangle { CornerRadius = 8 },
Shadow = new Shadow
{
Brush = new SolidColorBrush(Colors.Black),
Opacity = 0.1f,
Radius = 4,
Offset = new Point(0, 2)
},
Content = new VerticalStackLayout
{
Spacing = 5,
Children = { titleLabel, descLabel }
}
};
border.SetAppThemeColor(Border.BackgroundColorProperty,
Application.Current?.Resources["CardBackgroundLight"] as Color ?? Colors.White,
Application.Current?.Resources["CardBackgroundDark"] as Color ?? Color.FromArgb("#1E1E1E"));
return border;
}
private void OnTryButtonsClicked(object? sender, EventArgs e)
{
LinuxViewRenderer.NavigateToRoute("Buttons");
}
private void OnTryListsClicked(object? sender, EventArgs e)
{
LinuxViewRenderer.NavigateToRoute("Lists");
}
private void OnPushDetailClicked(object? sender, EventArgs e)
{
Console.WriteLine("[HomePage] Push button clicked, navigating to detail");
var success = LinuxViewRenderer.PushPage(new DetailPage());
Console.WriteLine($"[HomePage] PushPage result: {success}");
}
}

View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShellDemo.ListsPage"
Title="Lists"
BackgroundColor="{AppThemeBinding Light={StaticResource PageBackgroundLight}, Dark={StaticResource PageBackgroundDark}}">
<Grid RowDefinitions="*,120">
<!-- Main Content -->
<ScrollView Grid.Row="0">
<VerticalStackLayout Padding="20" Spacing="20">
<Label Text="List Controls"
FontSize="24"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- Fruits CollectionView -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="10">
<Label Text="CollectionView - Fruits"
FontSize="16"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<CollectionView x:Name="FruitsCollectionView"
HeightRequest="200"
SelectionMode="Single"
BackgroundColor="{AppThemeBinding Light=#FAFAFA, Dark=#2C2C2C}"
SelectionChanged="OnFruitsSelectionChanged">
<CollectionView.ItemTemplate>
<DataTemplate>
<Label Text="{Binding}"
Padding="10"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
<Label x:Name="FruitsSelectedLabel"
Text="Tap a fruit to select"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
</VerticalStackLayout>
</Border>
<!-- Colors CollectionView -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="10">
<Label Text="CollectionView - Colors"
FontSize="16"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<CollectionView x:Name="ColorsCollectionView"
HeightRequest="180"
SelectionMode="Single"
BackgroundColor="{AppThemeBinding Light=White, Dark=#1E1E1E}"
SelectionChanged="OnColorsSelectionChanged">
<CollectionView.ItemTemplate>
<DataTemplate>
<Label Text="{Binding}"
Padding="10"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
<Label Text="Scroll to see all colors"
FontSize="11"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
</VerticalStackLayout>
</Border>
<!-- Contacts CollectionView -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="10">
<Label Text="CollectionView - Contacts"
FontSize="16"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<CollectionView x:Name="ContactsCollectionView"
HeightRequest="200"
SelectionMode="Single"
BackgroundColor="{AppThemeBinding Light=White, Dark=#1E1E1E}"
SelectionChanged="OnContactsSelectionChanged">
<CollectionView.ItemTemplate>
<DataTemplate>
<Label Text="{Binding}"
Padding="10"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
<!-- Action buttons -->
<HorizontalStackLayout Spacing="10">
<Button Text="Add Contact"
Style="{StaticResource SuccessButton}"
Clicked="OnAddContactClicked" />
<Button Text="Delete Selected"
Style="{StaticResource DangerButton}"
Clicked="OnDeleteContactClicked" />
</HorizontalStackLayout>
</VerticalStackLayout>
</Border>
</VerticalStackLayout>
</ScrollView>
<!-- Event Log Panel -->
<Border Grid.Row="1"
BackgroundColor="{AppThemeBinding Light=#F5F5F5, Dark=#2C2C2C}"
StrokeThickness="0"
Padding="10">
<VerticalStackLayout>
<Label Text="Event Log:"
FontSize="12"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<ScrollView HeightRequest="80">
<Label x:Name="EventLogLabel"
Text="Events will appear here..."
FontSize="11"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}"
LineBreakMode="WordWrap" />
</ScrollView>
</VerticalStackLayout>
</Border>
</Grid>
</ContentPage>

View File

@@ -0,0 +1,104 @@
// ListsPage - CollectionView and ListView Demo
using Microsoft.Maui.Controls;
using System.Collections.ObjectModel;
namespace ShellDemo;
public partial class ListsPage : ContentPage
{
private int _eventCount = 0;
private ObservableCollection<string> _contacts;
public ListsPage()
{
InitializeComponent();
// Set up fruits
var fruits = new List<string>
{
"Apple", "Banana", "Cherry", "Date", "Elderberry",
"Fig", "Grape", "Honeydew", "Kiwi", "Lemon",
"Mango", "Nectarine", "Orange", "Papaya", "Quince"
};
FruitsCollectionView.ItemsSource = fruits;
// Set up colors
var colors = new List<string>
{
"Red", "Pink", "Purple", "Deep Purple", "Indigo",
"Blue", "Cyan", "Teal", "Green", "Light Green",
"Lime", "Yellow", "Amber", "Orange", "Deep Orange"
};
ColorsCollectionView.ItemsSource = colors;
// Set up contacts
_contacts = new ObservableCollection<string>
{
"Alice Johnson (Engineering)",
"Bob Smith (Marketing)",
"Carol Williams (Design)",
"David Brown (Sales)",
"Eva Martinez (Engineering)",
"Frank Lee (Support)",
"Grace Kim (HR)",
"Henry Wilson (Finance)"
};
ContactsCollectionView.ItemsSource = _contacts;
}
private void OnFruitsSelectionChanged(object? sender, SelectionChangedEventArgs e)
{
if (e.CurrentSelection.Count > 0)
{
var item = e.CurrentSelection[0]?.ToString();
FruitsSelectedLabel.Text = $"Selected: {item}";
LogEvent($"Fruit selected: {item}");
}
}
private void OnColorsSelectionChanged(object? sender, SelectionChangedEventArgs e)
{
if (e.CurrentSelection.Count > 0)
{
var item = e.CurrentSelection[0]?.ToString();
LogEvent($"Color selected: {item}");
}
}
private void OnContactsSelectionChanged(object? sender, SelectionChangedEventArgs e)
{
if (e.CurrentSelection.Count > 0)
{
var contact = e.CurrentSelection[0]?.ToString();
LogEvent($"Contact: {contact}");
}
}
private void OnAddContactClicked(object? sender, EventArgs e)
{
var newContact = $"New Contact {_contacts.Count + 1} (New)";
_contacts.Add(newContact);
LogEvent($"Added: {newContact}");
}
private void OnDeleteContactClicked(object? sender, EventArgs e)
{
if (ContactsCollectionView.SelectedItem is string selected && _contacts.Contains(selected))
{
_contacts.Remove(selected);
LogEvent($"Deleted: {selected}");
}
else
{
LogEvent("No contact selected to delete");
}
}
private void LogEvent(string message)
{
_eventCount++;
var timestamp = DateTime.Now.ToString("HH:mm:ss");
EventLogLabel.Text = $"[{timestamp}] {_eventCount}. {message}\n{EventLogLabel.Text}";
}
}

View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,185 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShellDemo.PickersPage"
Title="Pickers"
BackgroundColor="{AppThemeBinding Light={StaticResource PageBackgroundLight}, Dark={StaticResource PageBackgroundDark}}">
<Grid RowDefinitions="*,120">
<!-- Main Content -->
<ScrollView Grid.Row="0">
<VerticalStackLayout Padding="20" Spacing="20">
<Label Text="Picker Controls"
FontSize="24"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- Picker Section -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="15">
<Label Text="Picker"
FontSize="16"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- Basic picker -->
<Picker x:Name="FruitPicker"
Title="Select a fruit"
SelectedIndexChanged="OnFruitPickerChanged">
<Picker.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>Apple</x:String>
<x:String>Banana</x:String>
<x:String>Cherry</x:String>
<x:String>Date</x:String>
<x:String>Elderberry</x:String>
<x:String>Fig</x:String>
<x:String>Grape</x:String>
</x:Array>
</Picker.ItemsSource>
</Picker>
<Label x:Name="FruitSelectedLabel"
Text="Selected: (none)"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<!-- Picker with default selection -->
<Label Text="With Default Selection:"
FontSize="12"
Margin="0,10,0,0"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<Picker x:Name="ColorPicker"
Title="Select a color"
SelectedIndex="2"
SelectedIndexChanged="OnColorPickerChanged">
<Picker.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>Red</x:String>
<x:String>Green</x:String>
<x:String>Blue</x:String>
<x:String>Yellow</x:String>
<x:String>Purple</x:String>
</x:Array>
</Picker.ItemsSource>
</Picker>
<!-- Styled picker -->
<Label Text="Styled Picker:"
FontSize="12"
Margin="0,10,0,0"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<Picker x:Name="SizePicker"
Title="Select size"
TextColor="{AppThemeBinding Light=DarkBlue, Dark=LightBlue}"
TitleColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}"
SelectedIndexChanged="OnSizePickerChanged">
<Picker.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>Small</x:String>
<x:String>Medium</x:String>
<x:String>Large</x:String>
<x:String>Extra Large</x:String>
</x:Array>
</Picker.ItemsSource>
</Picker>
</VerticalStackLayout>
</Border>
<!-- DatePicker Section -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="15">
<Label Text="DatePicker"
FontSize="16"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- Basic date picker -->
<DatePicker x:Name="BasicDatePicker"
DateSelected="OnDateSelected" />
<Label x:Name="DateSelectedLabel"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- Date picker with range -->
<Label Text="With Date Range (this month only):"
FontSize="12"
Margin="0,10,0,0"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<DatePicker x:Name="RangeDatePicker"
DateSelected="OnRangeDateSelected" />
<!-- Styled date picker -->
<Label Text="Styled DatePicker:"
FontSize="12"
Margin="0,10,0,0"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<DatePicker x:Name="StyledDatePicker"
TextColor="{AppThemeBinding Light=DarkGreen, Dark=LightGreen}"
DateSelected="OnStyledDateSelected" />
</VerticalStackLayout>
</Border>
<!-- TimePicker Section -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="15">
<Label Text="TimePicker"
FontSize="16"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- Basic time picker -->
<TimePicker x:Name="BasicTimePicker"
PropertyChanged="OnTimePickerPropertyChanged" />
<Label x:Name="TimeSelectedLabel"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- Styled time picker -->
<Label Text="Styled TimePicker:"
FontSize="12"
Margin="0,10,0,0"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<TimePicker x:Name="StyledTimePicker"
Time="14:30:00"
TextColor="{AppThemeBinding Light=DarkBlue, Dark=LightBlue}"
PropertyChanged="OnStyledTimePickerPropertyChanged" />
<!-- Alarm time -->
<Label Text="Alarm Time:"
FontSize="12"
Margin="0,10,0,0"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<HorizontalStackLayout Spacing="10">
<TimePicker x:Name="AlarmTimePicker" Time="07:00:00" />
<Button Text="Set Alarm"
BackgroundColor="{StaticResource WarningColor}"
TextColor="White"
Clicked="OnSetAlarmClicked" />
</HorizontalStackLayout>
</VerticalStackLayout>
</Border>
</VerticalStackLayout>
</ScrollView>
<!-- Event Log Panel -->
<Border Grid.Row="1"
BackgroundColor="{AppThemeBinding Light=#F5F5F5, Dark=#2C2C2C}"
StrokeThickness="0"
Padding="10">
<VerticalStackLayout>
<Label Text="Event Log:"
FontSize="12"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<ScrollView HeightRequest="80">
<Label x:Name="EventLogLabel"
Text="Events will appear here..."
FontSize="11"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}"
LineBreakMode="WordWrap" />
</ScrollView>
</VerticalStackLayout>
</Border>
</Grid>
</ContentPage>

View File

@@ -0,0 +1,107 @@
// PickersPage - Picker, DatePicker, TimePicker Demo
using Microsoft.Maui.Controls;
namespace ShellDemo;
public partial class PickersPage : ContentPage
{
private int _eventCount = 0;
public PickersPage()
{
InitializeComponent();
// Set up date picker with current date
BasicDatePicker.Date = DateTime.Today;
DateSelectedLabel.Text = $"Selected: {DateTime.Today:d}";
// Set up range date picker
var startOfMonth = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);
var endOfMonth = startOfMonth.AddMonths(1).AddDays(-1);
RangeDatePicker.MinimumDate = startOfMonth;
RangeDatePicker.MaximumDate = endOfMonth;
RangeDatePicker.Date = DateTime.Today;
// Set up styled date picker
StyledDatePicker.Date = DateTime.Today.AddDays(7);
// Set up time picker
BasicTimePicker.Time = DateTime.Now.TimeOfDay;
TimeSelectedLabel.Text = $"Selected: {DateTime.Now:t}";
}
private void OnFruitPickerChanged(object? sender, EventArgs e)
{
if (FruitPicker.SelectedIndex >= 0)
{
var item = FruitPicker.ItemsSource[FruitPicker.SelectedIndex]?.ToString();
FruitSelectedLabel.Text = $"Selected: {item}";
LogEvent($"Fruit selected: {item}");
}
}
private void OnColorPickerChanged(object? sender, EventArgs e)
{
if (ColorPicker.SelectedIndex >= 0)
{
var item = ColorPicker.ItemsSource[ColorPicker.SelectedIndex]?.ToString();
LogEvent($"Color selected: {item}");
}
}
private void OnSizePickerChanged(object? sender, EventArgs e)
{
if (SizePicker.SelectedIndex >= 0)
{
var item = SizePicker.ItemsSource[SizePicker.SelectedIndex]?.ToString();
LogEvent($"Size selected: {item}");
}
}
private void OnDateSelected(object? sender, DateChangedEventArgs e)
{
DateSelectedLabel.Text = $"Selected: {e.NewDate:d}";
LogEvent($"Date selected: {e.NewDate:d}");
}
private void OnRangeDateSelected(object? sender, DateChangedEventArgs e)
{
LogEvent($"Date (limited): {e.NewDate:d}");
}
private void OnStyledDateSelected(object? sender, DateChangedEventArgs e)
{
LogEvent($"Styled date: {e.NewDate:d}");
}
private void OnTimePickerPropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(TimePicker.Time))
{
var time = BasicTimePicker.Time;
TimeSelectedLabel.Text = $"Selected: {time:hh\\:mm}";
LogEvent($"Time selected: {time:hh\\:mm}");
}
}
private void OnStyledTimePickerPropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(TimePicker.Time))
{
LogEvent($"Styled time: {StyledTimePicker.Time:hh\\:mm}");
}
}
private void OnSetAlarmClicked(object? sender, EventArgs e)
{
LogEvent($"Alarm set for {AlarmTimePicker.Time:hh\\:mm}");
}
private void LogEvent(string message)
{
_eventCount++;
var timestamp = DateTime.Now.ToString("HH:mm:ss");
EventLogLabel.Text = $"[{timestamp}] {_eventCount}. {message}\n{EventLogLabel.Text}";
}
}

View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,167 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShellDemo.ProgressPage"
Title="Progress"
BackgroundColor="{AppThemeBinding Light={StaticResource PageBackgroundLight}, Dark={StaticResource PageBackgroundDark}}">
<Grid RowDefinitions="*,120">
<!-- Main Content -->
<ScrollView Grid.Row="0">
<VerticalStackLayout Padding="20" Spacing="20">
<Label Text="Progress Indicators"
FontSize="24"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- ProgressBar Section -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="15">
<Label Text="ProgressBar"
FontSize="16"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- Various progress values -->
<HorizontalStackLayout Spacing="10">
<ProgressBar Progress="0" WidthRequest="200" />
<Label Text="0%" VerticalOptions="Center" WidthRequest="50"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</HorizontalStackLayout>
<HorizontalStackLayout Spacing="10">
<ProgressBar Progress="0.25" WidthRequest="200" />
<Label Text="25%" VerticalOptions="Center" WidthRequest="50"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</HorizontalStackLayout>
<HorizontalStackLayout Spacing="10">
<ProgressBar Progress="0.5" WidthRequest="200" />
<Label Text="50%" VerticalOptions="Center" WidthRequest="50"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</HorizontalStackLayout>
<HorizontalStackLayout Spacing="10">
<ProgressBar Progress="0.75" WidthRequest="200" />
<Label Text="75%" VerticalOptions="Center" WidthRequest="50"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</HorizontalStackLayout>
<HorizontalStackLayout Spacing="10">
<ProgressBar Progress="1.0" WidthRequest="200" />
<Label Text="100%" VerticalOptions="Center" WidthRequest="50"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</HorizontalStackLayout>
<!-- Colored progress bars -->
<Label Text="Colored Progress Bars:"
FontSize="12"
Margin="0,10,0,0"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<ProgressBar Progress="0.7" ProgressColor="Red" />
<ProgressBar Progress="0.7" ProgressColor="Green" />
<ProgressBar Progress="0.7" ProgressColor="Blue" />
<ProgressBar Progress="0.7" ProgressColor="Orange" />
<ProgressBar Progress="0.7" ProgressColor="Purple" />
</VerticalStackLayout>
</Border>
<!-- ActivityIndicator Section -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="15">
<Label Text="ActivityIndicator"
FontSize="16"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- Running indicator -->
<HorizontalStackLayout Spacing="15">
<ActivityIndicator IsRunning="True" />
<Label Text="Loading..." VerticalOptions="Center"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</HorizontalStackLayout>
<!-- Toggle indicator -->
<HorizontalStackLayout Spacing="15">
<ActivityIndicator x:Name="ToggleIndicator" IsRunning="False" />
<Button Text="Start/Stop"
Style="{StaticResource SecondaryButton}"
Clicked="OnToggleIndicatorClicked" />
</HorizontalStackLayout>
<!-- Colored indicators -->
<Label Text="Colored Indicators:"
FontSize="12"
Margin="0,10,0,0"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<HorizontalStackLayout Spacing="20">
<ActivityIndicator IsRunning="True" Color="Red" />
<ActivityIndicator IsRunning="True" Color="Green" />
<ActivityIndicator IsRunning="True" Color="Blue" />
<ActivityIndicator IsRunning="True" Color="Orange" />
</HorizontalStackLayout>
</VerticalStackLayout>
</Border>
<!-- Interactive Demo Section -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="15">
<Label Text="Interactive Demo"
FontSize="16"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- Slider-controlled progress -->
<ProgressBar x:Name="AnimatedProgress" Progress="0.5" />
<Slider x:Name="ProgressSlider"
Minimum="0"
Maximum="100"
Value="50"
ValueChanged="OnProgressSliderValueChanged" />
<Label x:Name="ProgressLabel"
Text="Progress: 50%"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- Animated progress buttons -->
<HorizontalStackLayout Spacing="10" Margin="0,10,0,0">
<Button Text="Reset"
Style="{StaticResource SecondaryButton}"
Clicked="OnResetClicked" />
<Button Text="Animate to 100%"
Style="{StaticResource PrimaryButton}"
Clicked="OnAnimateClicked" />
<Button Text="Simulate Download"
Style="{StaticResource SuccessButton}"
Clicked="OnSimulateDownloadClicked" />
</HorizontalStackLayout>
</VerticalStackLayout>
</Border>
</VerticalStackLayout>
</ScrollView>
<!-- Event Log Panel -->
<Border Grid.Row="1"
BackgroundColor="{AppThemeBinding Light=#F5F5F5, Dark=#2C2C2C}"
StrokeThickness="0"
Padding="10">
<VerticalStackLayout>
<Label Text="Event Log:"
FontSize="12"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<ScrollView HeightRequest="80">
<Label x:Name="EventLogLabel"
Text="Events will appear here..."
FontSize="11"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}"
LineBreakMode="WordWrap" />
</ScrollView>
</VerticalStackLayout>
</Border>
</Grid>
</ContentPage>

View File

@@ -0,0 +1,83 @@
// ProgressPage - ProgressBar and ActivityIndicator Demo
using Microsoft.Maui.Controls;
namespace ShellDemo;
public partial class ProgressPage : ContentPage
{
private int _eventCount = 0;
private bool _isAnimating = false;
public ProgressPage()
{
InitializeComponent();
}
private void OnToggleIndicatorClicked(object? sender, EventArgs e)
{
ToggleIndicator.IsRunning = !ToggleIndicator.IsRunning;
LogEvent($"ActivityIndicator: {(ToggleIndicator.IsRunning ? "Started" : "Stopped")}");
}
private void OnProgressSliderValueChanged(object? sender, ValueChangedEventArgs e)
{
AnimatedProgress.Progress = e.NewValue / 100.0;
ProgressLabel.Text = $"Progress: {(int)e.NewValue}%";
}
private void OnResetClicked(object? sender, EventArgs e)
{
AnimatedProgress.Progress = 0;
ProgressSlider.Value = 0;
LogEvent("Progress reset to 0%");
}
private async void OnAnimateClicked(object? sender, EventArgs e)
{
if (_isAnimating) return;
_isAnimating = true;
LogEvent("Animation started");
for (int i = (int)ProgressSlider.Value; i <= 100; i += 5)
{
AnimatedProgress.Progress = i / 100.0;
ProgressSlider.Value = i;
await Task.Delay(100);
}
_isAnimating = false;
LogEvent("Animation completed");
}
private async void OnSimulateDownloadClicked(object? sender, EventArgs e)
{
if (_isAnimating) return;
_isAnimating = true;
LogEvent("Download simulation started");
AnimatedProgress.Progress = 0;
ProgressSlider.Value = 0;
var random = new Random();
double progress = 0;
while (progress < 1.0)
{
progress += random.NextDouble() * 0.1;
if (progress > 1.0) progress = 1.0;
AnimatedProgress.Progress = progress;
ProgressSlider.Value = progress * 100;
await Task.Delay(200 + random.Next(300));
}
_isAnimating = false;
LogEvent("Download simulation completed");
}
private void LogEvent(string message)
{
_eventCount++;
var timestamp = DateTime.Now.ToString("HH:mm:ss");
EventLogLabel.Text = $"[{timestamp}] {_eventCount}. {message}\n{EventLogLabel.Text}";
}
}

View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,157 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShellDemo.SelectionPage"
Title="Selection Controls"
BackgroundColor="{AppThemeBinding Light={StaticResource PageBackgroundLight}, Dark={StaticResource PageBackgroundDark}}">
<Grid RowDefinitions="*,120">
<!-- Main Content -->
<ScrollView Grid.Row="0">
<VerticalStackLayout Padding="20" Spacing="20">
<Label Text="Selection Controls"
FontSize="24"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- CheckBox Section -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="15">
<Label Text="CheckBox"
FontSize="16"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- Basic checkboxes -->
<HorizontalStackLayout Spacing="20">
<CheckBox x:Name="Checkbox1" IsChecked="False" CheckedChanged="OnCheckboxChanged" />
<Label Text="Option 1" VerticalOptions="Center"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<CheckBox x:Name="Checkbox2" IsChecked="True" CheckedChanged="OnCheckboxChanged" />
<Label Text="Option 2 (default checked)" VerticalOptions="Center"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</HorizontalStackLayout>
<!-- Colored checkboxes -->
<Label Text="Colored Checkboxes:"
FontSize="12"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<HorizontalStackLayout Spacing="20">
<CheckBox Color="Red" IsChecked="True" CheckedChanged="OnColoredCheckboxChanged" />
<CheckBox Color="Green" IsChecked="True" CheckedChanged="OnColoredCheckboxChanged" />
<CheckBox Color="Blue" IsChecked="True" CheckedChanged="OnColoredCheckboxChanged" />
<CheckBox Color="Purple" IsChecked="True" CheckedChanged="OnColoredCheckboxChanged" />
</HorizontalStackLayout>
<!-- Disabled checkbox -->
<HorizontalStackLayout Spacing="10">
<CheckBox IsChecked="True" IsEnabled="False" />
<Label Text="Disabled (checked)" VerticalOptions="Center"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
</HorizontalStackLayout>
</VerticalStackLayout>
</Border>
<!-- Switch Section -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="15">
<Label Text="Switch"
FontSize="16"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- Basic switch -->
<HorizontalStackLayout Spacing="15">
<Switch x:Name="BasicSwitch" IsToggled="False" Toggled="OnSwitchToggled" />
<Label x:Name="SwitchStatusLabel" Text="Off" VerticalOptions="Center" WidthRequest="50"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</HorizontalStackLayout>
<!-- Colored switches -->
<Label Text="Colored Switches:"
FontSize="12"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<HorizontalStackLayout Spacing="20">
<Switch IsToggled="True" OnColor="Green" Toggled="OnColoredSwitchToggled" />
<Switch IsToggled="True" OnColor="Orange" Toggled="OnColoredSwitchToggled" />
<Switch IsToggled="True" OnColor="Purple" Toggled="OnColoredSwitchToggled" />
</HorizontalStackLayout>
<!-- Disabled switch -->
<HorizontalStackLayout Spacing="10">
<Switch IsToggled="True" IsEnabled="False" />
<Label Text="Disabled (on)" VerticalOptions="Center"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
</HorizontalStackLayout>
</VerticalStackLayout>
</Border>
<!-- Slider Section -->
<Border Style="{StaticResource ThemedCard}">
<VerticalStackLayout Spacing="15">
<Label Text="Slider"
FontSize="16"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- Basic slider -->
<Slider x:Name="BasicSlider" Minimum="0" Maximum="100" Value="50" ValueChanged="OnSliderValueChanged" />
<Label x:Name="SliderValueLabel" Text="Value: 50"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- Temperature slider -->
<Label Text="Temperature (0-40°C):"
FontSize="12"
Margin="0,10,0,0"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<Slider x:Name="TempSlider" Minimum="0" Maximum="40" Value="20" ValueChanged="OnTempSliderValueChanged" />
<Label x:Name="TempLabel" Text="20°C"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<!-- Colored slider -->
<Label Text="Colored Slider:"
FontSize="12"
Margin="0,10,0,0"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<Slider Minimum="0" Maximum="100" Value="75"
MinimumTrackColor="Green"
MaximumTrackColor="LightGray"
ThumbColor="DarkGreen"
ValueChanged="OnColoredSliderValueChanged" />
<!-- Disabled slider -->
<Label Text="Disabled Slider:"
FontSize="12"
Margin="0,10,0,0"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<Slider Minimum="0" Maximum="100" Value="30" IsEnabled="False" />
</VerticalStackLayout>
</Border>
</VerticalStackLayout>
</ScrollView>
<!-- Event Log Panel -->
<Border Grid.Row="1"
BackgroundColor="{AppThemeBinding Light=#F5F5F5, Dark=#2C2C2C}"
StrokeThickness="0"
Padding="10">
<VerticalStackLayout>
<Label Text="Event Log:"
FontSize="12"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<ScrollView HeightRequest="80">
<Label x:Name="EventLogLabel"
Text="Events will appear here..."
FontSize="11"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}"
LineBreakMode="WordWrap" />
</ScrollView>
</VerticalStackLayout>
</Border>
</Grid>
</ContentPage>

View File

@@ -0,0 +1,65 @@
// SelectionPage - CheckBox, Switch, Slider Demo
using Microsoft.Maui.Controls;
namespace ShellDemo;
public partial class SelectionPage : ContentPage
{
private int _eventCount = 0;
public SelectionPage()
{
InitializeComponent();
}
private void OnCheckboxChanged(object? sender, CheckedChangedEventArgs e)
{
if (sender == Checkbox1)
LogEvent($"Checkbox 1: {(e.Value ? "Checked" : "Unchecked")}");
else if (sender == Checkbox2)
LogEvent($"Checkbox 2: {(e.Value ? "Checked" : "Unchecked")}");
}
private void OnColoredCheckboxChanged(object? sender, CheckedChangedEventArgs e)
{
if (sender is CheckBox cb)
LogEvent($"{cb.Color} checkbox: {(e.Value ? "Checked" : "Unchecked")}");
}
private void OnSwitchToggled(object? sender, ToggledEventArgs e)
{
SwitchStatusLabel.Text = e.Value ? "On" : "Off";
LogEvent($"Switch toggled: {(e.Value ? "ON" : "OFF")}");
}
private void OnColoredSwitchToggled(object? sender, ToggledEventArgs e)
{
if (sender is Switch sw)
LogEvent($"{sw.OnColor} switch: {(e.Value ? "ON" : "OFF")}");
}
private void OnSliderValueChanged(object? sender, ValueChangedEventArgs e)
{
SliderValueLabel.Text = $"Value: {(int)e.NewValue}";
LogEvent($"Slider value: {(int)e.NewValue}");
}
private void OnTempSliderValueChanged(object? sender, ValueChangedEventArgs e)
{
TempLabel.Text = $"{(int)e.NewValue}°C";
LogEvent($"Temperature: {(int)e.NewValue}°C");
}
private void OnColoredSliderValueChanged(object? sender, ValueChangedEventArgs e)
{
LogEvent($"Colored slider: {(int)e.NewValue}");
}
private void LogEvent(string message)
{
_eventCount++;
var timestamp = DateTime.Now.ToString("HH:mm:ss");
EventLogLabel.Text = $"[{timestamp}] {_eventCount}. {message}\n{EventLogLabel.Text}";
}
}

View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,121 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShellDemo.TextInputPage"
Title="Text Input"
BackgroundColor="{AppThemeBinding Light={StaticResource PageBackgroundLight}, Dark={StaticResource PageBackgroundDark}}">
<ScrollView>
<VerticalStackLayout Padding="20" Spacing="15">
<Label Text="Text Input Controls"
FontSize="24"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Label Text="Click on any field and start typing. All keyboard input is handled by the framework."
FontSize="14"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<!-- Entry Section -->
<BoxView Style="{StaticResource ThemedDivider}" />
<Label Text="Entry (Single Line)"
FontSize="18"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Entry x:Name="NameEntry"
Placeholder="Enter your name..."
Style="{StaticResource ThemedEntry}"
TextChanged="OnNameEntryTextChanged" />
<Label x:Name="EntryOutputLabel"
FontSize="12"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<Entry x:Name="EmailEntry"
Placeholder="Enter your email..."
Keyboard="Email"
Style="{StaticResource ThemedEntry}" />
<Label Text="Email keyboard type"
FontSize="12"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<Entry x:Name="PasswordEntry"
Placeholder="Enter password..."
IsPassword="True"
Style="{StaticResource ThemedEntry}" />
<Label Text="Password field (text hidden)"
FontSize="12"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<!-- SearchBar Section -->
<BoxView Style="{StaticResource ThemedDivider}" />
<Label Text="SearchBar"
FontSize="18"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<SearchBar x:Name="MainSearchBar"
Placeholder="Search for items..."
TextChanged="OnSearchBarTextChanged"
SearchButtonPressed="OnSearchButtonPressed" />
<Label x:Name="SearchOutputLabel"
FontSize="12"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<!-- Editor Section -->
<BoxView Style="{StaticResource ThemedDivider}" />
<Label Text="Editor (Multi-line)"
FontSize="18"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Editor x:Name="MainEditor"
Placeholder="Enter multiple lines of text here...&#10;Press Enter to create new lines."
HeightRequest="120"
Style="{StaticResource ThemedEditor}"
TextChanged="OnEditorTextChanged" />
<Label x:Name="EditorOutputLabel"
FontSize="12"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<!-- Keyboard Shortcuts -->
<BoxView Style="{StaticResource ThemedDivider}" />
<Border BackgroundColor="{AppThemeBinding Light=#E3F2FD, Dark=#1A3A5C}"
StrokeThickness="0"
Padding="15">
<Border.StrokeShape>
<RoundRectangle CornerRadius="8" />
</Border.StrokeShape>
<VerticalStackLayout Spacing="5">
<Label Text="Keyboard Shortcuts"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Label Text="Ctrl+A: Select all"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Label Text="Ctrl+C: Copy"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Label Text="Ctrl+V: Paste"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Label Text="Ctrl+X: Cut"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Label Text="Home/End: Move to start/end"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Label Text="Shift+Arrow: Select text"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
</VerticalStackLayout>
</Border>
</VerticalStackLayout>
</ScrollView>
</ContentPage>

View File

@@ -0,0 +1,34 @@
// TextInputPage - Demonstrates text input controls
using Microsoft.Maui.Controls;
namespace ShellDemo;
public partial class TextInputPage : ContentPage
{
public TextInputPage()
{
InitializeComponent();
}
private void OnNameEntryTextChanged(object? sender, TextChangedEventArgs e)
{
EntryOutputLabel.Text = $"You typed: {e.NewTextValue}";
}
private void OnSearchBarTextChanged(object? sender, TextChangedEventArgs e)
{
SearchOutputLabel.Text = $"Searching: {e.NewTextValue}";
}
private void OnSearchButtonPressed(object? sender, EventArgs e)
{
SearchOutputLabel.Text = $"Search submitted: {MainSearchBar.Text}";
}
private void OnEditorTextChanged(object? sender, TextChangedEventArgs e)
{
var lineCount = string.IsNullOrEmpty(e.NewTextValue) ? 0 : e.NewTextValue.Split('\n').Length;
EditorOutputLabel.Text = $"Lines: {lineCount}, Characters: {e.NewTextValue?.Length ?? 0}";
}
}

View File

@@ -1,19 +0,0 @@
// Platforms/Linux/Program.cs - Linux platform entry point
// Same pattern as Android's MainActivity or iOS's AppDelegate
using Microsoft.Maui.Platform.Linux;
using Microsoft.Maui.Platform.Linux.Hosting;
namespace ShellDemo;
class Program
{
static void Main(string[] args)
{
// Create the shared MAUI app
var app = MauiProgram.CreateMauiApp();
// Run on Linux platform
LinuxApplication.Run(app, args);
}
}

67
ShellDemo/Program.cs Normal file
View File

@@ -0,0 +1,67 @@
// Program.cs - Linux platform entry point
using Microsoft.Maui.Platform.Linux;
namespace ShellDemo;
class Program
{
static void Main(string[] args)
{
// Redirect console output to a log file for debugging
var logPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "shelldemo.log");
using var logWriter = new StreamWriter(logPath, append: false) { AutoFlush = true };
var multiWriter = new MultiTextWriter(Console.Out, logWriter);
Console.SetOut(multiWriter);
Console.SetError(multiWriter);
// Global exception handler
AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
{
var ex = e.ExceptionObject as Exception;
Console.WriteLine($"[FATAL] Unhandled exception: {ex?.GetType().Name}: {ex?.Message}");
Console.WriteLine($"[FATAL] Stack trace: {ex?.StackTrace}");
if (ex?.InnerException != null)
{
Console.WriteLine($"[FATAL] Inner exception: {ex.InnerException.GetType().Name}: {ex.InnerException.Message}");
Console.WriteLine($"[FATAL] Inner stack trace: {ex.InnerException.StackTrace}");
}
};
TaskScheduler.UnobservedTaskException += (sender, e) =>
{
Console.WriteLine($"[FATAL] Unobserved task exception: {e.Exception?.GetType().Name}: {e.Exception?.Message}");
Console.WriteLine($"[FATAL] Stack trace: {e.Exception?.StackTrace}");
e.SetObserved(); // Prevent crash
};
Console.WriteLine($"[Program] Starting Shell Demo at {DateTime.Now}");
Console.WriteLine($"[Program] Log file: {logPath}");
try
{
// Create the MAUI app with all handlers registered
var app = MauiProgram.CreateMauiApp();
// Run on Linux platform
LinuxApplication.Run(app, args);
}
catch (Exception ex)
{
Console.WriteLine($"[FATAL] Exception in Main: {ex.GetType().Name}: {ex.Message}");
Console.WriteLine($"[FATAL] Stack trace: {ex.StackTrace}");
throw;
}
}
}
// Helper to write to both console and file
class MultiTextWriter : TextWriter
{
private readonly TextWriter[] _writers;
public MultiTextWriter(params TextWriter[] writers) => _writers = writers;
public override System.Text.Encoding Encoding => System.Text.Encoding.UTF8;
public override void Write(char value) { foreach (var w in _writers) w.Write(value); }
public override void WriteLine(string? value) { foreach (var w in _writers) w.WriteLine(value); }
public override void Flush() { foreach (var w in _writers) w.Flush(); }
}

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#FFFFFF" d="M200-80q-33 0-56.5-23.5T120-160v-560q0-33 23.5-56.5T200-800h40v-80h80v80h320v-80h80v80h40q33 0 56.5 23.5T840-720v560q0 33-23.5 56.5T760-80H200Zm0-80h560v-400H200v400Zm0-480h560v-80H200v80Zm0 0v-80 80Zm280 240q-17 0-28.5-11.5T440-440q0-17 11.5-28.5T480-480q17 0 28.5 11.5T520-440q0 17-11.5 28.5T480-400Zm-160 0q-17 0-28.5-11.5T280-440q0-17 11.5-28.5T320-480q17 0 28.5 11.5T360-440q0 17-11.5 28.5T320-400Zm320 0q-17 0-28.5-11.5T600-440q0-17 11.5-28.5T640-480q17 0 28.5 11.5T680-440q0 17-11.5 28.5T640-400ZM480-240q-17 0-28.5-11.5T440-280q0-17 11.5-28.5T480-320q17 0 28.5 11.5T520-280q0 17-11.5 28.5T480-240Zm-160 0q-17 0-28.5-11.5T280-280q0-17 11.5-28.5T320-320q17 0 28.5 11.5T360-280q0 17-11.5 28.5T320-240Zm320 0q-17 0-28.5-11.5T600-280q0-17 11.5-28.5T640-320q17 0 28.5 11.5T680-280q0 17-11.5 28.5T640-240Z"/></svg>

After

Width:  |  Height:  |  Size: 927 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#212121" d="M200-80q-33 0-56.5-23.5T120-160v-560q0-33 23.5-56.5T200-800h40v-80h80v80h320v-80h80v80h40q33 0 56.5 23.5T840-720v560q0 33-23.5 56.5T760-80H200Zm0-80h560v-400H200v400Zm0-480h560v-80H200v80Zm0 0v-80 80Zm280 240q-17 0-28.5-11.5T440-440q0-17 11.5-28.5T480-480q17 0 28.5 11.5T520-440q0 17-11.5 28.5T480-400Zm-160 0q-17 0-28.5-11.5T280-440q0-17 11.5-28.5T320-480q17 0 28.5 11.5T360-440q0 17-11.5 28.5T320-400Zm320 0q-17 0-28.5-11.5T600-440q0-17 11.5-28.5T640-480q17 0 28.5 11.5T680-440q0 17-11.5 28.5T640-400ZM480-240q-17 0-28.5-11.5T440-280q0-17 11.5-28.5T480-320q17 0 28.5 11.5T520-280q0 17-11.5 28.5T480-240Zm-160 0q-17 0-28.5-11.5T280-280q0-17 11.5-28.5T320-320q17 0 28.5 11.5T360-280q0 17-11.5 28.5T320-240Zm320 0q-17 0-28.5-11.5T600-280q0-17 11.5-28.5T640-320q17 0 28.5 11.5T680-280q0 17-11.5 28.5T640-240Z"/></svg>

After

Width:  |  Height:  |  Size: 927 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#FFFFFF" d="m424-312 282-282-56-56-226 226-114-114-56 56 170 170ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Z"/></svg>

After

Width:  |  Height:  |  Size: 331 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#212121" d="m424-312 282-282-56-56-226 226-114-114-56 56 170 170ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Z"/></svg>

After

Width:  |  Height:  |  Size: 331 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#FFFFFF" d="M160-400v-80h280v80H160Zm0-160v-80h440v80H160Zm0-160v-80h440v80H160Zm360 560v-123l221-220q9-9 20-13t22-4q12 0 23 4.5t20 13.5l37 37q8 9 12.5 20t4.5 22q0 11-4 22.5T863-380L643-160H520Zm300-263-37-37 37 37ZM580-220h38l121-122-18-19-19-18-122 121v38Zm141-141-19-18 37 37-18-19Z"/></svg>

After

Width:  |  Height:  |  Size: 394 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#212121" d="M160-400v-80h280v80H160Zm0-160v-80h440v80H160Zm0-160v-80h440v80H160Zm360 560v-123l221-220q9-9 20-13t22-4q12 0 23 4.5t20 13.5l37 37q8 9 12.5 20t4.5 22q0 11-4 22.5T863-380L643-160H520Zm300-263-37-37 37 37ZM580-220h38l121-122-18-19-19-18-122 121v38Zm141-141-19-18 37 37-18-19Z"/></svg>

After

Width:  |  Height:  |  Size: 394 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#FFFFFF" d="M360-200v-80h480v80H360Zm0-240v-80h480v80H360Zm0-240v-80h480v80H360ZM200-160q-33 0-56.5-23.5T120-240q0-33 23.5-56.5T200-320q33 0 56.5 23.5T280-240q0 33-23.5 56.5T200-160Zm0-240q-33 0-56.5-23.5T120-480q0-33 23.5-56.5T200-560q33 0 56.5 23.5T280-480q0 33-23.5 56.5T200-400Zm0-240q-33 0-56.5-23.5T120-720q0-33 23.5-56.5T200-800q33 0 56.5 23.5T280-720q0 33-23.5 56.5T200-640Z"/></svg>

After

Width:  |  Height:  |  Size: 491 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#212121" d="M360-200v-80h480v80H360Zm0-240v-80h480v80H360Zm0-240v-80h480v80H360ZM200-160q-33 0-56.5-23.5T120-240q0-33 23.5-56.5T200-320q33 0 56.5 23.5T280-240q0 33-23.5 56.5T200-160Zm0-240q-33 0-56.5-23.5T120-480q0-33 23.5-56.5T200-560q33 0 56.5 23.5T280-480q0 33-23.5 56.5T200-400Zm0-240q-33 0-56.5-23.5T120-720q0-33 23.5-56.5T200-800q33 0 56.5 23.5T280-720q0 33-23.5 56.5T200-640Z"/></svg>

After

Width:  |  Height:  |  Size: 491 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#FFFFFF" d="M120-520v-320h320v320H120Zm0 400v-320h320v320H120Zm400-400v-320h320v320H520Zm0 400v-320h320v320H520ZM200-600h160v-160H200v160Zm400 0h160v-160H600v160Zm0 400h160v-160H600v160Zm-400 0h160v-160H200v160Zm400-400Zm0 240Zm-240 0Zm0-240Z"/></svg>

After

Width:  |  Height:  |  Size: 351 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#212121" d="M120-520v-320h320v320H120Zm0 400v-320h320v320H120Zm400-400v-320h320v320H520Zm0 400v-320h320v320H520ZM200-600h160v-160H200v160Zm400 0h160v-160H600v160Zm0 400h160v-160H600v160Zm-400 0h160v-160H200v160Zm400-400Zm0 240Zm-240 0Zm0-240Z"/></svg>

After

Width:  |  Height:  |  Size: 351 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#FFFFFF" d="M240-200h120v-240h240v240h120v-360L480-740 240-560v360Zm-80 80v-480l320-240 320 240v480H520v-240h-80v240H160Zm320-350Z"/></svg>

After

Width:  |  Height:  |  Size: 239 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#212121" d="M240-200h120v-240h240v240h120v-360L480-740 240-560v360Zm-80 80v-480l320-240 320 240v480H520v-240h-80v240H160Zm320-350Z"/></svg>

After

Width:  |  Height:  |  Size: 239 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#FFFFFF" d="M320-160h320v-120q0-66-47-113t-113-47q-66 0-113 47t-47 113v120Zm160-360q66 0 113-47t47-113v-120H320v120q0 66 47 113t113 47ZM160-80v-80h80v-120q0-61 28.5-114.5T348-480q-51-32-79.5-85.5T240-680v-120h-80v-80h640v80h-80v120q0 61-28.5 114.5T612-480q51 32 79.5 85.5T720-280v120h80v80H160Z"/></svg>

After

Width:  |  Height:  |  Size: 403 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#212121" d="M320-160h320v-120q0-66-47-113t-113-47q-66 0-113 47t-47 113v120Zm160-360q66 0 113-47t47-113v-120H320v120q0 66 47 113t113 47ZM160-80v-80h80v-120q0-61 28.5-114.5T348-480q-51-32-79.5-85.5T240-680v-120h-80v-80h640v80h-80v120q0 61-28.5 114.5T612-480q51 32 79.5 85.5T720-280v120h80v80H160Z"/></svg>

After

Width:  |  Height:  |  Size: 403 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#FFFFFF" d="M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/></svg>

After

Width:  |  Height:  |  Size: 531 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#212121" d="M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/></svg>

After

Width:  |  Height:  |  Size: 531 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#FFFFFF" d="M160-280q-33 0-56.5-23.5T80-360v-240q0-33 23.5-56.5T160-680h640q33 0 56.5 23.5T880-600v240q0 33-23.5 56.5T800-280h-40v-80h40v-240H160v240h240v80H160Zm420 80-44-96-96-44 96-44 44-96 44 96 96 44-96 44-44 96Zm100-200-25-55-55-25 55-25 25-55 25 55 55 25-55 25-25 55Z"/></svg>

After

Width:  |  Height:  |  Size: 383 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#212121" d="M160-280q-33 0-56.5-23.5T80-360v-240q0-33 23.5-56.5T160-680h640q33 0 56.5 23.5T880-600v240q0 33-23.5 56.5T800-280h-40v-80h40v-240H160v240h240v80H160Zm420 80-44-96-96-44 96-44 44-96 44 96 96 44-96 44-44 96Zm100-200-25-55-55-25 55-25 25-55 25 55 55 25-55 25-25 55Z"/></svg>

After

Width:  |  Height:  |  Size: 383 B

View File

@@ -9,7 +9,11 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="OpenMaui.Controls.Linux" Version="1.0.0-preview.*" />
<ProjectReference Include="../../maui-linux/OpenMaui.Controls.Linux.csproj" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Images\*.svg" />
</ItemGroup>
</Project>

View File

@@ -1,123 +0,0 @@
using System.CodeDom.Compiler;
using Microsoft.Maui.ApplicationModel;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;
using Microsoft.Maui.Graphics;
namespace TodoApp;
[XamlFilePath("App.xaml")]
public class App : Application
{
public App()
{
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Expected O, but got Unknown
InitializeComponent();
((Application)this).UserAppTheme = (AppTheme)1;
((Application)this).MainPage = (Page)new NavigationPage((Page)(object)new TodoListPage())
{
BarBackgroundColor = Color.FromArgb("#5C6BC0"),
BarTextColor = Colors.White
};
}
[GeneratedCode("Microsoft.Maui.Controls.SourceGen", "1.0.0.0")]
private void InitializeComponent()
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Expected O, but got Unknown
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Expected O, but got Unknown
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Expected O, but got Unknown
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Expected O, but got Unknown
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Expected O, but got Unknown
//IL_0098: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: Expected O, but got Unknown
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00ba: Expected O, but got Unknown
//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
//IL_00d5: Expected O, but got Unknown
//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
//IL_00f0: Expected O, but got Unknown
//IL_0104: Unknown result type (might be due to invalid IL or missing references)
//IL_010b: Expected O, but got Unknown
//IL_011f: Unknown result type (might be due to invalid IL or missing references)
//IL_0126: Expected O, but got Unknown
//IL_013a: Unknown result type (might be due to invalid IL or missing references)
//IL_0141: Expected O, but got Unknown
//IL_0155: Unknown result type (might be due to invalid IL or missing references)
//IL_015c: Expected O, but got Unknown
//IL_0170: Unknown result type (might be due to invalid IL or missing references)
//IL_0177: Expected O, but got Unknown
//IL_018b: Unknown result type (might be due to invalid IL or missing references)
//IL_0192: Expected O, but got Unknown
//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
//IL_01ad: Expected O, but got Unknown
//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
//IL_01c8: Expected O, but got Unknown
//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
//IL_01e3: Expected O, but got Unknown
//IL_0206: Unknown result type (might be due to invalid IL or missing references)
//IL_020d: Expected O, but got Unknown
//IL_021a: Unknown result type (might be due to invalid IL or missing references)
Color val = new Color(0.36078432f, 0.41960785f, 64f / 85f, 1f);
Color val2 = new Color(19f / 85f, 0.28627452f, 57f / 85f, 1f);
Color val3 = new Color(0.14901961f, 0.6509804f, 0.6039216f, 1f);
Color val4 = new Color(0.9372549f, 0.3254902f, 16f / 51f, 1f);
Color val5 = new Color(49f / 51f, 0.96862745f, 50f / 51f, 1f);
Color val6 = new Color(1f, 1f, 1f, 1f);
Color val7 = new Color(11f / 85f, 11f / 85f, 11f / 85f, 1f);
Color val8 = new Color(39f / 85f, 39f / 85f, 39f / 85f, 1f);
Color val9 = new Color(0.8784314f, 0.8784314f, 0.8784314f, 1f);
Color val10 = new Color(6f / 85f, 6f / 85f, 6f / 85f, 1f);
Color val11 = new Color(0.11764706f, 0.11764706f, 0.11764706f, 1f);
Color val12 = new Color(1f, 1f, 1f, 1f);
Color val13 = new Color(0.6901961f, 0.6901961f, 0.6901961f, 1f);
Color val14 = new Color(22f / 85f, 22f / 85f, 22f / 85f, 1f);
Color val15 = new Color(1f, 1f, 1f, 1f);
Color val16 = new Color(0.1764706f, 0.1764706f, 0.1764706f, 1f);
Color val17 = new Color(0.8784314f, 0.8784314f, 0.8784314f, 1f);
Color val18 = new Color(22f / 85f, 22f / 85f, 22f / 85f, 1f);
string text = "\ue145";
string text2 = "\ue872";
string text3 = "\ue161";
string text4 = "\ue876";
string text5 = "\ue3c9";
ResourceDictionary val19 = new ResourceDictionary();
App app;
NameScope val20 = (NameScope)(((object)NameScope.GetNameScope((BindableObject)(object)(app = this))) ?? ((object)new NameScope()));
NameScope.SetNameScope((BindableObject)(object)app, (INameScope)(object)val20);
((Application)app).Resources = val19;
val19.Add("PrimaryColor", (object)val);
val19.Add("PrimaryDarkColor", (object)val2);
val19.Add("AccentColor", (object)val3);
val19.Add("DangerColor", (object)val4);
val19.Add("PageBackgroundLight", (object)val5);
val19.Add("CardBackgroundLight", (object)val6);
val19.Add("TextPrimaryLight", (object)val7);
val19.Add("TextSecondaryLight", (object)val8);
val19.Add("BorderLight", (object)val9);
val19.Add("PageBackgroundDark", (object)val10);
val19.Add("CardBackgroundDark", (object)val11);
val19.Add("TextPrimaryDark", (object)val12);
val19.Add("TextSecondaryDark", (object)val13);
val19.Add("BorderDark", (object)val14);
val19.Add("InputBackgroundLight", (object)val15);
val19.Add("InputBackgroundDark", (object)val16);
val19.Add("CheckboxUncheckedLight", (object)val17);
val19.Add("CheckboxUncheckedDark", (object)val18);
val19.Add("IconAdd", (object)text);
val19.Add("IconDelete", (object)text2);
val19.Add("IconSave", (object)text3);
val19.Add("IconCheck", (object)text4);
val19.Add("IconEdit", (object)text5);
((Application)app).Resources = val19;
}
}

76
TodoApp/App.xaml Normal file
View File

@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TodoApp.App">
<Application.Resources>
<ResourceDictionary>
<!-- Primary Brand Colors -->
<Color x:Key="PrimaryColor">#5C6BC0</Color>
<Color x:Key="PrimaryDarkColor">#3949AB</Color>
<Color x:Key="AccentColor">#26A69A</Color>
<Color x:Key="DangerColor">#EF5350</Color>
<Color x:Key="CompletedColor">#9E9E9E</Color>
<!-- Light Theme Colors -->
<Color x:Key="PageBackgroundLight">#F5F7FA</Color>
<Color x:Key="CardBackgroundLight">#FFFFFF</Color>
<Color x:Key="TextPrimaryLight">#212121</Color>
<Color x:Key="TextSecondaryLight">#757575</Color>
<Color x:Key="BorderLight">#E8EAF6</Color>
<Color x:Key="DividerLight">#E0E0E0</Color>
<Color x:Key="AlternateRowLight">#F5F5F5</Color>
<!-- Dark Theme Colors -->
<Color x:Key="PageBackgroundDark">#121212</Color>
<Color x:Key="CardBackgroundDark">#1E1E1E</Color>
<Color x:Key="TextPrimaryDark">#FFFFFF</Color>
<Color x:Key="TextSecondaryDark">#B0B0B0</Color>
<Color x:Key="BorderDark">#424242</Color>
<Color x:Key="DividerDark">#424242</Color>
<Color x:Key="AlternateRowDark">#2A2A2A</Color>
<!-- Navigation Bar Colors -->
<Color x:Key="NavBarBackgroundLight">#5C6BC0</Color>
<Color x:Key="NavBarBackgroundDark">#3949AB</Color>
<!-- Themed Styles -->
<Style x:Key="ThemedCard" TargetType="Border">
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource CardBackgroundLight}, Dark={StaticResource CardBackgroundDark}}" />
<Setter Property="Stroke" Value="{AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource BorderDark}}" />
<Setter Property="StrokeThickness" Value="1" />
<Setter Property="Padding" Value="16,12" />
<Setter Property="StrokeShape">
<Setter.Value>
<RoundRectangle CornerRadius="10" />
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ThemedEntry" TargetType="Entry">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<Setter Property="BackgroundColor" Value="Transparent" />
</Style>
<Style x:Key="ThemedEditor" TargetType="Editor">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<Setter Property="BackgroundColor" Value="Transparent" />
</Style>
<Style x:Key="PrimaryButton" TargetType="Button">
<Setter Property="BackgroundColor" Value="{StaticResource PrimaryColor}" />
<Setter Property="TextColor" Value="White" />
<Setter Property="FontAttributes" Value="Bold" />
<Setter Property="Padding" Value="20,12" />
</Style>
<Style x:Key="DangerButton" TargetType="Button">
<Setter Property="BackgroundColor" Value="{StaticResource DangerColor}" />
<Setter Property="TextColor" Value="White" />
<Setter Property="FontAttributes" Value="Bold" />
<Setter Property="Padding" Value="20,12" />
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>

35
TodoApp/App.xaml.cs Normal file
View File

@@ -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;
}
}

View File

@@ -1,72 +0,0 @@
using System;
using System.Globalization;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Graphics;
namespace TodoApp;
public class CompletedToColorConverter : IValueConverter
{
private static readonly Color AccentColor = Color.FromArgb("#26A69A");
private static readonly Color CompletedColor = Color.FromArgb("#9E9E9E");
private static readonly Color TextPrimaryLight = Color.FromArgb("#212121");
private static readonly Color TextSecondaryLight = Color.FromArgb("#757575");
private static readonly Color TextPrimaryDark = Color.FromArgb("#FFFFFF");
private static readonly Color TextSecondaryDark = Color.FromArgb("#B0B0B0");
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Invalid comparison between Unknown and I4
bool flag = default(bool);
int num;
if (value is bool)
{
flag = (bool)value;
num = 1;
}
else
{
num = 0;
}
bool flag2 = (byte)((uint)num & (flag ? 1u : 0u)) != 0;
string text = (parameter as string) ?? "";
Application current = Application.Current;
bool flag3 = current != null && (int)current.RequestedTheme == 2;
if (text == "indicator")
{
if (!flag2)
{
return AccentColor;
}
return CompletedColor;
}
if (flag2)
{
return CompletedColor;
}
if (text == "notes")
{
if (!flag3)
{
return TextSecondaryLight;
}
return TextSecondaryDark;
}
if (!flag3)
{
return TextPrimaryLight;
}
return TextPrimaryDark;
}
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}

View File

@@ -1,29 +0,0 @@
using System;
using System.Globalization;
using Microsoft.Maui.Controls;
namespace TodoApp;
public class CompletedToOpacityConverter : IValueConverter
{
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
bool flag = default(bool);
int num;
if (value is bool)
{
flag = (bool)value;
num = 1;
}
else
{
num = 0;
}
return (((uint)num & (flag ? 1u : 0u)) != 0) ? 0.7 : 1.0;
}
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}

View File

@@ -1,30 +0,0 @@
using System;
using System.Globalization;
using Microsoft.Maui;
using Microsoft.Maui.Controls;
namespace TodoApp;
public class CompletedToTextDecorationsConverter : IValueConverter
{
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
bool flag = default(bool);
int num;
if (value is bool)
{
flag = (bool)value;
num = 1;
}
else
{
num = 0;
}
return (object)(TextDecorations)((((uint)num & (flag ? 1u : 0u)) != 0) ? 2 : 0);
}
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}

View File

@@ -1,4 +1,5 @@
using Microsoft.Maui.Controls.Hosting;
// MauiProgram.cs - MAUI app configuration
using Microsoft.Maui.Hosting;
using Microsoft.Maui.Platform.Linux.Hosting;
@@ -6,11 +7,16 @@ namespace TodoApp;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
MauiAppBuilder obj = MauiApp.CreateBuilder(true);
AppHostBuilderExtensions.UseMauiApp<App>(obj);
obj.UseLinux();
return obj.Build();
}
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
// Configure the app
builder.UseMauiApp<App>();
// Add Linux platform support with all handlers
builder.UseLinux();
return builder.Build();
}
}

View File

@@ -3,19 +3,12 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TodoApp.NewTodoPage"
Title="New Task"
BackgroundColor="#F5F7FA">
<ContentPage.Resources>
<Color x:Key="PrimaryColor">#5C6BC0</Color>
<Color x:Key="AccentColor">#26A69A</Color>
<Color x:Key="TextPrimary">#212121</Color>
<Color x:Key="TextSecondary">#757575</Color>
<Color x:Key="CardBackground">#FFFFFF</Color>
<Color x:Key="BorderColor">#E8EAF6</Color>
</ContentPage.Resources>
BackgroundColor="{AppThemeBinding Light={StaticResource PageBackgroundLight}, Dark={StaticResource PageBackgroundDark}}">
<ContentPage.ToolbarItems>
<ToolbarItem Text="Save" Clicked="OnSaveClicked" />
<ToolbarItem Text="Save"
IconImageSource="save_white.svg"
Clicked="OnSaveClicked" />
</ContentPage.ToolbarItems>
<Grid RowDefinitions="Auto,Auto,Auto,*" RowSpacing="16" Padding="20">
@@ -24,10 +17,10 @@
<VerticalStackLayout Grid.Row="0" Spacing="4">
<Label Text="Create a new task"
FontSize="24"
TextColor="{StaticResource TextPrimary}" />
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Label Text="Fill in the details below"
FontSize="14"
TextColor="{StaticResource TextSecondary}" />
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
</VerticalStackLayout>
<!-- Title Section -->
@@ -36,8 +29,8 @@
FontSize="13"
FontAttributes="Bold"
TextColor="{StaticResource PrimaryColor}" />
<Border BackgroundColor="{StaticResource CardBackground}"
Stroke="{StaticResource BorderColor}"
<Border BackgroundColor="{AppThemeBinding Light={StaticResource CardBackgroundLight}, Dark={StaticResource CardBackgroundDark}}"
Stroke="{AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource BorderDark}}"
StrokeThickness="1"
Padding="16,12">
<Border.StrokeShape>
@@ -46,8 +39,8 @@
<Entry x:Name="TitleEntry"
Placeholder="What needs to be done?"
FontSize="18"
TextColor="{StaticResource TextPrimary}"
PlaceholderColor="{StaticResource TextSecondary}" />
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}"
PlaceholderColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
</Border>
</VerticalStackLayout>
@@ -60,8 +53,8 @@
<!-- Notes Section (fills remaining space) -->
<Border Grid.Row="3"
BackgroundColor="{StaticResource CardBackground}"
Stroke="{StaticResource BorderColor}"
BackgroundColor="{AppThemeBinding Light={StaticResource CardBackgroundLight}, Dark={StaticResource CardBackgroundDark}}"
Stroke="{AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource BorderDark}}"
StrokeThickness="1"
Padding="16,12">
<Border.StrokeShape>
@@ -70,8 +63,8 @@
<Editor x:Name="NotesEditor"
Placeholder="Add notes (optional)..."
FontSize="14"
TextColor="{StaticResource TextPrimary}"
PlaceholderColor="{StaticResource TextSecondary}"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}"
PlaceholderColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}"
VerticalOptions="Fill" />
</Border>

View File

@@ -3,21 +3,15 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TodoApp.TodoDetailPage"
Title="Task Details"
BackgroundColor="#F5F7FA">
<ContentPage.Resources>
<Color x:Key="PrimaryColor">#5C6BC0</Color>
<Color x:Key="AccentColor">#26A69A</Color>
<Color x:Key="DangerColor">#EF5350</Color>
<Color x:Key="TextPrimary">#212121</Color>
<Color x:Key="TextSecondary">#757575</Color>
<Color x:Key="CardBackground">#FFFFFF</Color>
<Color x:Key="BorderColor">#E8EAF6</Color>
</ContentPage.Resources>
BackgroundColor="{AppThemeBinding Light={StaticResource PageBackgroundLight}, Dark={StaticResource PageBackgroundDark}}">
<ContentPage.ToolbarItems>
<ToolbarItem Text="Delete" Clicked="OnDeleteClicked" />
<ToolbarItem Text="Save" Clicked="OnSaveClicked" />
<ToolbarItem Text="Delete"
IconImageSource="delete_white.svg"
Clicked="OnDeleteClicked" />
<ToolbarItem Text="Save"
IconImageSource="save_white.svg"
Clicked="OnSaveClicked" />
</ContentPage.ToolbarItems>
<Grid RowDefinitions="Auto,Auto,*,Auto,Auto" RowSpacing="16" Padding="20">
@@ -28,8 +22,8 @@
FontSize="13"
FontAttributes="Bold"
TextColor="{StaticResource PrimaryColor}" />
<Border BackgroundColor="{StaticResource CardBackground}"
Stroke="{StaticResource BorderColor}"
<Border BackgroundColor="{AppThemeBinding Light={StaticResource CardBackgroundLight}, Dark={StaticResource CardBackgroundDark}}"
Stroke="{AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource BorderDark}}"
StrokeThickness="1"
Padding="16,12">
<Border.StrokeShape>
@@ -38,8 +32,8 @@
<Entry x:Name="TitleEntry"
Placeholder="Task title"
FontSize="18"
TextColor="{StaticResource TextPrimary}"
PlaceholderColor="{StaticResource TextSecondary}" />
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}"
PlaceholderColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
</Border>
</VerticalStackLayout>
@@ -52,8 +46,8 @@
<!-- Notes Section (fills remaining space) -->
<Border Grid.Row="2"
BackgroundColor="{StaticResource CardBackground}"
Stroke="{StaticResource BorderColor}"
BackgroundColor="{AppThemeBinding Light={StaticResource CardBackgroundLight}, Dark={StaticResource CardBackgroundDark}}"
Stroke="{AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource BorderDark}}"
StrokeThickness="1"
Padding="16,12">
<Border.StrokeShape>
@@ -62,8 +56,8 @@
<Editor x:Name="NotesEditor"
Placeholder="Add notes here..."
FontSize="14"
TextColor="{StaticResource TextPrimary}"
PlaceholderColor="{StaticResource TextSecondary}"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}"
PlaceholderColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}"
VerticalOptions="Fill" />
</Border>
@@ -73,8 +67,8 @@
FontSize="13"
FontAttributes="Bold"
TextColor="{StaticResource PrimaryColor}" />
<Border BackgroundColor="{StaticResource CardBackground}"
Stroke="{StaticResource BorderColor}"
<Border BackgroundColor="{AppThemeBinding Light={StaticResource CardBackgroundLight}, Dark={StaticResource CardBackgroundDark}}"
Stroke="{AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource BorderDark}}"
StrokeThickness="1"
Padding="16,12">
<Border.StrokeShape>
@@ -88,7 +82,7 @@
<Label x:Name="StatusLabel"
Text="In Progress"
FontSize="16"
TextColor="{StaticResource TextPrimary}"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}"
VerticalOptions="Center" />
</HorizontalStackLayout>
</Border>
@@ -98,7 +92,7 @@
<Label Grid.Row="4"
x:Name="CreatedLabel"
FontSize="13"
TextColor="{StaticResource TextSecondary}"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}"
HorizontalOptions="Center"
HorizontalTextAlignment="Center" />

View File

@@ -4,20 +4,10 @@
xmlns:local="clr-namespace:TodoApp"
x:Class="TodoApp.TodoListPage"
Title="My Tasks"
BackgroundColor="#F5F7FA">
BackgroundColor="{AppThemeBinding Light={StaticResource PageBackgroundLight}, Dark={StaticResource PageBackgroundDark}}">
<ContentPage.Resources>
<ResourceDictionary>
<!-- Colors -->
<Color x:Key="PrimaryColor">#5C6BC0</Color>
<Color x:Key="PrimaryDark">#3949AB</Color>
<Color x:Key="AccentColor">#26A69A</Color>
<Color x:Key="TextPrimary">#212121</Color>
<Color x:Key="TextSecondary">#757575</Color>
<Color x:Key="CardBackground">#FFFFFF</Color>
<Color x:Key="DividerColor">#E0E0E0</Color>
<Color x:Key="CompletedColor">#9E9E9E</Color>
<!-- Converters -->
<local:AlternatingRowColorConverter x:Key="AlternatingRowColorConverter" />
<local:CompletedToColorConverter x:Key="CompletedToColorConverter" />
@@ -27,7 +17,9 @@
</ContentPage.Resources>
<ContentPage.ToolbarItems>
<ToolbarItem Text="+ Add" Clicked="OnAddClicked" />
<ToolbarItem Text="Add"
IconImageSource="add_white.svg"
Clicked="OnAddClicked" />
</ContentPage.ToolbarItems>
<Grid RowDefinitions="*,Auto" Padding="0">
@@ -47,11 +39,11 @@
Padding="40">
<Label Text="No tasks yet"
FontSize="22"
TextColor="{StaticResource TextSecondary}"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}"
HorizontalOptions="Center" />
<Label Text="Tap '+ Add' to create your first task"
FontSize="14"
TextColor="{StaticResource TextSecondary}"
TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}"
HorizontalOptions="Center"
Margin="0,8,0,0" />
</VerticalStackLayout>
@@ -62,7 +54,7 @@
<!-- Card-style item -->
<Grid Padding="0,6" BackgroundColor="Transparent">
<Border StrokeThickness="0"
BackgroundColor="{StaticResource CardBackground}"
BackgroundColor="{AppThemeBinding Light={StaticResource CardBackgroundLight}, Dark={StaticResource CardBackgroundDark}}"
Padding="16,14"
Opacity="{Binding IsCompleted, Converter={StaticResource CompletedToOpacityConverter}}">
<Border.StrokeShape>

View File

@@ -80,17 +80,23 @@ public partial class TodoListPage : ContentPage
}
/// <summary>
/// Converter for alternating row background colors.
/// Converter for alternating row background colors with Light/Dark mode support.
/// </summary>
public class AlternatingRowColorConverter : IValueConverter
{
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
bool isDarkMode = Application.Current?.RequestedTheme == AppTheme.Dark;
if (value is int index)
{
if (isDarkMode)
{
return index % 2 == 0 ? Color.FromArgb("#1E1E1E") : Color.FromArgb("#2A2A2A");
}
return index % 2 == 0 ? Colors.White : Color.FromArgb("#F5F5F5");
}
return Colors.White;
return isDarkMode ? Color.FromArgb("#1E1E1E") : Colors.White;
}
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
@@ -100,21 +106,25 @@ public class AlternatingRowColorConverter : IValueConverter
}
/// <summary>
/// Converter for completed task text color and indicator color.
/// Converter for completed task text color and indicator color with Light/Dark mode support.
/// </summary>
public class CompletedToColorConverter : IValueConverter
{
// Define colors
private static readonly Color PrimaryColor = Color.FromArgb("#5C6BC0");
// Light theme colors
private static readonly Color AccentColor = Color.FromArgb("#26A69A");
private static readonly Color CompletedColor = Color.FromArgb("#9E9E9E");
private static readonly Color TextPrimary = Color.FromArgb("#212121");
private static readonly Color TextSecondary = Color.FromArgb("#757575");
private static readonly Color TextPrimaryLight = Color.FromArgb("#212121");
private static readonly Color TextSecondaryLight = Color.FromArgb("#757575");
// Dark theme colors
private static readonly Color TextPrimaryDark = Color.FromArgb("#FFFFFF");
private static readonly Color TextSecondaryDark = Color.FromArgb("#B0B0B0");
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
bool isCompleted = value is bool b && b;
string param = parameter as string ?? "";
bool isDarkMode = Application.Current?.RequestedTheme == AppTheme.Dark;
// Indicator bar color
if (param == "indicator")
@@ -122,14 +132,18 @@ public class CompletedToColorConverter : IValueConverter
return isCompleted ? CompletedColor : AccentColor;
}
// Text colors
// Text colors with theme support
if (isCompleted)
{
return CompletedColor;
}
else
{
return param == "notes" ? TextSecondary : TextPrimary;
if (param == "notes")
{
return isDarkMode ? TextSecondaryDark : TextSecondaryLight;
}
return isDarkMode ? TextPrimaryDark : TextPrimaryLight;
}
}

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#FFFFFF" d="M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z"/></svg>

After

Width:  |  Height:  |  Size: 178 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#FFFFFF" d="M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm400-600H280v520h400v-520ZM360-280h80v-360h-80v360Zm160 0h80v-360h-80v360ZM280-720v520-520Z"/></svg>

After

Width:  |  Height:  |  Size: 315 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#FFFFFF" d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg>

After

Width:  |  Height:  |  Size: 174 B

View File

@@ -9,7 +9,11 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="OpenMaui.Controls.Linux" Version="1.0.0-preview.*" />
<ProjectReference Include="../../maui-linux/OpenMaui.Controls.Linux.csproj" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Images\*.svg" />
</ItemGroup>
</Project>

View File

@@ -1,108 +1,81 @@
using System;
// TodoItem - Data model for a todo item
using System.ComponentModel;
namespace TodoApp;
public class TodoItem : INotifyPropertyChanged
{
private string _title = "";
private string _title = "";
private string _notes = "";
private bool _isCompleted;
private DateTime _dueDate;
private string _notes = "";
public int Id { get; set; }
private bool _isCompleted;
/// <summary>
/// Index in the collection for alternating row colors.
/// </summary>
public int Index { get; set; }
private DateTime _dueDate;
public string Title
{
get => _title;
set
{
if (_title != value)
{
_title = value;
OnPropertyChanged(nameof(Title));
}
}
}
private int _index;
public string Notes
{
get => _notes;
set
{
if (_notes != value)
{
_notes = value;
OnPropertyChanged(nameof(Notes));
}
}
}
public int Id { get; set; }
public bool IsCompleted
{
get => _isCompleted;
set
{
if (_isCompleted != value)
{
_isCompleted = value;
OnPropertyChanged(nameof(IsCompleted));
}
}
}
public int Index
{
get
{
return _index;
}
set
{
if (_index != value)
{
_index = value;
OnPropertyChanged("Index");
}
}
}
public DateTime DueDate
{
get => _dueDate;
set
{
if (_dueDate != value)
{
_dueDate = value;
OnPropertyChanged(nameof(DueDate));
}
}
}
public string Title
{
get
{
return _title;
}
set
{
if (_title != value)
{
_title = value;
OnPropertyChanged("Title");
}
}
}
public DateTime CreatedAt { get; set; } = DateTime.Now;
public string Notes
{
get
{
return _notes;
}
set
{
if (_notes != value)
{
_notes = value;
OnPropertyChanged("Notes");
}
}
}
public event PropertyChangedEventHandler? PropertyChanged;
public bool IsCompleted
{
get
{
return _isCompleted;
}
set
{
if (_isCompleted != value)
{
_isCompleted = value;
OnPropertyChanged("IsCompleted");
}
}
}
public DateTime DueDate
{
get
{
return _dueDate;
}
set
{
if (_dueDate != value)
{
_dueDate = value;
OnPropertyChanged("DueDate");
}
}
}
public DateTime CreatedAt { get; set; } = DateTime.Now;
public event PropertyChangedEventHandler? PropertyChanged;
protected void OnPropertyChanged(string propertyName)
{
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
protected void OnPropertyChanged(string propertyName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}

View File

@@ -1,59 +1,61 @@
using System;
// TodoService - Manages todo items
using System.Collections.ObjectModel;
using System.Linq;
namespace TodoApp;
public class TodoService
{
private static TodoService? _instance;
private static TodoService? _instance;
public static TodoService Instance => _instance ??= new TodoService();
private int _nextId = 1;
private int _nextId = 1;
public static TodoService Instance => _instance ?? (_instance = new TodoService());
public ObservableCollection<TodoItem> Todos { get; } = new();
public ObservableCollection<TodoItem> Todos { get; } = new ObservableCollection<TodoItem>();
private TodoService()
{
// Add sample todos with varying lengths to test MaxLines=2 with ellipsis
AddTodo("Learn OpenMaui Linux", "Explore the SkiaSharp-based rendering engine for .NET MAUI on Linux desktop. This is a very long description that should wrap to multiple lines and demonstrate the ellipsis truncation feature when MaxLines is set to 2.");
AddTodo("Build amazing apps", "Create cross-platform applications that run on Windows, macOS, iOS, Android, and Linux! With OpenMaui, you can write once and deploy everywhere.");
AddTodo("Share with the community", "Contribute to the open-source project and help others build great Linux apps. Join our growing community of developers who are passionate about bringing .NET MAUI to Linux.");
}
public int CompletedCount => Todos.Count((TodoItem t) => t.IsCompleted);
public TodoItem AddTodo(string title, string notes = "")
{
var todo = new TodoItem
{
Id = _nextId++,
Index = Todos.Count, // Set index for alternating row colors
Title = title,
Notes = notes,
DueDate = DateTime.Today.AddDays(7)
};
Todos.Add(todo);
return todo;
}
public int TotalCount => Todos.Count;
/// <summary>
/// Refreshes the Index property on all items for alternating row colors.
/// </summary>
public void RefreshIndexes()
{
for (int i = 0; i < Todos.Count; i++)
{
Todos[i].Index = i;
}
}
private TodoService()
{
AddTodo("Learn OpenMaui Linux", "Explore the SkiaSharp-based rendering engine for .NET MAUI on Linux desktop. This is a very long description that should wrap to multiple lines and demonstrate the ellipsis truncation feature when MaxLines is set to 2.");
AddTodo("Build amazing apps", "Create cross-platform applications that run on Windows, macOS, iOS, Android, and Linux! With OpenMaui, you can write once and deploy everywhere.");
AddTodo("Share with the community", "Contribute to the open-source project and help others build great Linux apps. Join our growing community of developers who are passionate about bringing .NET MAUI to Linux.");
}
public TodoItem? GetTodo(int id)
{
return Todos.FirstOrDefault(t => t.Id == id);
}
public TodoItem AddTodo(string title, string notes = "")
{
TodoItem todoItem = new TodoItem
{
Id = _nextId++,
Index = Todos.Count,
Title = title,
Notes = notes,
DueDate = DateTime.Today.AddDays(7.0)
};
Todos.Add(todoItem);
return todoItem;
}
public void DeleteTodo(TodoItem todo)
{
Todos.Remove(todo);
}
public void RefreshIndexes()
{
for (int i = 0; i < Todos.Count; i++)
{
Todos[i].Index = i;
}
}
public TodoItem? GetTodo(int id)
{
return Todos.FirstOrDefault((TodoItem t) => t.Id == id);
}
public void DeleteTodo(TodoItem todo)
{
Todos.Remove(todo);
}
public int CompletedCount => Todos.Count(t => t.IsCompleted);
public int TotalCount => Todos.Count;
}

71
WebViewDemo/App.xaml Normal file
View File

@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="WebViewDemo.App">
<Application.Resources>
<ResourceDictionary>
<!-- Primary Brand Colors -->
<Color x:Key="PrimaryColor">#5C6BC0</Color>
<Color x:Key="PrimaryDarkColor">#3949AB</Color>
<Color x:Key="AccentColor">#26A69A</Color>
<Color x:Key="ButtonColor">#667EEA</Color>
<!-- Light Theme Colors -->
<Color x:Key="PageBackgroundLight">#F5F7FA</Color>
<Color x:Key="CardBackgroundLight">#FFFFFF</Color>
<Color x:Key="TextPrimaryLight">#212121</Color>
<Color x:Key="TextSecondaryLight">#757575</Color>
<Color x:Key="BorderLight">#E0E0E0</Color>
<!-- Dark Theme Colors -->
<Color x:Key="PageBackgroundDark">#121212</Color>
<Color x:Key="CardBackgroundDark">#1E1E1E</Color>
<Color x:Key="TextPrimaryDark">#FFFFFF</Color>
<Color x:Key="TextSecondaryDark">#B0B0B0</Color>
<Color x:Key="BorderDark">#424242</Color>
<!-- Navigation Bar Colors -->
<Color x:Key="NavBarBackgroundLight">#5C6BC0</Color>
<Color x:Key="NavBarBackgroundDark">#3949AB</Color>
<!-- Themed Styles -->
<Style x:Key="ThemedCard" TargetType="Border">
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource CardBackgroundLight}, Dark={StaticResource CardBackgroundDark}}" />
<Setter Property="StrokeThickness" Value="0" />
<Setter Property="Padding" Value="12" />
<Setter Property="StrokeShape">
<Setter.Value>
<RoundRectangle CornerRadius="8" />
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ThemedEntry" TargetType="Entry">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
<Setter Property="BackgroundColor" Value="Transparent" />
</Style>
<Style x:Key="NavButton" TargetType="Button">
<Setter Property="BackgroundColor" Value="{StaticResource ButtonColor}" />
<Setter Property="TextColor" Value="White" />
<Setter Property="HeightRequest" Value="36" />
<Setter Property="FontSize" Value="13" />
</Style>
<Style x:Key="PrimaryButton" TargetType="Button">
<Setter Property="BackgroundColor" Value="{StaticResource PrimaryColor}" />
<Setter Property="TextColor" Value="White" />
<Setter Property="HeightRequest" Value="36" />
<Setter Property="FontSize" Value="13" />
</Style>
<Style x:Key="AccentButton" TargetType="Button">
<Setter Property="BackgroundColor" Value="{StaticResource AccentColor}" />
<Setter Property="TextColor" Value="White" />
<Setter Property="HeightRequest" Value="36" />
<Setter Property="FontSize" Value="13" />
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>

35
WebViewDemo/App.xaml.cs Normal file
View File

@@ -0,0 +1,35 @@
// App.xaml.cs - Main Application with NavigationPage and Theme Support
using Microsoft.Maui.Controls;
namespace WebViewDemo;
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 WebViewPage())
{
Title = "OpenMaui WebView Demo",
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;
}
}

View File

@@ -0,0 +1,22 @@
// MauiProgram.cs - MAUI app configuration
using Microsoft.Maui.Hosting;
using Microsoft.Maui.Platform.Linux.Hosting;
namespace WebViewDemo;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
// Configure the app
builder.UseMauiApp<App>();
// Add Linux platform support with all handlers
builder.UseLinux();
return builder.Build();
}
}

View File

@@ -0,0 +1,148 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="WebViewDemo.WebViewPage"
Title="WebView Demo"
BackgroundColor="{AppThemeBinding Light={StaticResource PageBackgroundLight}, Dark={StaticResource PageBackgroundDark}}">
<Grid RowDefinitions="Auto,Auto,Auto,*,Auto,Auto" Padding="16" RowSpacing="12">
<!-- Header -->
<Label Grid.Row="0"
Text="WebView Demo - WebKitGTK"
FontSize="22"
FontAttributes="Bold"
TextColor="{StaticResource PrimaryColor}"
HorizontalOptions="Center" />
<!-- Navigation Bar -->
<Border Grid.Row="1"
BackgroundColor="{AppThemeBinding Light={StaticResource CardBackgroundLight}, Dark={StaticResource CardBackgroundDark}}"
StrokeThickness="0"
Padding="12">
<Border.StrokeShape>
<RoundRectangle CornerRadius="8" />
</Border.StrokeShape>
<HorizontalStackLayout Spacing="12" HorizontalOptions="Center">
<ImageButton x:Name="BackButton"
Source="{AppThemeBinding Light=arrow_back_light.svg, Dark=arrow_back_dark.svg}"
WidthRequest="44"
HeightRequest="44"
Padding="10"
BackgroundColor="{StaticResource ButtonColor}"
CornerRadius="8"
Clicked="OnBackClicked" />
<ImageButton x:Name="ForwardButton"
Source="{AppThemeBinding Light=arrow_forward_light.svg, Dark=arrow_forward_dark.svg}"
WidthRequest="44"
HeightRequest="44"
Padding="10"
BackgroundColor="{StaticResource ButtonColor}"
CornerRadius="8"
Clicked="OnForwardClicked" />
<ImageButton x:Name="ReloadButton"
Source="{AppThemeBinding Light=refresh_light.svg, Dark=refresh_dark.svg}"
WidthRequest="44"
HeightRequest="44"
Padding="10"
BackgroundColor="{StaticResource ButtonColor}"
CornerRadius="8"
Clicked="OnReloadClicked" />
</HorizontalStackLayout>
</Border>
<!-- URL Bar -->
<Border Grid.Row="2"
BackgroundColor="{AppThemeBinding Light={StaticResource CardBackgroundLight}, Dark={StaticResource CardBackgroundDark}}"
StrokeThickness="0"
Padding="12">
<Border.StrokeShape>
<RoundRectangle CornerRadius="8" />
</Border.StrokeShape>
<Grid ColumnDefinitions="*,Auto" ColumnSpacing="8">
<Entry x:Name="UrlEntry"
Grid.Column="0"
Placeholder="Enter URL..."
Text="https://dotnet.microsoft.com"
FontSize="14"
TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}"
PlaceholderColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}"
VerticalOptions="Center"
Completed="OnUrlSubmitted" />
<ImageButton x:Name="GoButton"
Grid.Column="1"
Source="{AppThemeBinding Light=send_light.svg, Dark=send_dark.svg}"
WidthRequest="44"
HeightRequest="44"
Padding="10"
BackgroundColor="{StaticResource AccentColor}"
CornerRadius="8"
Clicked="OnGoClicked" />
</Grid>
</Border>
<!-- WebView -->
<Border Grid.Row="3"
BackgroundColor="{AppThemeBinding Light={StaticResource CardBackgroundLight}, Dark={StaticResource CardBackgroundDark}}"
StrokeThickness="1"
Stroke="{AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource BorderDark}}">
<Border.StrokeShape>
<RoundRectangle CornerRadius="8" />
</Border.StrokeShape>
<WebView x:Name="MainWebView"
VerticalOptions="Fill"
HorizontalOptions="Fill"
Navigating="OnNavigating"
Navigated="OnNavigated" />
</Border>
<!-- Action Buttons -->
<Border Grid.Row="4"
BackgroundColor="{AppThemeBinding Light={StaticResource CardBackgroundLight}, Dark={StaticResource CardBackgroundDark}}"
StrokeThickness="0"
Padding="12">
<Border.StrokeShape>
<RoundRectangle CornerRadius="8" />
</Border.StrokeShape>
<HorizontalStackLayout Spacing="12" HorizontalOptions="Center">
<ImageButton x:Name="LoadHtmlButton"
Source="{AppThemeBinding Light=code_light.svg, Dark=code_dark.svg}"
WidthRequest="44"
HeightRequest="44"
Padding="10"
BackgroundColor="{StaticResource PrimaryColor}"
CornerRadius="8"
Clicked="OnLoadHtmlClicked" />
<ImageButton x:Name="EvalJsButton"
Source="{AppThemeBinding Light=play_arrow_light.svg, Dark=play_arrow_dark.svg}"
WidthRequest="44"
HeightRequest="44"
Padding="10"
BackgroundColor="{StaticResource PrimaryColor}"
CornerRadius="8"
Clicked="OnEvalJsClicked" />
</HorizontalStackLayout>
</Border>
<!-- Status Bar -->
<Border Grid.Row="5"
BackgroundColor="{StaticResource PrimaryDarkColor}"
StrokeThickness="0"
Padding="12,8">
<Border.StrokeShape>
<RoundRectangle CornerRadius="6" />
</Border.StrokeShape>
<Label x:Name="StatusLabel"
Text="Ready"
FontSize="13"
TextColor="White"
HorizontalOptions="Center" />
</Border>
</Grid>
</ContentPage>

View File

@@ -0,0 +1,178 @@
// WebViewPage - Main page demonstrating WebView with WebKitGTK
using Microsoft.Maui.Controls;
namespace WebViewDemo;
public partial class WebViewPage : ContentPage
{
public WebViewPage()
{
Console.WriteLine("[WebViewPage] Constructor starting");
InitializeComponent();
// Set initial URL
MainWebView.Source = new UrlWebViewSource { Url = "https://dotnet.microsoft.com" };
Console.WriteLine("[WebViewPage] Constructor finished");
}
private void OnBackClicked(object? sender, EventArgs e)
{
Console.WriteLine("[WebViewPage] Back button clicked");
if (MainWebView.CanGoBack)
{
MainWebView.GoBack();
}
}
private void OnForwardClicked(object? sender, EventArgs e)
{
Console.WriteLine("[WebViewPage] Forward button clicked");
if (MainWebView.CanGoForward)
{
MainWebView.GoForward();
}
}
private void OnReloadClicked(object? sender, EventArgs e)
{
Console.WriteLine("[WebViewPage] Reload button clicked");
MainWebView.Reload();
}
private void OnGoClicked(object? sender, EventArgs e)
{
Navigate();
}
private void OnUrlSubmitted(object? sender, EventArgs e)
{
Navigate();
}
private void Navigate()
{
var url = UrlEntry.Text?.Trim();
if (string.IsNullOrEmpty(url))
return;
// Add https:// if not present
if (!url.StartsWith("http://") && !url.StartsWith("https://"))
url = "https://" + url;
Console.WriteLine($"[WebViewPage] Navigating to: {url}");
MainWebView.Source = new UrlWebViewSource { Url = url };
UrlEntry.Text = url;
}
private void OnNavigating(object? sender, WebNavigatingEventArgs e)
{
StatusLabel.Text = $"Loading: {e.Url}";
Console.WriteLine($"[WebViewPage] Navigating to: {e.Url}");
}
private void OnNavigated(object? sender, WebNavigatedEventArgs e)
{
StatusLabel.Text = e.Result == WebNavigationResult.Success
? $"Loaded: {e.Url}"
: $"Failed: {e.Result}";
UrlEntry.Text = e.Url;
Console.WriteLine($"[WebViewPage] Navigated: {e.Result} - {e.Url}");
}
private void OnLoadHtmlClicked(object? sender, EventArgs e)
{
Console.WriteLine("[WebViewPage] Load HTML button clicked");
var html = @"
<!DOCTYPE html>
<html>
<head>
<title>OpenMaui WebView</title>
<style>
body {
font-family: 'Segoe UI', Arial, sans-serif;
margin: 40px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
min-height: 100vh;
}
h1 {
font-size: 2.5em;
margin-bottom: 20px;
}
p {
font-size: 1.2em;
line-height: 1.6;
}
.feature-list {
background: rgba(255,255,255,0.1);
padding: 20px;
border-radius: 10px;
margin-top: 20px;
}
li {
margin: 10px 0;
font-size: 1.1em;
}
button {
background: #4CAF50;
color: white;
border: none;
padding: 15px 30px;
font-size: 1.1em;
border-radius: 5px;
cursor: pointer;
margin-top: 20px;
}
button:hover {
background: #45a049;
}
</style>
</head>
<body>
<h1>Hello from OpenMaui Linux!</h1>
<p>This HTML content is rendered by WebKitGTK inside your .NET MAUI application.</p>
<div class='feature-list'>
<h2>WebView Features:</h2>
<ul>
<li>Full HTML5 support</li>
<li>CSS3 animations and transitions</li>
<li>JavaScript execution</li>
<li>Navigation history (back/forward)</li>
<li>WebGL and canvas support</li>
</ul>
</div>
<button onclick=""alert('Hello from JavaScript!')"">Click Me!</button>
<p style='margin-top: 30px; opacity: 0.8;'>
Powered by WebKitGTK - the same engine used by GNOME Web (Epiphany)
</p>
</body>
</html>";
MainWebView.Source = new HtmlWebViewSource { Html = html };
StatusLabel.Text = "Loaded custom HTML";
}
private async void OnEvalJsClicked(object? sender, EventArgs e)
{
Console.WriteLine("[WebViewPage] Run JS button clicked");
try
{
var result = await MainWebView.EvaluateJavaScriptAsync("document.title");
StatusLabel.Text = $"JS Result: {result ?? "(null)"}";
Console.WriteLine($"[WebViewPage] JS Eval result: {result}");
}
catch (Exception ex)
{
StatusLabel.Text = $"JS Error: {ex.Message}";
Console.WriteLine($"[WebViewPage] JS Error: {ex.Message}");
}
}
}

67
WebViewDemo/Program.cs Normal file
View File

@@ -0,0 +1,67 @@
// Program.cs - Linux platform entry point
using Microsoft.Maui.Platform.Linux;
namespace WebViewDemo;
class Program
{
static void Main(string[] args)
{
// Redirect console output to a log file for debugging
var logPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "webviewdemo.log");
using var logWriter = new StreamWriter(logPath, append: false) { AutoFlush = true };
var multiWriter = new MultiTextWriter(Console.Out, logWriter);
Console.SetOut(multiWriter);
Console.SetError(multiWriter);
// Global exception handler
AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
{
var ex = e.ExceptionObject as Exception;
Console.WriteLine($"[FATAL] Unhandled exception: {ex?.GetType().Name}: {ex?.Message}");
Console.WriteLine($"[FATAL] Stack trace: {ex?.StackTrace}");
if (ex?.InnerException != null)
{
Console.WriteLine($"[FATAL] Inner exception: {ex.InnerException.GetType().Name}: {ex.InnerException.Message}");
Console.WriteLine($"[FATAL] Inner stack trace: {ex.InnerException.StackTrace}");
}
};
TaskScheduler.UnobservedTaskException += (sender, e) =>
{
Console.WriteLine($"[FATAL] Unobserved task exception: {e.Exception?.GetType().Name}: {e.Exception?.Message}");
Console.WriteLine($"[FATAL] Stack trace: {e.Exception?.StackTrace}");
e.SetObserved(); // Prevent crash
};
Console.WriteLine($"[Program] Starting WebView Demo at {DateTime.Now}");
Console.WriteLine($"[Program] Log file: {logPath}");
try
{
// Create the MAUI app with all handlers registered
var app = MauiProgram.CreateMauiApp();
// Run on Linux platform
LinuxApplication.Run(app, args);
}
catch (Exception ex)
{
Console.WriteLine($"[FATAL] Exception in Main: {ex.GetType().Name}: {ex.Message}");
Console.WriteLine($"[FATAL] Stack trace: {ex.StackTrace}");
throw;
}
}
}
// Helper to write to both console and file
class MultiTextWriter : TextWriter
{
private readonly TextWriter[] _writers;
public MultiTextWriter(params TextWriter[] writers) => _writers = writers;
public override System.Text.Encoding Encoding => System.Text.Encoding.UTF8;
public override void Write(char value) { foreach (var w in _writers) w.Write(value); }
public override void WriteLine(string? value) { foreach (var w in _writers) w.WriteLine(value); }
public override void Flush() { foreach (var w in _writers) w.Flush(); }
}

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#FFFFFF" d="m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"/></svg>

After

Width:  |  Height:  |  Size: 185 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#212121" d="m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"/></svg>

After

Width:  |  Height:  |  Size: 185 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#FFFFFF" d="M647-440H160v-80h487L423-744l57-56 320 320-320 320-57-56 224-224Z"/></svg>

After

Width:  |  Height:  |  Size: 186 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#212121" d="M647-440H160v-80h487L423-744l57-56 320 320-320 320-57-56 224-224Z"/></svg>

After

Width:  |  Height:  |  Size: 186 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#FFFFFF" d="M320-240 80-480l240-240 57 57-184 184 183 183-56 56Zm320 0-57-57 184-184-183-183 56-56 240 240-240 240Z"/></svg>

After

Width:  |  Height:  |  Size: 224 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#212121" d="M320-240 80-480l240-240 57 57-184 184 183 183-56 56Zm320 0-57-57 184-184-183-183 56-56 240 240-240 240Z"/></svg>

After

Width:  |  Height:  |  Size: 224 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#FFFFFF" d="M320-200v-560l440 280-440 280Zm80-280Zm0 134 210-134-210-134v268Z"/></svg>

After

Width:  |  Height:  |  Size: 186 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#212121" d="M320-200v-560l440 280-440 280Zm80-280Zm0 134 210-134-210-134v268Z"/></svg>

After

Width:  |  Height:  |  Size: 186 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#FFFFFF" d="M480-160q-134 0-227-93t-93-227q0-134 93-227t227-93q69 0 132 28.5T720-690v-110h80v280H520v-80h168q-32-56-87.5-88T480-720q-100 0-170 70t-70 170q0 100 70 170t170 70q77 0 139-44t87-116h84q-28 106-114 173t-196 67Z"/></svg>

After

Width:  |  Height:  |  Size: 329 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#212121" d="M480-160q-134 0-227-93t-93-227q0-134 93-227t227-93q69 0 132 28.5T720-690v-110h80v280H520v-80h168q-32-56-87.5-88T480-720q-100 0-170 70t-70 170q0 100 70 170t170 70q77 0 139-44t87-116h84q-28 106-114 173t-196 67Z"/></svg>

After

Width:  |  Height:  |  Size: 329 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#FFFFFF" d="M120-160v-640l760 320-760 320Zm80-120 474-200-474-200v140l240 60-240 60v140Zm0 0v-400 400Z"/></svg>

After

Width:  |  Height:  |  Size: 211 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#212121" d="M120-160v-640l760 320-760 320Zm80-120 474-200-474-200v140l240 60-240 60v140Zm0 0v-400 400Z"/></svg>

After

Width:  |  Height:  |  Size: 211 B

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../maui-linux/OpenMaui.Controls.Linux.csproj" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Images\*.svg" />
</ItemGroup>
</Project>

Some files were not shown because too many files have changed in this diff Show More