Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have an xaml file with several tabs in it . Render Groups, Views, Materials, and Design Options. 1 . I want to make it

I have an xaml file with several tabs in it. Render Groups, Views, Materials, and Design Options.
1. I want to make it so that when I start up the XAML file and load up the window which contains all the tabs, the tabs for Views, Materials, and Design Options are hidden.
2. When I select an item in a listbox in the Render Groups tab and click a button called Modify, the changes the title of the window to Modifying {selected item}, hides the Render Groups tab, and shows the 3 tabs: Views, Materials, and Design Options
3. When I click a button called OK it hides the 3 tabs: Views, Materials, and Design Options, and shows the Render Groups tab again.
To help integrate this with my code, I have provided some of my current code:
Main class:
class ViewModel(my_WPF):
context_mode = 'show'
view_mode = 'singular'
context_transp =0
context_color = Color(255,255,255)
warning_color = Color(255,0,0)
count_views_total =1
count_view_current =1
def __init__(self):
path_xaml_file = xaml_path
wpf.LoadComponent(self, path_xaml_file)
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()
some xaml info:
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions

Question

9. Describe the characteristics of power.

Answered: 1 week ago

Question

10. Describe the relationship between communication and power.

Answered: 1 week ago