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.
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.
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.
Missing docs for public control
|
|
||
| namespace Wpf.Ui.Controls; | ||
|
|
||
| public class GridViewRowPresenter : System.Windows.Controls.GridViewRowPresenter |
There was a problem hiding this comment.
Missing docs for public control
|
|
||
| namespace Wpf.Ui.Controls; | ||
|
|
||
| public class GridViewHeaderRowPresenter : System.Windows.Controls.GridViewHeaderRowPresenter |
There was a problem hiding this comment.
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
MinWidthandMaxWidthsupport forGridViewPull 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.GridViewColumnto have dependency propertiesMaxWidthandMinWidthArrangeOverride()onGridViewHeaderRowPresenter(header row) andGridViewRowPresenter(data rows)ListViewandListViewItemto use the extended classes