I have hosted a UltraWinGrid as a WindowsFormsHost control in my WPF app. I am trying to use UltraToolTipManager to display a tooltip on event ultraGridXX_MouseEnterElement. The tooltip is not displaying. I am using assembly Infragistics2.Win.v8.3. The code in the MouseEnterElement is:
private void ultraGridXX_MouseLeaveElement(object sender, UIElementEventArgs e){if (!(e.Element is CellUIElement)) { return;}UltraGridCell cell = e.Element.GetContext(typeof(UltraGridCell)) as UltraGridCell; if (cell != null) {Infragistics.Win.UltraWinToolTip.UltraToolTipInfo tipInfo = new Infragistics.Win.UltraWinToolTip.UltraToolTipInfo("some data", Infragistics.Win.ToolTipImage.Default, "", Infragistics.Win.DefaultableBoolean .True);
_ultraToolTipManager1.SetUltraToolTip(ultraGridXX, tipInfo);_ultraToolTipManager1.ShowToolTip(ultraGridXX);}else{ _ultraToolTipManager1.HideToolTip(); }}
I have the same exact code in a Windows Forms app, and tooltip works beautifully. What am I missing?
Please help!! THANKS...
Is there a solution for this condition? I am running into the same thing with the UltraTree. It works fine in a Forms application, but not when my WinForms control is hosted in a WPF control. All other events work correctly, and in debug I can see all of my code execute correctly for building up the ultraToolTipManager object, but nothing happens when I call the ShowToolTip method.
Any thoughts?
Hi,
By default, tooltips won't display unless the form containing the associated control is active. In a WPF application, there is no form.
But you can change this behavior by setting a static property:
Infragistics.Win.ToolTip.ShowAlways = DefaultableBoolean.True;
Perfect. Thanks...