Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Copy to clipboard from CollectionViewSource/DataGrid

$
0
0

Hi,

I need to copy data on click of separate button to clipboard which is being displayed in DataGrid on screen. I found a lots of code on internet but its referencing DataGrid control in viewmodel. I don't want to send control reference to viewmodel as it make code non-unit testable and violate MVVM. I'm using collectionviewsource to bind data. Is there any way to copy that to clipboard without using DataGrid object?

Please suggest.

 



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>