-
-
Notifications
You must be signed in to change notification settings - Fork 832
Feature/gridview-min-max-widths #982
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
Feature/gridview-min-max-widths #982
Conversation
A fair amount of reflection was needed to support columnheader dragging
|
||
namespace Wpf.Ui.Controls; | ||
|
||
public class GridViewColumn : System.Windows.Controls.GridViewColumn |
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.
Is the Controls/ListView directory the right place for these classes? Maybe Controls/GridView would be more appropriate
self.OnMinWidthChanged(e); | ||
} | ||
|
||
protected virtual void OnMinWidthChanged(DependencyPropertyChangedEventArgs e) |
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.
Missing docs for public api
@@ -0,0 +1,60 @@ | |||
namespace Wpf.Ui.Controls; | |||
|
|||
public class ListView : System.Windows.Controls.ListView |
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.
Missing docs for public control
|
||
namespace Wpf.Ui.Controls; | ||
|
||
public class GridViewRowPresenter : System.Windows.Controls.GridViewRowPresenter |
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.
Missing docs for public control
|
||
namespace Wpf.Ui.Controls; | ||
|
||
public class GridViewHeaderRowPresenter : System.Windows.Controls.GridViewHeaderRowPresenter |
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.
Missing docs for public control
…koal44/wpfui into feature/gridview-min-max-widths
… _desiredWidth It turns out that the base methods for GridViewRow presenters can handle all the logic if _desiredWidth is preemptively adjusted
style ListViewItem to a custom one semove global styling of GridViewColumnHeader In this way, a user using ListView will see the vanilla version and when using ui:ListiView, ui:GridView and ui:GridViewColumn - they will see the ui library version
…koal44/wpfui into feature/gridview-min-max-widths
I've added documentation and separated The TODO: restyle |
- Logic for drag resizing was already baked into the GridViewHeaderRow so all that was needed was a suitable style that used template parts (PART_HeadGripper) - Styling the indicator required reflection because wpf framework creates the separator control in code via internal OnPreApplyTemplate() and private AddIndicator() methods
Add
MinWidth
andMaxWidth
support forGridView
Pull request type
Info
This feature is a branch off of PR #979. It adds min/max width support for
GridView
. It uses a fair bit of reflection to maintain support for dragging column headers.GridViewColumn
to have dependency propertiesMaxWidth
andMinWidth
ArrangeOverride()
onGridViewHeaderRowPresenter
(header row) andGridViewRowPresenter
(data rows)ListView
andListViewItem
to use the extended classes