Initial samples: TodoApp and ShellDemo
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>
This commit is contained in:
81
TodoApp/TodoItem.cs
Normal file
81
TodoApp/TodoItem.cs
Normal file
@@ -0,0 +1,81 @@
|
||||
// TodoItem - Data model for a todo item
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace TodoApp;
|
||||
|
||||
public class TodoItem : INotifyPropertyChanged
|
||||
{
|
||||
private string _title = "";
|
||||
private string _notes = "";
|
||||
private bool _isCompleted;
|
||||
private DateTime _dueDate;
|
||||
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Index in the collection for alternating row colors.
|
||||
/// </summary>
|
||||
public int Index { get; set; }
|
||||
|
||||
public string Title
|
||||
{
|
||||
get => _title;
|
||||
set
|
||||
{
|
||||
if (_title != value)
|
||||
{
|
||||
_title = value;
|
||||
OnPropertyChanged(nameof(Title));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string Notes
|
||||
{
|
||||
get => _notes;
|
||||
set
|
||||
{
|
||||
if (_notes != value)
|
||||
{
|
||||
_notes = value;
|
||||
OnPropertyChanged(nameof(Notes));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsCompleted
|
||||
{
|
||||
get => _isCompleted;
|
||||
set
|
||||
{
|
||||
if (_isCompleted != value)
|
||||
{
|
||||
_isCompleted = value;
|
||||
OnPropertyChanged(nameof(IsCompleted));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime DueDate
|
||||
{
|
||||
get => _dueDate;
|
||||
set
|
||||
{
|
||||
if (_dueDate != value)
|
||||
{
|
||||
_dueDate = value;
|
||||
OnPropertyChanged(nameof(DueDate));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime CreatedAt { get; set; } = DateTime.Now;
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
protected void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user