Two sample applications demonstrating OpenMaui Linux: TodoApp: - Full task manager with NavigationPage - CollectionView with XAML data binding - DisplayAlert dialogs - Grid layouts with star sizing ShellDemo: - Comprehensive control showcase - Shell with flyout navigation - All core MAUI controls demonstrated - Real-time event logging Both samples reference OpenMaui.Controls.Linux via NuGet. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
32 lines
724 B
C#
32 lines
724 B
C#
// NewTodoPage - Create a new todo item
|
|
|
|
using Microsoft.Maui.Controls;
|
|
using Microsoft.Maui.Graphics;
|
|
|
|
namespace TodoApp;
|
|
|
|
public partial class NewTodoPage : ContentPage
|
|
{
|
|
private readonly TodoService _service = TodoService.Instance;
|
|
|
|
public NewTodoPage()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private async void OnSaveClicked(object? sender, EventArgs e)
|
|
{
|
|
var title = TitleEntry.Text?.Trim();
|
|
|
|
if (string.IsNullOrEmpty(title))
|
|
{
|
|
TitleEntry.Placeholder = "Title is required!";
|
|
TitleEntry.PlaceholderColor = Colors.Red;
|
|
return;
|
|
}
|
|
|
|
_service.AddTodo(title, NotesEditor.Text ?? "");
|
|
await Navigation.PopAsync();
|
|
}
|
|
}
|