Problem with focus scope in WPF.(rredcat.blogspot.com)

submitted by RredCatRredCat(299) 3 years, 9 months ago

WPF contains interesting static class FocusManager. This class (more precisely: its static method SetIsFocusScope) allows to set the specified DependencyObject as a focus scope (You can read more about it here). 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).

add a comment |category: |Views: 59

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story