-
Notifications
You must be signed in to change notification settings - Fork 76
Grid and borders #29
base: master
Are you sure you want to change the base?
Grid and borders #29
Conversation
…ties. This allows for fine control over grid lines and the outer border cleanly. CHANGED BorderThickness to control only the outer borders of the grid and moved the rendering of that from the internal views and rows to the containing Grid. CHANGED outer Grid BackgroundColor to be bound to BorderColor. Rows now have background, spacing and padding properties bound rather than set. NOTE: CellPadding applies only to cells created by the Grid. If a column uses a DataTemplate, it will not be affected by CellPadding. It is up to the DataTemplate to do so as needed. BREAKING: Removed HeaderBackgroundProperty (Use HeaderLabelStyle instead) and HeaderBordersVisibleProperty (Use ColumnSeparatorWith and RowSeparatorHeight)
…rWidth and RowSeparatorHeight.
Hi there,
In aware of that and notted it in my comments. The reason I posted this
pull request is so we can review the properties and agree on how they
should behave in the context of the changes.
Please review the new changes and advise on how the old HeaderBackground
and HeaderIsBorderVisible should behave. In my view, they are redundant and
the impact of removing them is small given the alternative.
We could also start a 2.0 branch where even do breaking changes if
necessary.
Your input is appreciated.
|
…ation to use the Margins around the HeaderView and ListView. This allows the HeaderBordersVisible property to completely turn off the borders and grid lines of the HeaderView.
I've improved the borders implementation to allow HeaderBordersVisible to work correctly. |
…. The previous implementation on set the background of the header when header borders were not shown. The property now controls the background color of the header cell grids created internally. It is used as a fallback (via trigger) when the HeaderLabel style sets a Transparent background.
PullToRefreshCommand="{Binding RefreshCommand}" IsRefreshing="{Binding IsRefreshing}" | ||
ActiveRowColor="#8899AA"> | ||
ActiveRowColor="#8899AA" ColumnSeparatorWidth="2.5" RowSeparatorHeight="1.5" | ||
BorderThickness="4" CellPadding="8" HeaderBordersVisible="true"> |
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.
BorderThickness="4" make very thick border please make it thin.
I'm not seeing this effect. Can you give any details on when this is
happening?
This is what I see when I run the sample with HeaderBordersVisible=false on
iOS:
[image: Inline image 1]
|
it appears on windows platform (both UWP and WinRT) |
I installed VS Community with Xamarin and built the UWP to see where this black line is coming from. In my env, this line seems to be an overlay and isn't caused by the changes in this pull-request as far as i can tell. I would appreciate your help with further debugging but I changed padding on contentView for the sample and this bar appears to hover outside of the DataGrid. It also does not appear in the release build. Please see images attached. |
…_borders * commit '20f0c36e8c86d4f68a40e327a70f3a58572ec813': License updated to MIT
…_borders * commit '3d276285b4dd17b5f8e59483e0b2c3b677216a37': FormattedTitle feature added # Conflicts: # DataGridSample/DataGridSample/Views/MainPage.xaml
Once I set |
In the sample the HeaderLabelStyle is also set with a background color and
that takes precedence.
|
How about Sorting icon ? what if it is PNG and has transparent background. The background under sorting icon will remain as BorderColor. |
No, the background color of the header cell grid is bound to the header
label background color. If there label background is transparent, a data
trigger sets it to the headerbackground property.
It works correctly with the icons.
|
Are we ok to proceed with this PR? |
This enables independent control over grid outer border, and horizontal and vertical grid lines.
Also adds a CellPadding property to control column headers and generated cells internal padding; Doesn't affect DataTemplates.
Also fixes some minor issues: Column labels are now bound to Column.HorizontalContentAlignment instead of hard set to Center.
ListView separator visibility is set to None. (Xamarin ListView has a bug that leaves a single pixel line visible, it has been reported.)
Rows internal view properties for BackgroundColor, ColumnSpacing and Padding are now bound instead of set.
Breaking changes: Removes HeaderBackground and HeaderBordersVisible properties.