Dyn 5404 disable menu items#13786
Dyn 5404 disable menu items#13786QilongTang merged 7 commits intoDynamoDS:masterfrom jesusalvino:DYN-5404-disable-menu-items
Conversation
| { | ||
| int buttonIndex = ShortcutBarItems.ToList().FindIndex(item => item.ShortcutToolTip.ToUpper().Contains(buttonKey)); | ||
| var _container = ShortcutItemsControl.ItemContainerGenerator.ContainerFromIndex(buttonIndex); | ||
| var _children = AllChildren(_container); |
There was a problem hiding this comment.
Do we have to retrieve the button in this complex way? Can we grab it by name?
There was a problem hiding this comment.
actually We don't have access to the new, open and save buttons by name since they are dynamically created
There was a problem hiding this comment.
Their class ShortcutBarItem is our own class, we can modify the class to add properties for searching.. When we create them, we just need to add name as well..
There was a problem hiding this comment.
I guess my point is that lets not rely on the tooltip to search for controls
| private void ShortcutToolbar_Loaded(object sender, RoutedEventArgs e) | ||
| { | ||
| IsSaveButtonEnabled = false; | ||
| IsExportMenuEnabled = false; |
There was a problem hiding this comment.
If the initial state of these controls is already disabled from xaml, why disable these again on view loaded?
There was a problem hiding this comment.
I guess you are referring to the MenuItems, yes they are disabled in the xaml side, the above code is for the Toolbar buttons
* Enabling ShortcutBar items * Renaming property * Using Event instead of set property * Increasing scope and refactoring * Update properties scope * New and Open in the Start Page * Adding Name property to the ShortcutItem Class
* Enabling ShortcutBar items * Renaming property * Using Event instead of set property * Increasing scope and refactoring * Update properties scope * New and Open in the Start Page * Adding Name property to the ShortcutItem Class

Purpose
Implement the improvement https://jira.autodesk.com/browse/DYN-5404
Declarations
Check these if you believe they are true
*.resxfilesReviewers
@QilongTang
FYIs
@RobertGlobant20 @filipeotero