Posted 22 November 2017, 10:35 am EST
Here’s a short project that illustrates the path mentioned above
This is the tree path as found in the Theme Designer
![]()
When I copy the path and attempt to use it, it fails. I manually look through the theme tree and figure out what the path should be, and it works. It just seems that the path (highlighted above) should be the actual path to the resource. Most times the path displayed is correct, but not always.
Imports C1.Win.C1Themes
Public Class Form1
'A simple 1 form, 1 button, 1 C1ThemeController project with the application theme set to some theme
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim themeName = C1ThemeController.ApplicationTheme
Dim theme = C1ThemeController.GetThemeByName(themeName, False)
'this path is not found
Debug.Print(theme.GetBackgroundBrushStr(“BaseThemeProperties\Styles\Clickable Styles\Hot\Background”))
'this path is found
Debug.Print(theme.GetBackgroundBrushStr(“BaseThemeProperties\Styles\Clickable\Hot\Background”))
'this path is not found
Debug.Print(theme.GetColor(“BaseThemeProperties\Styles\Clickable Styles\Hot\ForeColor”, Color.Red).ToString)
'this path is found
Debug.Print(theme.GetColor(“BaseThemeProperties\Styles\Clickable\Hot\ForeColor”).ToString)
End Sub
End Class
One other thing, about themed Treeviews. Most treeviews have a hot & hot/Selected style that is identical to the default style, so the user gets no visual feedback when hovering over a node. I have taken to using the [b]BaseThemeProperties\Styles\Clickable\Hot[/b] and [b]BaseThemeProperties\Styles\Clickable\HotPressed[/b] colors for the associated styles in the treeview. It looks much better (IMHO). One thing I would like is to have a background brush property (as in the theme), not just a color, for the custom styles.
Thanks,
Kingman