Hi,
We are experiencing what appears to be a random issue that is becoming more prevalent. In our app we have a WPF GridControl together with a DXContentMenu within it. If an item with the content menu is disabled we want to provide an explanation, as such each BarButtonItem within the menu has it's Tooltip bound to a string property which is updated within the underlying ViewModel; below is a sample of a BarButtonItem.
XAML<dxb:BarButtonItem Content="{Binding Commands.AckCommand.CommandDescription}"
CommandParameter="{Binding SelectedOrders}"
ToolTip="{Binding Commands.AckCommand.DisabledReason}"
Command="{Binding Commands.AckCommand, Mode=OneTime}" />
Occasionally an exception is being raised with the message System.InvalidOperationException: 'ToolTip' cannot have a logical or visual parent.
From the attached stack trace line #62, you can see that the we are updating the DisabledReason property on the ViewModel. Continuing up the call stack you can see
- line #41 it enters DevExpress code
- line #40 calls DevExpress.Xpf.Bars.BarItem.OnToolTipChanged()
- line #31 call BarItemLinkControl.UpdateToolTip()
I have seen two other issues in the forum as below but these are from some time ago
https://www.devexpress.com/Support/Center/Question/Details/T235569
https://www.devexpress.com/Support/Center/Question/Details/B142608
Any assistance resolving this exception would be appreciated.
Thanks
Fahad
Hello Fahad,
It is difficult to provide a precise solution based only on the posted call stack. It would be helpful if you provide us with step-by-step instructions how to replicate the issue. Alternatively, you can modify the attached sample project which I created while trying to replicate the exception on my side. I'm looking forward to your reply.
Thanks,
Michael