-
Notifications
You must be signed in to change notification settings - Fork 635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dyn 5404 disable menu items #13786
Dyn 5404 disable menu items #13786
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have to retrieve the button in this complex way? Can we grab it by name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess my point is that lets not rely on the tooltip to search for controls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
private void ShortcutToolbar_Loaded(object sender, RoutedEventArgs e) | ||
{ | ||
IsSaveButtonEnabled = false; | ||
IsExportMenuEnabled = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you are referring to the MenuItems, yes they are disabled in the xaml side, the above code is for the Toolbar buttons
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* 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
*.resx
filesReviewers
@QilongTang
FYIs
@RobertGlobant20 @filipeotero