You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 7, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on May 7, 2022. It is now read-only.
Your problem seems to be that the root element of your visual tree is not inheriting from System.Windows.Window.
The four default templates contain a behavior which dims the selection brushes if the window which contains the control is inactive. In your case, the binding fails to obtain the window instance.
@xyrus02 Isn't a focused control in an inactive window still "focused"? This is an issue with a lot of UI controls that just don't regard the top-level window state like good old Win32 controls did.
Yes indeed, you are right. In the visual tree, it is still marked as focused. I still would rather rely on that than on a property of a window because in theory, you can't always be sure that the top level element is a window (what about a page?)
Nonetheless, there shouldn't be a binding exception spamming OPs trace.
Activity
xyrus02 commentedon May 10, 2018
Your problem seems to be that the root element of your visual tree is not inheriting from System.Windows.Window.
The four default templates contain a behavior which dims the selection brushes if the window which contains the control is inactive. In your case, the binding fails to obtain the window instance.
ygoe commentedon May 10, 2018
@xyrus02 Isn't a focused control in an inactive window still "focused"? This is an issue with a lot of UI controls that just don't regard the top-level window state like good old Win32 controls did.
xyrus02 commentedon May 10, 2018
Yes indeed, you are right. In the visual tree, it is still marked as focused. I still would rather rely on that than on a property of a window because in theory, you can't always be sure that the top level element is a window (what about a page?)
Nonetheless, there shouldn't be a binding exception spamming OPs trace.