committed by
GitHub
7 changed files with 56 additions and 20 deletions
@ -1,16 +1,31 @@ |
|||
This template is not intended to be prescriptive, but to help us review pull requests it would be useful if you included as much of the following information as possible: |
|||
## What does the pull request do? |
|||
|
|||
- What does the pull request do? |
|||
- What is the current behavior? |
|||
- What is the updated/expected behavior with this PR? |
|||
- How was the solution implemented (if it's not obvious)? |
|||
Give a bit of background on the PR here, together with links to with related issues etc. |
|||
|
|||
Checklist: |
|||
## What is the current behavior? |
|||
|
|||
If the PR is a fix, describe the current incorrect behavior, otherwise delete this section. |
|||
|
|||
## What is the updated/expected behavior with this PR? |
|||
|
|||
Describe how to test the PR. |
|||
|
|||
## How was the solution implemented (if it's not obvious)? |
|||
|
|||
Include any information that might be of use to a reviewer here. |
|||
|
|||
## Checklist |
|||
|
|||
- [ ] Added unit tests (if possible)? |
|||
- [ ] Added XML documentation to any related classes? |
|||
- [ ] Consider submitting a PR to https://github.com/AvaloniaUI/Avaloniaui.net with user documentation |
|||
|
|||
## Breaking changes |
|||
|
|||
List any breaking changes here. When the PR is merged please add an entry to https://github.com/AvaloniaUI/Avalonia/wiki/Breaking-Changes |
|||
|
|||
## Fixed issues |
|||
|
|||
If the pull request fixes issue(s) list them like this: |
|||
|
|||
Fixes #123 |
|||
|
|||
@ -0,0 +1,24 @@ |
|||
// Copyright (c) The Avalonia Project. All rights reserved.
|
|||
// Licensed under the MIT license. See licence.md file in the project root for full license information.
|
|||
|
|||
|
|||
namespace Avalonia.Data.Converters |
|||
{ |
|||
/// <summary>
|
|||
/// Provides a set of useful <see cref="IValueConverter"/>s for working with objects.
|
|||
/// </summary>
|
|||
public static class ObjectConverters |
|||
{ |
|||
/// <summary>
|
|||
/// A value converter that returns true if the input object is a null reference.
|
|||
/// </summary>
|
|||
public static readonly IValueConverter IsNull = |
|||
new FuncValueConverter<object, bool>(x => x is null); |
|||
|
|||
/// <summary>
|
|||
/// A value converter that returns true if the input object is not null.
|
|||
/// </summary>
|
|||
public static readonly IValueConverter IsNotNull = |
|||
new FuncValueConverter<object, bool>(x => !(x is null)); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue