Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AddOn with Two Tabs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    AddOn with Two Tabs

    Hello,

    I have an Addon with 2 tabs called App and Settings. Each tab has its own class called AppFrameworkTab and SettingsFrameworkTab.

    In the Settings tab I have a combo box with 3 items defined from the XAML file. If I am in the SettingsFrameworkTab code, I can access the selected item of the combo box with comboBox.SelectedItem.

    My question is, can I access the combo box defined in the SettingsFrameworkTab code from the AppFrameworkTab code?

    Thank you.

    #2
    Hello,

    Thank you for the question.

    For both separate classes to see the same object or information, they would need to somehow share that object.

    If you are loading a string as xaml and then getting items from the xaml that was parsed, you may be able to assign the found objects to a static classes property. Both classes could then access that static class to check if the object is null or not or get values.

    Another option may be to pass an instance of an object to each tab from where they are created to create a shared object between the tabs. On the change event this object could then be updated with a new value.


    I look forward to being of further assistance.

    Comment


      #3
      Thank you Jesse. I am able to create a class object from the App tab to Settings tab and get its information, but if the info in the Settings tab is changed, I will have to pass an object in the event update as you suggested to get the updated information.

      I also tried to save data to the Workspace for the Settings tab, but was unable to retrieve these settings from the App tab as it looks to me that the Workspace saves settings using a GUID for each tab which is only accessible from the tab that created it. Is that correct or is there a way to access Workspace settings from a tab other than the one that created it?

      Comment


        #4
        Hello,

        By default there would not be any specific way for the two separate tab classes to communicate, this would highly depend on how you want to make that connection.

        Passing the same object to both classes should work for allowing both classes to see the same data, but as you said there is no update event to notify when one changes. You would need to implement a notification in whatever way would work with your logic, that could be an exposed method, custom event subscription, MVVM pattern. It would really depend on how you want to make it.

        In the case you are using bindings or data contexts, I would likely suggest reviewing INotifyPropertyChanged to see if when the Property changes the bound controls are notified. If you are not and just assigning values to objects, an exposed method to "update" or apply new values when called could be used.

        If you have a sample of the two tabs and class you have passed to both, we could review that sample to see what specifically may work in that situation.

        I look forward to being of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        673 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        379 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        111 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        578 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        582 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X