2016-08-03 17 views
0

Ich versuche, den Text der Textbox-Steuerung in die Zwischenablage zu bekommen, und mir gingen die Ideen aus, wie es geht. Irgendwelche Ideen, um die Zwischenablage zum Laufen zu bringen?Lightswitch Text der Textbox-Steuerung in die Zwischenablage kopieren

Mein Code ab sofort:

partial void copy1_Execute() 
    { 
     // Write your code here. 
     string Copylink1, dLink1; 
     Downloadables copydl = this.Downloadables.SelectedItem; 
     dLink1 = Convert.ToString(copydl.Link1); 
     Copylink1 = dLink1; 
     Microsoft.LightSwitch.Threading.Dispatchers.Main.BeginInvoke(() => 
      Clipboard.SetText(Copylink1); 
      }); 
     this.ShowMessageBox("Link copied to clipboard. Ctrl + V to paste", "Downloadable", MessageBoxOption.Ok); 
    } 

Antwort

0

Nevermind. Ich habe es repariert.

Beispielcode:

partial void copy1_Execute() 
    { 
     // Write your code here. 
     string Copylink1, dLink1; 
     Downloadable copydl = this.Downloadables.SelectedItem; 
     dLink1 = Convert.ToString(copydl.Link1); 
     Copylink1 = dLink1; 
     Microsoft.LightSwitch.Threading.Dispatchers.Main.BeginInvoke(() => 
      { 
      Clipboard.SetText(Copylink1); 
      }); 
     this.ShowMessageBox("Link copied to clipboard. Ctrl + V to paste", "Downloadable", MessageBoxOption.Ok); 
    }