/// <summary> /// Specifies to raise tooltip opened event for the header cell /// </summary> /// <param name="tooltip"></param> internal bool RaiseCellToolTipOpening(ToolTip tooltip) { if (this.TreeGrid != null && this.TreeGrid.CanCellToolTipOpening()) { var cellToolTipOpeningEventArgs = new TreeGridCellToolTipOpeningEventArgs(this) { Column = this.Column, RowColumnIndex = new RowColumnIndex(TreeGrid.GetHeaderIndex(), TreeGrid.ResolveToScrollColumnIndex(TreeGrid.Columns.IndexOf(Column))), Record = this.DataContext, ToolTip = tooltip }; this.TreeGrid.RaiseCellToolTipOpeningEvent(cellToolTipOpeningEventArgs); } return(tooltip.IsEnabled); }
protected virtual internal bool ShowContextMenu() #endif { if (this.TreeGrid == null || this.TreeGrid.HeaderContextMenu == null) { return(false); } var rowColIndex = new RowColumnIndex(TreeGrid.GetHeaderIndex(), TreeGrid.ResolveToScrollColumnIndex(TreeGrid.Columns.IndexOf(Column))); var menuinfo = new TreeGridColumnContextMenuInfo() { Column = this.Column, TreeGrid = this.TreeGrid }; var args = new TreeGridContextMenuEventArgs(TreeGrid.HeaderContextMenu, menuinfo, rowColIndex, ContextMenuType.HeaderCell, this); if (!this.TreeGrid.RaiseTreeGridContextMenuEvent(args)) { #if WPF if (args.ContextMenuInfo != null) { this.TreeGrid.HeaderContextMenu.DataContext = args.ContextMenuInfo; } this.TreeGrid.HeaderContextMenu.PlacementTarget = this; this.TreeGrid.HeaderContextMenu.IsOpen = true; #else if (args.ContextMenuInfo != null) { foreach (var item in args.ContextMenu.Items) { item.DataContext = args.ContextMenuInfo; } } args.ContextMenu.ShowAt(this, position); #endif return(true); } return(false); }