Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1270
XamDataGrid conditional format background color with multiple colors
posted

Hello,

based on the example conditional format I tried to put a LinearGradientBrush as background into the cell of the XamDatagrid. Each employee has one row and every day is one column.

The differences are:

1. I would like to use multiple colors:

a) grey if the day is non working day (weekend, holidays)

b) complete red if there is no working assignment at all

c) blue if the employee is on vacation

d) draw a section of the cell in green and the rest in red if the employee is assigned only for a fraction of his time (e.g. total working time 8h, he is assigned only 3 of them to a project)

2. I am not using a converter but put a property on the object that is in a List<T> which is bound to the XamDatagrid.

I get close to the desired result but the LinearGradientBrush creates (of course) gradients while I am looking for sharp seperation of colors. The whole thing is actually a small stacked bar diagramm in a cell.

Is there a way to achieve this?

Thanks

Niko