locked
How to get ActivePart from SinglePartNavigationManager in code? RRS feed

  • Question

  • Hello,

    I have part with SinglePartNavigationManager and 3 child parts.

    I need programatically call some command from parent part code to currently active child part.

    How to get ActivePart instance from Part.NavigationManager?

    There is no ActivePart property and I don't want to use FindItemByName.

    Thank you

     

    Thursday, August 23, 2007 7:09 AM

Answers

  • Hi Romualds,

     

    Try this: cast the NavigationManager returned by Part.NavigationManager to a SinglePartNavigationManager (since you know it is one) and use its ActivePart property:

     

    ((SinglePartNavigationManager)Part.NavigationManager).ActivePart

    Thursday, August 23, 2007 7:11 PM

All replies

  • Hi Romualds,

     

    Try this: cast the NavigationManager returned by Part.NavigationManager to a SinglePartNavigationManager (since you know it is one) and use its ActivePart property:

     

    ((SinglePartNavigationManager)Part.NavigationManager).ActivePart

    Thursday, August 23, 2007 7:11 PM
  • Yes it works!

    Thank you!

    Monday, October 15, 2007 8:17 PM