I want to create a border to contain all selected cells like excel.
And I want to change the cursor when mouse move on the border.
Is it possible that I draw a border or a shape in Canvas of grid?If yes, how to do it?
Hello,
The grid doesn't work like a spreadsheet. The background selection brush is applied to all selected items and the border brush is for all rows. To solve this you would have to look outside the workings of the XamDataGrid record manager. One approach that is supported by the grid is using the adorner layer. To do a big border around all visible selected cells would be a little bit of calculation on your part. However, I believe it should be possible. Here are two reference webpages that talk about DisplayAdorningEditors. If you study a little bit about Adorners, you can even go beyond what DisplayAdorningEditors can do as the Adorner layer allows rendering any visual above the WPF layout composition.
http://blogs.infragistics.com/blogs/josh_smith/archive/2008/09/15/introducing-a-new-xamdatagrid-behavior-displayadorningeditors.aspx
http://blogs.infragistics.com/blogs/josh_smith/archive/2008/09/12/adorning-xamdatagrid-with-a-popup-editor.aspx
Hi,
Is it possible to provide a sample using adorners to do the selection?
Thanks in advance