- init: initial think
This commit is contained in:
21
Nebula.Launcher/ViewModels/TestViewModel.cs
Normal file
21
Nebula.Launcher/ViewModels/TestViewModel.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using ReactiveUI;
|
||||
|
||||
namespace Nebula.Launcher.ViewModels;
|
||||
|
||||
public sealed class TestViewModel : ViewModelBase
|
||||
{
|
||||
private string _greeting = "Welcome to Avalonia!";
|
||||
|
||||
public string Greeting
|
||||
{
|
||||
get => _greeting;
|
||||
set => this.RaiseAndSetIfChanged(ref _greeting, value);
|
||||
}
|
||||
|
||||
public void ButtonAction()
|
||||
{
|
||||
Console.WriteLine("HAS");
|
||||
Greeting = "Another greeting from Avalonia";
|
||||
}
|
||||
}
|
||||
7
Nebula.Launcher/ViewModels/ViewModelBase.cs
Normal file
7
Nebula.Launcher/ViewModels/ViewModelBase.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
using ReactiveUI;
|
||||
|
||||
namespace Nebula.Launcher.ViewModels;
|
||||
|
||||
public abstract class ViewModelBase : ReactiveObject
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user