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 got the answer by looking at NavigatorWindow. Posting here in case anybody needs to do this in the future.
  1. Call DockingManager.Layout.Descendents().OfType<LayoutAnchorable>() to find the LayoutAnchorable that has a ContentId matching the expected one
  2. Get the LayoutItem by calling DockingManager.GetLayoutItemFromModel()
  3. Call LayoutItem.ActivateCommand.Execute(null) to select the item and give it focus.
Rinse and repeat for LayoutDocument.

Viewing all articles
Browse latest Browse all 2157

Trending Articles



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