Flow.Launcher/Flow.Launcher.Avalonia/ViewModel/ResultViewModel.cs
Hongtao Zhang 4120407ac3 Add initial Avalonia UI project for migration
Create Flow.Launcher.Avalonia project as foundation for migrating from WPF to Avalonia UI framework.

Key components:
- MainWindow with query box and results list (matching WPF layout)
- ViewModels: MainViewModel, ResultsViewModel, ResultViewModel
- Themes/Base.axaml with converted styles from WPF
- FluentAvaloniaUI for Windows 11 styling
- References existing Core/Infrastructure/Plugin projects

The project builds and runs alongside the existing WPF application.
This is Phase 1 of the incremental migration approach.
2026-01-14 23:01:35 -08:00

30 lines
763 B
C#

using CommunityToolkit.Mvvm.ComponentModel;
using Flow.Launcher.Infrastructure.UserSettings;
namespace Flow.Launcher.Avalonia.ViewModel;
/// <summary>
/// ViewModel for a single result item.
/// </summary>
public partial class ResultViewModel : ObservableObject
{
[ObservableProperty]
private string _title = string.Empty;
[ObservableProperty]
private string _subTitle = string.Empty;
[ObservableProperty]
private string _iconPath = string.Empty;
[ObservableProperty]
private bool _isSelected;
[ObservableProperty]
private Settings? _settings;
// Computed properties for display
public bool ShowIcon => !string.IsNullOrEmpty(IconPath);
public bool ShowSubTitle => !string.IsNullOrEmpty(SubTitle);
}