wpf - Select the Text of the textbox for copy -
here steps should happen
new uc loads , certficate generated exe
the address of certficate shown in textbox (which described below)
all these steps happen uc loads.
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
Post a Comment