using System.Reactive; using ReactiveUI; namespace PicView.Core.ViewModels; public class PopUpViewModel : ReactiveObject { public bool IsOpen { get; set => this.RaiseAndSetIfChanged(ref field, value); } // Command to toggle popup public ReactiveCommand TogglePopupCommand { get; } public PopUpViewModel() { TogglePopupCommand = ReactiveCommand.Create(() => { IsOpen = !IsOpen; }); } }