You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're planning to use Sidebar control for consistency and simplicity in properties window and settings window. I already confirmed this can reduce 200 lines.
Concerned code
Around SidebarView class
Gains
Consistency and simplicity
Requirements
This work appears to be huge, so I suggest to break down to a few phases below:
Rename sidebar item classes such as DriveItem to be StandardDriveItem. In the future those items will also be used in widgets and even layout pages.
Separation
Separate view-unique values such as ExpandedWidthThreshold, IsPaneOpen and ViewModel. Note that we probably need to separate almost all dependency properties in SidebarView.
Separate view-unique events such as ItemInvokedAsync.
Add generation method for each Sidebar type: Default, Properties, Settings.
Create FrameworkElement property to hold icon element for both BitmapImage and OpacityIcon
At the end of quick discussion, we settled on the idea to generalize usage of SidebarView, moving view-specific properties, such as item collection, pane mode, pane width. This also enables us to bind values to user settings to make them keep up with the latest info all the time.
The new usage will be almost the same as the one of NavigationView, such as invoking an event to notify item invocation, using two-way binding for selected item.
In this issue, I guess we also might as well discuss the idea to make items larger to the height probably based on a user setting - EnableCompactModeInSidebar.
Description
We're planning to use Sidebar control for consistency and simplicity in properties window and settings window. I already confirmed this can reduce 200 lines.
Concerned code
Gains
Consistency and simplicity
Requirements
This work appears to be huge, so I suggest to break down to a few phases below:
Comments
My prototype:
main...0x5bfa:Files:5bfa/CQ-RefactorSidebarViewModel
The text was updated successfully, but these errors were encountered: