Open erezklr opened 11 months ago
Could you explain what you're trying to achieve and in what context?
Hi @erezklr. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
A few years ago I wrote a helper systemin WPF to help with academic research. Among the rest of the features was the ability to directly copy information that the researcher transferred to the clipboard, This information could be text, images, or RTF. I want to convert it to MAUI but I can't because I lack this ability, you can only take text from the clipboard. Attach sample code from WPF: if (!IsClipboardEmpty()) { IDataObject data_object = Clipboard.GetDataObject();
if (data_object.GetDataPresent(DataFormats.Bitmap))
{
}
else if (data_object.GetDataPresent(DataFormats.Rtf))
{
var rtfText = Clipboard.GetText(TextDataFormat.Rtf).ToString();
}
}
else if (data_object.GetDataPresent(DataFormats.Html))
{
try
{
data = data_object.GetData(DataFormats.Html).ToString();
}
else if (data_object.GetDataPresent(DataFormats.Text))
{
string str = data_object.GetData(DataFormats.Text).ToString();
}
Looks like an issue to be transferred to dotnet/maui.
The essentials API for Clipboard is limited to strings, and is called out in the docs. The platforms MAUI targets don't all have the same feature set as what WPF offers, so I doubt there could be a consistent way to offer the same functionality through a cross-platform API. As it stands, for this API, it's not a bug.
@mattleibow what do you think?
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
No response
Describe the solution you'd like
Receive from the clipboard not only text but also images, RTF and HTML and all the other objects it allows
Additional context
No response