Thank you for being a valued client of CM First Group. If you have any technical issues or concerns, please open a ticket on support.cmfirstgroup.com, email CM First technical support at support@cmfirstgroup.com or call us on our 24/7 customer hotline at +1 (512) 623-7586.

Follow

How To Change the Alternating Row Color on PLEX C# (.Net) Client Grids

There is an alternative to change the alternating row color that displays on the C# client grids. By default there is a pattern selected based on the Theme on the Windows System that sets the original color point to the System color as Dynamic mode.
For example, an alternative light blue/white:

To change this, the XAML file associated with the EXE that launches the application needs to be modified. For this example there is an EXE called HHLAUNCHER.EXE therefore the XAML file is:
HHLauncher.App.xaml
And it is located in the GEN\SRC folder:

Locate such file using Windows Explorer or Visual Studio as CA PLEX Gen and Build window, View Source doesn't list it.
Open such file with a text editor and locate the following entry:
<SolidColorBrush x:Key="ObGridAlternateBAckground" Color="{DynamicResource {x:Static SystemColors.GradientActiveCaptionColorKey}}"/>

Change the Color property to the expected color for the alternating pattern, for example, change to:
<SolidColorBrush x:Key="ObGridAlternateBAckground" Color="Green"/>
Then re-build the EXE. You don’t need to recreate the function itself, just rebuild the EXE
Test by re-launching the application and loading any grid. Observe the new alternating color:

 

To choose a color you can make use of a Hex Color Picker such as the following for a ‘light green’:
http://www.w3schools.com/colors/colors_picker.asp
Hex Code: #00ff99
Therefore updated the XAML file to:
<SolidColorBrush x:Key="ObGridAlternateBAckground" Color="#00ff99"/>
And rebuilt the EXE (create EXE):

 

Test the change:

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk