Enable Copy and Cut in ContextMenu for AutoCompleteBox
What does the pull request do?
Enable Copy and Cut in ContextMenu for AutoCompleteBox
What is the current behavior?
What is the updated/expected behavior with this PR?
How was the solution implemented (if it's not obvious)?
Check if ContextMenu or ContextFlyout is open on lostfocus.
Checklist
- [ ] Added unit tests (if possible)?
- [x] Added XML documentation to any related classes?
- [ ] Consider submitting a PR to https://github.com/AvaloniaUI/avalonia-docs with user documentation
Breaking changes
Obsoletions / Deprecations
Fixed issues
You can test this PR using the following package version. 12.0.999-cibuild0057135-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
- [x] All contributors have signed the CLA.
@cla-avalonia agree
You can test this PR using the following package version. 12.0.999-cibuild0057171-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
You can test this PR using the following package version. 12.0.999-cibuild0057193-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
Please provide more information on what the current behavior is and why there needs to be a change. Better if you can also make an issue for it.
Thanks! I've also updated the PR description to reflect the current behavior and the reason for the change. Issue is here: #19117
New public API for review:
namespace Avalonia.Controls
{
public class AutoCompleteBox
{
+ public static readonly StyledProperty<bool> ClearSelectionOnLostFocusProperty;
+ public bool ClearSelectionOnLostFocus { get; set; }
}
}
You can test this PR using the following package version. 12.0.999-cibuild0058161-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
The API already exists on TextBox and has been accepted as is.