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

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

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -