locked
Data between Tab and Settings RRS feed

  • Question

  • If I have a Console Tab, but requires some settings from it's Settings counterpart, what is the best/recommended way to get data from the settings pane back to the correct Console Tab?

     

    Obviously I can write the settings to an XML file and have the Console tab read it, but I'd like to avoid that for immediate setup. I know I'm going to need to do that to maintain state between Console access sessions, but that's a different story.

     

    So simply put the scenario is:

    1. User loads the WHS Console.
    2. Adds my add-in.
    3. Does the usual log-off, re-login to the WHS Console.
    4. Views the newly added Console tab and generic information is shown, but informing the user to customize it using the settings. For arguments sake let's say that there's a label on the console which display "FooBar".
    5. User loads the settings, customizes it, For this example, the customization is to change the text of the label from "FooBar" to "Hello World".
    6. User clicks "OK", and then the Console has "Hello World" displayed instead of "FooBar".
    Sunday, December 16, 2007 7:21 AM

Answers

  • Unfortunately there is no built in mechanism to achieve this... largely leaving third-party developers to fend for themselves.
    Personally I’ve used the following mechanisms at various times to refresh my main tab control to reflect updates:

    1. Manual Refresh button on tab
    2. Manually launching settings from my tab and refreshing on return
    3. Event in custom static class that is used by both the main tab and settings
    4. Responding to ParentChanged event of main tab control

    The undocumented ITabExtender interface provides some extra ability to do some of these things... however using it is generally not recommended as the interface also forces you to specify a tab order which can end up fighting with other tabs.

    Monday, December 17, 2007 5:33 PM
    Moderator

All replies

  • Unfortunately there is no built in mechanism to achieve this... largely leaving third-party developers to fend for themselves.
    Personally I’ve used the following mechanisms at various times to refresh my main tab control to reflect updates:

    1. Manual Refresh button on tab
    2. Manually launching settings from my tab and refreshing on return
    3. Event in custom static class that is used by both the main tab and settings
    4. Responding to ParentChanged event of main tab control

    The undocumented ITabExtender interface provides some extra ability to do some of these things... however using it is generally not recommended as the interface also forces you to specify a tab order which can end up fighting with other tabs.

    Monday, December 17, 2007 5:33 PM
    Moderator
  • Thanks Brendan, this is good data. I'll try these out.

    Tuesday, December 18, 2007 3:15 AM