Fix exception when setting content to clipboard (#2188)

* Fix exception when setting content to clipboard

* Update
This commit is contained in:
hanzhang54 2024-06-11 20:01:51 +08:00 committed by GitHub
commit d9691038d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -67,7 +67,7 @@ void CopyPasteManager::CopyToClipboard(String ^ stringToCopy)
// Copy the string to the clipboard
auto dataPackage = ref new DataPackage();
dataPackage->SetText(stringToCopy);
Clipboard::SetContent(dataPackage);
Clipboard::SetContentWithOptions(dataPackage, nullptr);
}
IAsyncOperation<String ^> ^ CopyPasteManager::GetStringToPaste(ViewMode mode, CategoryGroupType modeType, NumberBase programmerNumberBase, BitLength bitLengthType)