Answered step by step
Verified Expert Solution
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.
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.
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 tabs: Views, Materials, and Design Options
When I click a button called OK it hides the 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 ViewModelmyWPF:
contextmode 'show'
viewmode 'singular'
contexttransp
contextcolor Color
warningcolor Color
countviewstotal
countviewcurrent
def initself:
pathxamlfile xamlpath
wpfLoadComponentself pathxamlfile
self.UIListBoxDesignOptions.ItemsSource newdesignoptionnames
self.UIListBoxFamilyGroups.ItemsSource newfamilygroupnames
self.UIListBoxMaterialGroups.ItemsSource mymaterialgroupslist
self.UIListBoxViews.ItemsSource wrappedviews
self.UIListBoxRenderJobs.ItemsSource self.renderjobslist
self.UIListBoxRenderGroups.ItemsSource myrendergroupslist
self.setowneruiapp
def setownerself uiapp:
# Obtain the Revit main window handle
revitwindowhandle uiapp.MainWindowHandle
windowinterophelper WindowInteropHelperself
windowinterophelper.Owner revitwindowhandle
def showwindowself:
self.ShowDialog
if namemain:
x ViewModel
xshowwindow
some xaml info:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started