I have created a new style to add a menu control to the ColumnManagerCell. In the code behind I need to add a handler to a control inside the Menu but I do not know how to “find” the menu control in the ColumnManagerCell. Any ideas??
Imported from legacy forums. Posted by jwhelan (had 1903 views)
I Registered the PreviewMouseDownEvent event for the ColumnManagerCell. And in that event handler I was able to access the template of the ColumnManagerCell.
EventManager.RegisterClassHandler(GetType(Xceed.Wpf.DataGrid.ColumnManagerCell), Xceed.Wpf.DataGrid.ColumnManagerCell.PreviewMouseDownEvent, New MouseButtonEventHandler(AddressOf OnCellManagerClick))
Private Sub OnCellManagerClick(ByVal sender As Object, ByVal e As MouseButtonEventArgs) Dim CMC as ColumnManagerCell = CType(sender,ColumnManagerCell) Dim mCal As MonthCalendar = CMC.Template.FindName(“monthCalendar”, CMC) …
Imported from legacy forums. Posted by jwhelan (had 3407 views)