wpfdatagrid - WPF: Copy from a DataGrid -


i add copy functionality wpf datagrid.

  1. the copy option should appear in right-click menu
  2. it should copy display text selected cell. (i using read-only text columns.)

in datagrid's contextmenu, can create menuitem , set menuitem.command value copy. it's command available through standard applicationcommands list, there won't additional code required have functional:

<datagrid>     <datagrid.contextmenu>         <contextmenu>             <menuitem command="copy" />         </contextmenu>     </datagrid.contextmenu> </datagrid> 

Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -