Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'ToolTip' cannot have a logical or visual parent #7

Closed
emoacht opened this issue Jun 1, 2018 · 3 comments
Closed

'ToolTip' cannot have a logical or visual parent #7

emoacht opened this issue Jun 1, 2018 · 3 comments

Comments

@emoacht
Copy link
Owner

emoacht commented Jun 1, 2018

I have occasionally experienced this exception when some hardware changes happen. No clue.

System.InvalidOperationException: 'ToolTip' cannot have a logical or visual parent.
   at System.Windows.Controls.ToolTip.OnAncestorChanged()
   at System.Windows.FrameworkElement.OnAncestorChangedInternal(TreeChangeInfo parentTreeState)
   at System.Windows.TreeWalkHelper.OnAncestorChanged(DependencyObject d, TreeChangeInfo info, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at MS.Internal.PrePostDescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
   at MS.Internal.PrePostDescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
   at System.Windows.TreeWalkHelper.InvalidateOnTreeChange(FrameworkElement fe, FrameworkContentElement fce, DependencyObject parent, Boolean isAddOperation)
   at System.Windows.Controls.Primitives.Popup.UpdatePlacementTargetRegistration(UIElement oldValue, UIElement newValue)
   at System.Windows.Controls.Primitives.Popup.DestroyWindow()
   at System.Windows.Controls.Primitives.Popup.<HideWindow>b__122_0(Object sender, EventArgs args)
   at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
@danperor
Copy link

danperor commented Sep 4, 2019

some times i have got this error in my view Designer in vs2015
i use a button tooltip custom style in this case.
and i fix it when i put my tooltip style in the Resource dictionary
it resolved。
you can try this .

@emoacht
Copy link
Owner Author

emoacht commented Sep 15, 2019

@danperor Thank for your suggestion.
However, this error have been thrown even before I defined the tooltip style in this app. It means that the default style had been used at that time.

@emoacht
Copy link
Owner Author

emoacht commented Mar 18, 2023

I have not encountered this exception for long period and so decided to close this issue.

@emoacht emoacht closed this as completed Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants