Question: I have an ironpython script which opens an xaml file containing 2 tabs . Inside of the first tab there is a listbox and there

I have an ironpython script which opens an xaml file containing 2 tabs. Inside of the first tab there is a listbox and there is a button called "Modify" underneath. How can I make it so that I can open another xaml file which contains some information about the class I selected in the listbox (Let's assume it has the class properties: Views, Options, Materials, Objects, Name). To give some more context, I will provide some code I made in IronPython to load the xaml file
Basically, just click a button called Modify which also checks the name of the item in a listbox, makes a new window with the title Modifying (selected item name here). It has 3 tabs (I already have the info for those 3 tabs, but basically just needs to take some listbox information, Design_Options list box, Views Listbox, and Render Groups listbox. Please provide information ideally in IronPython and XAML, if cant do IronPython provide in C#
Here is some XAML info
IronPython info
class ViewModel(my_WPF):
context_mode = 'show'
view_mode = 'singular'
count_views_total =1
count_view_current =1
def __init__(self):
path_xaml_file = xaml_path
wpf.LoadComponent(self, path_xaml_file)
self.selected_family_groups =[]
self.selected_material_groups =[]
self.selected_views =[]
self.render_jobs_list = processed_render_jobs
self.selected_jobs =[]
self.render_views =[]
self.selected_render_groups =[]
self.UI_ListBox_DesignOptions.ItemsSource = new_design_option_names
self.UI_ListBox_FamilyGroups.ItemsSource = new_family_group_names
self.UI_ListBox_MaterialGroups.ItemsSource = my_material_groups_list
self.UI_ListBox_Views.ItemsSource = wrapped_views
self.UI_ListBox_RenderJobs.ItemsSource = self.render_jobs_list
self.UI_ListBox_RenderGroups.ItemsSource = my_render_groups_list
self.set_owner(uiapp)
def set_owner(self, uiapp):
# Obtain the Revit main window handle
revit_window_handle = uiapp.MainWindowHandle
window_interop_helper = WindowInteropHelper(self)
window_interop_helper.Owner = revit_window_handle
def show_window(self):
self.ShowDialog()
if __name__=='__main__':
x = ViewModel()
x.show_window()
 I have an ironpython script which opens an xaml file containing

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!