ShellSelectedConverter.cs 497 B

123456789101112131415161718
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace InABox.Avalonia.Converters
  7. {
  8. public class ShellSelectedConverter : AbstractConverter<IShell, bool>
  9. {
  10. public static ShellSelectedConverter Instance = new ShellSelectedConverter();
  11. protected override bool Convert(IShell? value, object? parameter = null)
  12. {
  13. return value?.Parent?.IsSelected(value) ?? false;
  14. }
  15. }
  16. }