Add new type files from decompiled source

- FlexDirection, FlexWrap, FlexJustify, FlexAlignItems, FlexAlignContent, FlexAlignSelf enums
- FlexBasis struct for flex layout
- ContextMenuItem class for context menus
- ISkiaQueryAttributable interface for shell navigation
- SkiaTextSpan class for formatted text

These types support FlexLayout, context menus, and text formatting.
Other types (event args, enums, etc.) were already defined inline in View files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-01 10:07:57 -05:00
parent 1e84c6168a
commit d0d8e92dad
11 changed files with 549 additions and 0 deletions

32
Types/ContextMenuItem.cs Normal file
View File

@@ -0,0 +1,32 @@
using System;
namespace Microsoft.Maui.Platform;
public class ContextMenuItem
{
public string Text { get; }
public Action? Action { get; }
public bool IsEnabled { get; }
public bool IsSeparator { get; }
public static ContextMenuItem Separator => new ContextMenuItem();
public ContextMenuItem(string text, Action? action, bool isEnabled = true)
{
Text = text;
Action = action;
IsEnabled = isEnabled;
IsSeparator = false;
}
private ContextMenuItem()
{
Text = "";
Action = null;
IsEnabled = false;
IsSeparator = true;
}
}

11
Types/FlexAlignContent.cs Normal file
View File

@@ -0,0 +1,11 @@
namespace Microsoft.Maui.Platform;
public enum FlexAlignContent
{
Start,
Center,
End,
Stretch,
SpaceBetween,
SpaceAround
}

9
Types/FlexAlignItems.cs Normal file
View File

@@ -0,0 +1,9 @@
namespace Microsoft.Maui.Platform;
public enum FlexAlignItems
{
Start,
Center,
End,
Stretch
}

10
Types/FlexAlignSelf.cs Normal file
View File

@@ -0,0 +1,10 @@
namespace Microsoft.Maui.Platform;
public enum FlexAlignSelf
{
Auto,
Start,
Center,
End,
Stretch
}

26
Types/FlexBasis.cs Normal file
View File

@@ -0,0 +1,26 @@
namespace Microsoft.Maui.Platform;
public struct FlexBasis
{
public bool IsAuto { get; }
public float Length { get; }
public static FlexBasis Auto => new FlexBasis(isAuto: true, 0f);
private FlexBasis(bool isAuto, float length)
{
IsAuto = isAuto;
Length = length;
}
public static FlexBasis FromLength(float length)
{
return new FlexBasis(isAuto: false, length);
}
public static implicit operator FlexBasis(float length)
{
return FromLength(length);
}
}

9
Types/FlexDirection.cs Normal file
View File

@@ -0,0 +1,9 @@
namespace Microsoft.Maui.Platform;
public enum FlexDirection
{
Row,
RowReverse,
Column,
ColumnReverse
}

11
Types/FlexJustify.cs Normal file
View File

@@ -0,0 +1,11 @@
namespace Microsoft.Maui.Platform;
public enum FlexJustify
{
Start,
Center,
End,
SpaceBetween,
SpaceAround,
SpaceEvenly
}

8
Types/FlexWrap.cs Normal file
View File

@@ -0,0 +1,8 @@
namespace Microsoft.Maui.Platform;
public enum FlexWrap
{
NoWrap,
Wrap,
WrapReverse
}

View File

@@ -0,0 +1,8 @@
using System.Collections.Generic;
namespace Microsoft.Maui.Platform;
public interface ISkiaQueryAttributable
{
void ApplyQueryAttributes(IDictionary<string, object> query);
}

28
Types/SkiaTextSpan.cs Normal file
View File

@@ -0,0 +1,28 @@
using SkiaSharp;
namespace Microsoft.Maui.Platform;
public class SkiaTextSpan
{
public string Text { get; set; } = "";
public SKColor? TextColor { get; set; }
public SKColor? BackgroundColor { get; set; }
public string? FontFamily { get; set; }
public float FontSize { get; set; }
public bool IsBold { get; set; }
public bool IsItalic { get; set; }
public bool IsUnderline { get; set; }
public bool IsStrikethrough { get; set; }
public float CharacterSpacing { get; set; }
public float LineHeight { get; set; } = 1f;
}