Skip to content

#371 Single Row and Colum Coloring#380

Open
Louis-Dittmar wants to merge 17 commits into
w-ahmad:mainfrom
Louis-Dittmar:main
Open

#371 Single Row and Colum Coloring#380
Louis-Dittmar wants to merge 17 commits into
w-ahmad:mainfrom
Louis-Dittmar:main

Conversation

@Louis-Dittmar

Copy link
Copy Markdown

No description provided.

@Louis-Dittmar Louis-Dittmar marked this pull request as draft June 11, 2026 06:33
@Louis-Dittmar Louis-Dittmar marked this pull request as ready for review June 11, 2026 07:48
@Louis-Dittmar

Copy link
Copy Markdown
Author

After some huge problems with my company PC and private PC, I think I managed to make a good addition to the project.

I implemented a new feature that allows highlighting table rows and columns:
#371

Screenshot 2026-06-10 085935

@w-ahmad

w-ahmad commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Thanks for the contribution @Louis-Dittmar!
How does this differ from the conditional cell styling implemented in #253?

@Louis-Dittmar

Copy link
Copy Markdown
Author

Pretty SImple #253 is not Connected mine are connected, and they dont go over the cell border.

@w-ahmad

w-ahmad commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Pretty SImple #253 is not Connected mine are connected, and they dont go over the cell border.

I apologize, but I did not fully understand. Could you provide further clarification?

@Louis-Dittmar

Louis-Dittmar commented Jun 11, 2026

Copy link
Copy Markdown
Author

My main Problem was, that this dosnt looks that good to me:

image

so I implemented it more stable, not for each item but for the total row and Colume, so you can connection between them.

Overview

#253 Conditional Cell Styling #380 Row/Column Highlighting
Based on Data content (Predicate) Position (Index)
Granularity Each individual cell Entire row or column
What gets set Full WinUI Style Only Background / Foreground
Connected cells No — each cell is independent Yes — cells in a row/column share one continuous highlight
Cell borders Cells retain their own borders Highlight renders beneath borders, appearing seamless

Approach #253

Predicate-based. You write a C# function (Predicate<TableViewConditionalCellStyleContext>) that is called per cell to decide whether a given Style is applied. The decision is made based on the cell's underlying data object (context.DataItem), so the styling reacts to your model, not to a hardcoded position in the grid.

Approach #380

Index-based. You declare directly which row or column should receive a highlight color — no predicates, no data knowledge required. The API is intentionally simple and declarative.

Overlap resolution

When a row highlight and a column highlight intersect (e.g. row 2, column 0), the conflict is resolved via two properties:

Property Behavior
MergeOverlappingHighlights Blends both colors together
OverlappingHighlightPriority One highlight wins (row or column takes precedence)

How i made it

EnsureHighlightColors() is called in TableViewCell. Unlike #253, this does not apply a full Style it sets Background and Foreground directly. This is also what makes the seamless band effect possible (what is needed for me): the highlight is applied beneath the cell border layer, so the entire row or column appears as one continuous colored stripe.

What i Totally Forgot

One functionality I hadn't thought about is that it's currently using a fixed index. What I would actually like is for it to move together with the row or column when its position changes, just like #253 but then the full row or Colume.

I think i do some small Changes again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants