Is it possible to use different themes for different instances of the same component?
I’ve created a theme to customize the look of the DataGridViewCheckBoxColumn. So far everything works properly. Clearly, this customization applies to all datagridview of my application.
But now I need to apply the ‘thema Blue-1’ to the DataGridViewCheckBoxColumn of only one specific datagridview, leaving the others unaltered.
Thanks to your suggestion.
I’ve migrated my custom control of my VindowsForm application. In my new custom checkboxcolumn i changed the icons and other display styles. I just noticed a problem (even in your example). The edges of the cell are disappeared. I could not see them.Do you have any suggestions?
The main issue is that you didn’t set the .js and .theme files as “Embedded Resources”.
The second issue that I just discovered and didn’t know is that VB.NET builds embedded resources differently – it ignores completely the path!
Wisej searches in Platform, Resources and Themes, but VB.NET doesn’t include the path in the namespace. So I fixed your code by simply adding the prefix “Platform.” to the .js file and “Themes.” to the mixin and now it works. Another way is to edit vbproj by hand (see link above).
We’ll have to document this somewhere.
I’ve studied your example and I think I understand the methodology.
I tried translating it into VB on a new project, but the mycheckboxcolumn column1 on dtatgridview displays only False. I do not know where I’m wrong.
I attach your translated example.
It’s possible for all Wisej controls. For most it’s as easy as setting the appearance key. You don’t have to create a new theme, you can use a theme mixin to add or modify whatever theme is loaded.
However for some complex controls it’s a bit more difficult since they have child elements that are also styled but are not actual controls. DGV columns and cells are the most complex. We have a system of cell renderers that can be overridden to do just about anything, but it’s not simple. We are simplifying it as requirements come our way from projects.
Overriding the cell renderer is one of those things being simplified…
Please login first to submit.