Open YohDeadfall opened 1 year ago
Should be considered as part of https://github.com/AvaloniaUI/Avalonia/issues/11011
Note, that it has to set the clipboard text on every single text selection change. So we'll need to change the way we interact with the clipboard in our TextBox to avoid allocations.
Is your feature request related to a problem? Please describe.
Unix systems have a few types of clipboard buffers: secondary, primary and clipboard. The last one is already supported by Avalonia since it's supported by all platforms. The primary buffer is filled with data on selection and can be pasted through the middle mouse button. That feature is widely supported, so it may be worth to implement it.
Describe the solution you'd like
It requires extending the existing abstraction of the clipboard by providing an enum argument which defaults to the clipboard. If the mode is not supported then
null
is returned. In addition to that there should be a mouse gesture.Describe alternatives you've considered
Keep it as an external package.