Browse Source
Merge pull request #6430 from wieslawsoltes/BoolConvertersNot
Add Not value converter to BoolConverters
pull/6456/head
Max Katz
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
0 deletions
-
src/Avalonia.Base/Data/Converters/BoolConverters.cs
|
|
|
@ -18,5 +18,11 @@ namespace Avalonia.Data.Converters |
|
|
|
/// </summary>
|
|
|
|
public static readonly IMultiValueConverter Or = |
|
|
|
new FuncMultiValueConverter<bool, bool>(x => x.Any(y => y)); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// A value converter that returns true when input is false and false when input is true.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly IValueConverter Not = |
|
|
|
new FuncValueConverter<bool, bool>(x => !x); |
|
|
|
} |
|
|
|
} |
|
|
|
|