Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6177977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:23:30+00:00 2026-05-24T00:23:30+00:00

I have an app, where I generate text (about 500 characters), and I would

  • 0

I have an app, where I generate text (about 500 characters), and I would like the user to have some means of copying that text for use outside of the application.

I don’t want to use any capabilities for this app (like web, or contacts).

Here’s what I’ve tried (and why it’s failed)

  • TextBox. IsReadOnly = true; SelectAll();
    • Can’t SelectAll a read only text box
  • Turn off read only, hide the SIP
    • Can’t hide the SIP on a (non-read-only) TextBox that the user is interacting with (I want to enable the user to copy, so needs to interact with the control)
  • allow edits, show sip, SelectAll()
    • The “copy” icon doesn’t appear unless the user chose to select text
  • On selection changed (actually changed), SelectAll()
    • The “copy” icon doesn’t appear unless the user selected the text? The copy icon appears erratically, nothing I would call an acceptable user experience.

So at this point, I’m quite far from what I want in a user experience, and I still don’t have anything that works. Any suggestions?

Some other possible ways to answer my question include:

  • “How do I force the copy button to appear above text I programatically selected?”
  • “How do I change the selection behavior of a tap in a text box?”
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T00:23:30+00:00Added an answer on May 24, 2026 at 12:23 am

    Here’s what I eventually got mostly working

        private void Export(StackPanel stacker)
        {
            var exportHeader = new TextBlock();
            exportHeader.Text = "Export";
            stacker.Children.Add(exportHeader);
            var exportBox = new TextBox();
            stacker.Children.Add(exportBox);
            //exportBox.IsReadOnly = true; // hides SIP, but causes an exception with SelectAll() (pre-Mango, I haven't tried on Mango yet)
            exportBox.FontSize = 1;
            exportBox.Text = textToExport;
            exportBox.GotFocus += new System.Windows.RoutedEventHandler((send, ev) =>
            {
                ((TextBox)send).SelectAll();
            });
            exportBox.Focus();
        }
    

    Apparently, making the font size 1 makes the difference here, maybe because all of the text can appear on the screen at once? Who knows.

    I accepted this answer, because no one else posted a better solution. I would appreciate a better solution. If you can get the SIP to go away, that would be awesome.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Tcl/Tk app that generates many forms and would like to be
In my Spring app, I'd like to use FreeMarker to generate the text of
I have small web app that generate PDF files as a report. I'm trying
Let's say I have a solution involving an iPhone app that generates some information
I have to create an app in iPhone which can generate QRCode for Text,Mail,Map,Photos
I have an app which will generate 5 - 10 new database records in
I have an app which generates some files in the app directories I need
I have an app that generates invoices in the form of PDF files stored
I am writing a app in .NET which will generate random text based on
I have three links in my Rails 3 app that load information in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.