wpf - Select the Text of the textbox for copy -


here steps should happen

  1. new uc loads , certficate generated exe

  2. the address of certficate shown in textbox (which described below)

    all these steps happen uc loads.

  3. i need copy button copy the path of textbox.

i using below code uc loads copy button disable. why?

<textbox grid.column="1"  horizontalalignment="stretch" name="label1" verticalalignment="stretch" foreground="#fff20c0c" ismanipulationenabled="false" istabstop="false" isundoenabled="false" borderthickness="0" background="{staticresource {x:static systemcolors.controlbrushkey}}" textwrapping="wrap" isreadonly="true">  <button grid.row="2" height="auto" width="auto             " command="copy" content="copy certificate address" horizontalalignment="left" verticalalignment="center" commandtarget="{binding elementname=label1}"/> 

handle click event of button , make copy there. should :

buttonclickhandler(object sender, eventargs e)  {    clipboard.settext(label1.text); } 

clipboard.settext() should copy text of label1 windows clipboard.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -