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?
Thank you for contacting Infragistics Developer Support.
I understand that you are trying to display a sharp gradient in the XamDataGrid's cells.
I am not sure I completely understand how your List<T> data looks like, but you can add a more sharp gradient by adding an extra stop using the next color you want.
The below example code will draw Red and Green interpolating evenly in the first half, and a sharper Blue in the right half.
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Offset="0" Color="#FFff0000"/>
<GradientStop Offset="0.5" Color="#FF00ff00"/>
<GradientStop Offset="0.5001" Color="#FF0000ff"/>
<GradientStop Offset="1" Color="#FF0000ff"/>
Let me know if I may be of further assistance.
Sincerely,Michael H.Software DeveloperInfragistics, Inc.www.infragistics.com/support
Thanks for the response. It works as expected.
PS: I know that I am responding now to my own message. For whatever reason I cannot respond to your posting.
What behavior do you see when you try to respond to Mike's post? Do you have more details on why your aren't able to respond to his post?
the textbox where I can enter the response did not open. I tried on Firefox (where some blockers like Ghostery, uBlock Origin are working) and Edge. Yesterday I could not respond neither in Firefox nor in Edge.
Today Edge is working, Firefix is not. It would be great to have a support site without any tracking.
Assuming that is on clicking the "Reply" button, are there specific errors in the developer tools Console from when you click the button?