Home Forums WPF controls Xceed DataGrid for WPF ColumnManagerCell

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #22829 |

    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)

    User (Old forums)
    Member
    Post count: 23064

    nm, found the solution.

    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)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.