About dialog should have a copy button #1769

Closed
opened 2026-01-30 22:36:00 +00:00 by claunia · 5 comments
Owner

Originally created by @zadjii-msft on GitHub (Jun 19, 2019).

Or just straight up be copyable. There's gotta be a way to do that with UWP.

Originally created by @zadjii-msft on GitHub (Jun 19, 2019). Or just straight up be copyable. There's gotta be a way to do that with UWP.
Author
Owner

@pingzing commented on GitHub (Jun 20, 2019):

Provided you're using TextBlocks, you should just be able to decorate them with the IsTextSelectionEnabled property.

You'll probably need to make fire_and_forget App::_ShowDialog in App.cpp set the title and content of the dialog to be TextBlock controls, rather than just raw strings (which I'm pretty sure ContentDialog wraps up in TextBlocks anyway).

@pingzing commented on GitHub (Jun 20, 2019): Provided you're using TextBlocks, you should just be able to decorate them with the [IsTextSelectionEnabled property](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.textblock.istextselectionenabled#Windows_UI_Xaml_Controls_TextBlock_IsTextSelectionEnabled). You'll probably need to make `fire_and_forget App::_ShowDialog` in `App.cpp` set the title and content of the dialog to be `TextBlock` controls, rather than just raw strings (which I'm pretty sure ContentDialog wraps up in TextBlocks anyway).
Author
Owner

@rbeesley commented on GitHub (Jun 20, 2019):

For older Win32 dialogs, you've been able to copy the dialog with Ctrl-C. You'd see an output in the clipboard something like:

image*

=

---------------------------
Microsoft OneNote
---------------------------
Your work notebooks can't be synced because of a mismatched IT policy. Connect to your corporate network to try again, or contact your IT administrator.
---------------------------
OK   
---------------------------

A common dialog, or something like an About dialog, should have similar capability. If that capability doesn't exist in UWP today, it should be logged as a bug for the framework to support it.

* As it were, this is a dialog I had to create in a .vbs script to log a bug against OneNote, because Office apps don't usually work as they should. However, that being said, I'd like to see Terminal drive getting this capability built into UWP if it doesn't exist today. Any simple dialog, should maintain this very basic functionality.

@rbeesley commented on GitHub (Jun 20, 2019): For older Win32 dialogs, you've been able to copy the dialog with Ctrl-C. You'd see an output in the clipboard something like: ![image](https://user-images.githubusercontent.com/3703112/59872112-dfeb1080-934d-11e9-9edf-6f734c120407.png)* = ``` --------------------------- Microsoft OneNote --------------------------- Your work notebooks can't be synced because of a mismatched IT policy. Connect to your corporate network to try again, or contact your IT administrator. --------------------------- OK --------------------------- ``` A common dialog, or something like an About dialog, should have similar capability. If that capability doesn't exist in UWP today, it should be logged as a bug for the framework to support it. \* As it were, this is a dialog I had to create in a .vbs script to log a bug against OneNote, because Office apps don't usually work as they should. However, that being said, I'd like to see Terminal drive getting this capability built into UWP if it doesn't exist today. Any simple dialog, should maintain this very basic functionality.
Author
Owner

@zadjii-msft commented on GitHub (Jun 20, 2019):

I don't know much about UWP XAML, but presumably the reason UWP XAML ContentDialogs don't support this by default is that you can put whatever content you want in them. How does copy work for some of these more complicated ContentDialogs?

@zadjii-msft commented on GitHub (Jun 20, 2019): I don't know much about UWP XAML, but presumably the reason UWP XAML ContentDialogs don't support this by default is that you can put _whatever content you want in them_. How does copy work for [some of these more complicated ContentDialogs](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.contentdialog#examples)?
Author
Owner

@mdtauk commented on GitHub (Jun 20, 2019):

@zadjii-msft Is right, making it a default behaviour does not make sense for when ContentDialogs contain more than text. But the ability to select the text content, and copy it for future reference is useful, and possible by allowing the selection of the TextBlock content.

@mdtauk commented on GitHub (Jun 20, 2019): @zadjii-msft Is right, making it a default behaviour does not make sense for when ContentDialogs contain more than text. But the ability to select the text content, and copy it for future reference is useful, and possible by allowing the selection of the TextBlock content.
Author
Owner

@DHowett-MSFT commented on GitHub (Jul 3, 2019):

This was just submitted to the store with the v0.2.1831.0 servicing release. It may take some time for the store to process it. We figured, "it's a small change, why not do it?" Thanks to @Summon528 for the fix.

@DHowett-MSFT commented on GitHub (Jul 3, 2019): This was just submitted to the store with the v0.2.1831.0 servicing release. It may take some time for the store to process it. We figured, "it's a small change, why not do it?" Thanks to @Summon528 for the fix.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1769