Monday, May 12, 2008
But we have a limitation that didn't describe in MSDN (or more precisely, I not found). We can't use all controls that were inherited from ButtonBase in this focus scope, as these controls can't capture Keyboard.Focus in this focus scope. In OnLostMouseCapture method validates whether button is located in main window's focus scope. So if it isn't, control loses Keyboard.Focus (its be after Click event).
From information from my co-worker, this behaviour will be added for buttons correct works in ToolBar.
I think that a solution of MS could be more graceful for trouble of ToolBar.
Monday, May 5, 2008
Although property value inheritance might appear to work for nonattached dependency properties, the inheritance behavior for a nonattached property through certain element boundaries in the run-time tree is undefined. Always use RegisterAttached to register properties where you specify Inherits in the metadata.
So, this is no surprise that my samples didn’t work. You can read more here.