Quantcast
Channel: wpftoolkit Discussions Rss Feed
Viewing all articles
Browse latest Browse all 2157

New Post: How to set focus to an AvalonDock LayoutContent item programmatically

$
0
0
I'm trying to implement something similar to Visual Studio's "View" menu where when you select a hidden item, it shows it and if you select an item already visible it gives it focus.

The hidden part was simple -- I just find the LayoutAnchorable with a matching ContentId from DockingManager.Layout.Hidden and call .Show() on that object.

The problem I'm running into is how to give focus to already visible items. I've written code to grovel through the tree to find the matching LayoutContent which has a matching ContentId, but how do I give it focus? There's no .Show() like there is for LayoutAnchorable, and I've tried setting IsActive = true and IsSelected = true and these aren't giving the content focus.

What am I missing here?

Viewing all articles
Browse latest Browse all 2157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>